New enemy type and balancing

New this week

This week I added a new enemy, the pumpkin bomb. This enemy has been fully implemented and added into every room. Alongside this I finally added a doorway model. I also re-balanced some items and changed how the item drops work.

New Enemy

The new enemy added is the pumpkin bomb. This enemy has the simplest of any AI. It spawns, wanders around a bit then chases the player if they get near (or some time has passed). The enemy then jumps and explodes. Because this enemy attacking leads to its death there is little reason to have a more complex state machine.

One interesting thing this enemy does is it progressively speeds up while chasing the player. This is to prevent an extremely fast build from escaping it entirely.

When in an appropriate range it leaps towards the player, the distance of the leap is also determined by its speed. Once landing it causes an explosion that damage the player and other enemies alike. However, enemies take x2 damage from the explosion. The explosion deals damage that falls off linearly until 0 at the edges of the explosion and the knockback scales accordingly.

Below is the enemy with and its animations:

Root motion fixes

Before my root motion system allowed animations under the control of root motion to phase through walls. I have changed it, so this doesn’t happen. I don’t know the way to explain it, but it works exactly how you would intuitively expect it to now. Alongside this I fixed the root bone of the boss enemy. It seems blender’s copy location constraint doesn’t really work properly when exported into unity. I’m not exactly sure if it’s a rotation thing or a position double dipping thing (Below is diagram of issue) but I kept those constraints and parented the root bone to the hip. This seems to solve the problem entirely, but I imagine there could be some unforeseen consequences of it.

Doorway and texture changes

I added a doorway model to link between rooms. I am fairly happy with it, but I feel it could be altered a little more. One of the biggest issues I ran into creating this is that the colour is hard to match with the levels. As each tile has a warmer baked lighting, I had to make the texture artificially more orange to fit into the surroundings. It still sticks out a little, but I think that’s unavoidable without spending too much time on it.

A long time ago I complained about the wall textures falling out of favour with the recent textures. I have remedied this by slightly changing it. I have blurred the brick outlines a little and changed up the colours to be more contrasty. I accidentally created a rather nice wall texture in my starting room by scaling down the brick seams so by blurring the outlines it achieves a similar result.

Item changes

After creating the boss and its damage numbers along with the “copper heart” item I came to the conclusion that most +health items in the game were sorely underpowered. I simply went through and buffed the numbers on them to be more in line with the expected damage taken.

Along with this I slightly tinkered the recycling system and changed how items drop.

I have added the ability to have multiple drop chance gradients on a single item pool. This means enemy item drops can be skewed more towards the most common item tier and have the rarer tiers be truly rare. This also allowed me to increase the importance of treasure rooms.

Treasure rooms have a chance to drop items or weapons. Before it was a fixed 50/50 chance whether an item or weapon would spawn. Now I have made it so chests are more likely to drop a weapon if the player has open weapon slots (pockets) and less likely if all weapon slots are filled. Due to the potential increase of weapon drops I have granted the recycling system the ability to recycle weapons. Whereas items give a fixed amount of scrap based on their tier weapons give a random 1 or 2 scrap as well as a random amount of gold. This slightly penalises the player for not holding enough weapons, but I believe this is fair as items are far more powerful than a weapon (especially one that won’t be used). Therefore, the sacrifice for recycling a weapon should be lesser than that of an item.

What’s next?

Next, I’m going to add a visual for a combat room’s doors closing. After that I want to create a proper indication of which weapons the player has and is using.

Leave a comment