Before going deeper into the new features I have added this week, here’s a quick video of the current status (captions pointing some features):
Procedural generation script
Last week I decided to take a detour in the current development and move from a random generated level system to a procedural generated one.
I really believed this could take me at least a few weeks but actually was “simpler” than expected, as there’s lots of case studies in internet where you can learn from, in this case after researching in different implementations for a couple of hours I decided to go through with Will’s tutorial (Six Dot Studios)that you can find below, as was based on Nuclear Throne, which is one of the games I’m taking inspiration for Panda Hell:
The procedural generation script above is based on the random walk algorithm (drunken walk for friends, heh … ), and was a great base to develop my own procedural generator system.
While the generator above works nicely as a paradigmatic example, nothing normally works out of the box for your specific project, so few tweaks were needed.
In my case for example, as you can see in the screenshot below, the green square (exit tile) as well as the white square (power-up tile) were both generated outside of the maze, hence impossible for the Player to interact with them.
There’s also the problem of the random spawn, where enemies or the player could spawn in closed rooms, with no access to the rest of the level.
I’m still working on little modifications to the algorithm to fit exactly what Panda Hell needs, but still needs some tweaks here and there to be completed and 100% functional, as the procedural generation works nice 99% of the times but I still find some edge cases that needs work once in a while.
Random generation of sprites, enemies and items
After this initial stage was completed, I felt that was a good time to push forward the overall design and art of the game, while I have a long list of bugs to fix and features to implement, a change of pace is always nice, and was not completely unrelated to the algorithm, as I also want to populate the levels randomly once generated.
After some planning I found out that there’s 3 base models I need to have for the walls: Empty ceiling (ceiling tiles), empty ceiling and bottom (middle tiles), empty bottom (bottom tiles), plus one basic model for the floor.
From this point I added some extra functionality to the default generator so it can add randomness to the sprite generation, for example I have 4 variations of the floor game object, after applying this new function, it looks like this:
New features added this week:
- Procedural level generator
- Added ammo functionality. Weapons use ammo, this is reduced on use and enemies may drop more ammo.
- Weapon switch is live. Switch between weapons pressing the Space key.
- Basic info screen between levels. This needs more work, for example show the Player stats till this point, but for the moment a basic implementation is in place.
Objectives for next week:
- Keep fixing bugs and edge cases created by the procedural generator script.
- Set all environment to be destructible except the outer walls of the level.
- Invest time in the art aspect.
Leave a Reply