Loading...
96
Game
Hensen Hopper
5 months ago

This is a much larger (in terms of resolution) video than I've shared here before!!!

This is a full round of Hensen Hopper in it's current state! I mainly recorded this to showcase the new wave difficulty curve algorithm I've been working on!


The enemy wave spawning algorithm itself (that is the algorithm that handles when new enemy waves are spawned and how said process of spawning new enemy waves is executed) really hasn't changed much.

image.png

Random waves are still drawn from a list and their enemies spawned accordingly every time there are no offensive enemies (that is enemies that attack the player) in the scene. The only major difference here (as you can probably see in this snippet) is that the random waves are no longer drawn directly from the waves array that is accessible in the inspector window but instead from a separate internal list of waves that is built on Start and re-built every 10 waves during runtime.

image.png

The process of doing so can be separated into two subparts, adding new waves and pruning waves that are too easy for the point in the round the player has reached, this is in order to keep things exciting for the player, of course!

Waves added are based on a new wave difficulty system. Each enemy now holds it's own difficulty value and the difficulty of a wave is simply the sum of it's enemies' difficulty values.

image.png

Every time the internal list from which waves shall be drawn is updated, I loop through the FULL list of waves (the one I can modify in the inspector window) and add any waves that have a difficulty value less than the player's score divided by five (keep in mind the players score and the difficulty of enemies are both integers so this is an integer division operation) plus three to the list skipping any wave configurations that are already present in the list.

For example, when the player's score is less than five, the max difficulty of a wave that can spawn is two, meaning at most two soldiers can spawn until you reach a score of 10 where the list is next updated since soldiers have a difficulty value of one. Beetles have a difficulty value of two but all configurations involving them also include at least two soldiers so they don't spawn until you've gotten 10 points and the list is updated again (at this point waves with a difficulty leq 4 are added to the random draw list)

image.png

Pruning "easy" waves creates a brand new list from the current one where any waves with a difficulty value less than the players score over five minus five are left out (this proved more intuitive, at least to me, than trying to REMOVE items and since this is only being carried out every 10 waves I wasn't TOO concerned with the runtime complexity, after all, I can always have this happen more rarely by changing the value by which I mod the wave number in figure one).

This created a potential problem I noticed almost immediately, however, where eventually the players score would get to a point where there were literally NO waves that could meet this requirement and they'd all be left out. In order to fix this, I went ahead and made it so they'd also be included if their difficulty was five or greater regardless of the player's score. This seemed totally fine as the straight row of five and any wave with at least three soldiers and a beetle are a difficulty of five, both of which are REASONABLY challenging waves and shouldn't feel too boring to have spawn on you late-game (again, I can always tweak some values later if I need to so shrug).



0 comments

Loading...

Next up

I've been working on improving the backdrop for Hensen Hopper! The way I'm doing it this time is I'm creating a 32x32 image for each texture I want, tiling it to fill the backdrop image, and using layer masks to "paint" where that texture will be visible.

Very unfinished but the backdrop image, as it is in this video, is already leagues better than what I had last weekend! I'm going to work on it incrementally over the coming weeks as I work on implementing the stages idea I talked about before!

This is a short video showing off the new procedurally generated enemy waves in Hensen! In theory, the game will become more and more unpredictable as I continue to build and implement new enemies!!!

Doki Doki Literature Club is celebrating Monika's birthday and the 8th anniversary of DDLC with exclusive stickers, avatar frames and backgrounds on Game Jolt! 

Head over to the shop to collect yours 👉 https://gamejolt.com/#shop

I did get a lot more done on the backdrop yesterday, by the way! It's not finished by any means, in fact, it's quite empty and even ugly in some places, but it's beginning to come together!

Play @pm-studios ' Bandit Trap Open Beta!

Grab your rocket chairs, vacuums, and toilet tornadoes! Report one more time for our final beta! Live through March 23rd 6 am CET.

Complete quests based on the game!

Play the beta: https://bit.ly/BanditTrapBeta

The spider is more or less complete functionally AND artistically! I might try to update the enemy spawning algorithm before I release any new alpha builds with the spider, though. I'm on my whiteboard trying to think through that problem.

I've been working on the backdrop today! Among other things I've done, I made a bush! I know, SOOOO impressive lol.

BIG NEWS: Your Bandit can wear a Game Jolt hat and shirt in Bandit Trap!

Defend your home or steal treasure in the open beta: https://bit.ly/BanditTrapBeta

It ends on March 23rd at 6 am CET!

You see I was GONNA get to work on the procedural enemy wave generation algorithm but then I remembered I still haven't drawn a defeat animation for the spider so now I'm working on that instead. 🤣

Doing it in layers starting with the web as usual.