Enemies & Difficulty

I won’t write about every enemy type I have or want in the game. Many of them have pretty simple behaviour that should be self explanatory just from seeing them in the game for a few seconds.

Some of these sprite designs were initially from kenney.nl resources, and may change in the future.

The more interesting enemies for me are ones that can change the level. The prime examples of this are the bomb and the worm. Although they both tear out part of the level, they do so in very different ways. The bombs will become lit when they hit some terrain, and explode after a short delay with a variable explosion radius and force that throws enemies and the player around, which is fun.

The worms on the other hand are slow, more deliberate, but never stop. You can’t dig a pit to trap them, and they don’t dig out a nice wide path that you can also use. They don’t turn much so they are on a predictable path… to a point, but they can still catch you out if you’re not careful!

While designing the worms I struggled with if they should have gravity or not. I thought it would be cool that if they dug through to a tunnel you made they would fall down into it. Technically this proved a bit tricky to implement in a way that looked right, and it also meant you could disable them much easier. So I left them as being able to traverse the entire space of the level, whether there was paper to munch on or not. They are currently and will probably stay as a higher difficulty enemy, so I feel like it’s okay for them to behave this way.

Webs will slow down the player and enemies alike, but will deteriorate and break eventually if you try and move through them. Jumping a bunch makes them break faster. The spiders themselves will move around and shoot webs, moving again if they are too close to another web, to try and spread them around as much as possible. They are not impeded by webs and can move freely.

Currently I have a difficulty system that works on tiers, based on a few pieces of information. It looks at your current score, i.e. how far along you are in a run, and also your highest score. I use your high score because I don’t want an experienced player to see very simple levels and have to go through them every time they start up a run, this might get boring and stop them playing. Of course this means comparing high scores from people gets tricky, if I increase the difficulty because you have gotten far in a run, will you ever reach that score again? Or push past it?

Where I have landed right now, which may change, is to increase the base difficulty, but not progress it until when it would be increased if the run had still started at zero. So if it would normally increase every 10 levels, and you start at the difficulty of 20+, I won’t change the difficulty up again until you have completed 30 levels. Hopefully that makes sense, both in my explanation and in what I’m doing. Play testing will hopefully help down the line!

Each difficulty tier has several options and lists associated with it. The level is divided up into nine sectors. In earlier difficulties the player will spawn in one of the first three sectors (the top row) and the exit in the last three (bottom row). This is because it will be easier for the player to just dig a path to fall down, rather than trying to create a path up and get the angles right and manage to perform possibly tricky jumps.

The tiers also have two enemy lists. One for forced enemy spawns and one for random enemy spawns. The forced enemy spawns are not used a lot, but if I want to make sure you see an enemy type at a certain point, they exist for that purpose. The rest of the enemies (tiers have a range for number of enemies) will be picked from the random list… at random.

Another feature is tethering, which means an item or enemy can be spawned around or next to another item or enemy. Right now I’m generally using this at higher difficulties to tether the exit key to an enemy so the player has to navigate a more treacherous path and can’t just avoid the enemies. But for easy levels I can make sure the key spawns right by the door, or some stars are right next to the player.

Anyway that’s a lot of random stuff about difficulty tweaking that I am sure I am not done with. It will need a lot of play testing to get right!

Thank you for reading, this one got a bit more in depth than I expected! Next time I will talk about what I’m thinking about for a tutorial, and mobile control schemes…