Better procedural generation, more variety
I've been working on tightening the procedural generation of the game. There were cases where the procgen could fail to generate maps before and, eventually, give up. There were generation errors where chunks were not lined up correctly. The code was messy and didn't have enough test coverage.
That's all changed, now. The algorithm that generates the tilemaps is now fully backtracking and will fully explore its available space before giving up. In hundreds of live runs (and maybe a couple thousand unit test runs) I haven't seen it fail to find a tilemap yet with the chunks that I have now; adding more variety will just add more certainty that it will generate.
Unfortunately, that means that level generation takes longer than it did before as the algorithm wanders around the space placing chunks and pulling them out. So I ended up adding a small system for async jobs that need multiple frames to finish and coroutined-up the tilemap procgen without too much trouble. Thanks, Lua! I'll probably end up blogging about the algorithm more on my personal site.
It's not that there aren't already async processes in the game, but this is the solution I probably should've added a long time ago to make it easier to do per-frame tasks until done than littering flags and counters in other systems. Oh well.
All this to support more variety in chunks. Before, I was relying entirely on an automapper to place tile images in chunks based on their physics geometry; if something was solid and had solid tiles to its left and right it was probably a platform, so stick a platform there, etc. After adding rules and chunks and playing around with the visuals I finally surrendered and put in more manual control. The dream of the fully automapped chunk was nice while it lasted, but the game is easier to make prettier now. That's a good thing.
The next bunch of changes will include more chunk and art variety as well as more core loop enhancements around making buildings and cleaning up sectors.
Files
Get Gemini Rising
Gemini Rising
A puzzle platformer about evading and hacking grumpy bots.
Status | In development |
Author | drhayes |
Genre | Platformer |
Tags | LÖVE, Metroidvania, Pixel Art, Puzzle-Platformer |
Languages | English |
Accessibility | Configurable controls |
More posts
- A crane to pick up enemies!Dec 30, 2022
- No longer using state to pass messagesJun 19, 2022
- Hacking bots worksFeb 19, 2022
- Weird map bug and bad initial animationFeb 07, 2022
- Double-jump!Feb 06, 2022
- Built from feedback: push buttons!Feb 05, 2022
- A couple more levels, two more puzzlesFeb 02, 2022
- Possession mechanics!Jan 29, 2022
- Goblins can wear helmetsJan 26, 2022
- A bit of particle workJan 25, 2022
Leave a comment
Log in with itch.io to leave a comment.