Implementing nuclear throne's level generation on pico8
I have been tinkering around with procedural level generation and Pico-8 for a few days which lead me to reimplementing a portion of Vlambeer 's iconic game Nuclear Throne's level generation.
I decided to not exactly follow their algorithm but a pretty close implementation of it. Mainly because the 1:1 implementation didn't create a very good looking map on pico8 imo.
Using a combination of
- Random walk and
- Weighted directional bias (a.k.a a random % that I hand tweaked to look satisfactory, no maths involved :p)
The algorithm was able to carve out organic levels that were pretty similar to Nuclear Throne.
So I found an interesting approximation algorithm for converting to and from floating point data (bitwise not in a supported variable) but the issue is its based on the assumption one has u32 to work with.
I got some of the base code working in theory but the big int library doesn't work with byte anding and oring totally in a way I'm wrapping my head around entirely yet.
The problem is while I could do it one by one with a string, that would not be efficient.
Splitting bytes and relocating to just a high byte set on two variables should work but is melting my brain. Anyone else fall down this rabbit hole before?
My latest game, Spooky Stylin' uses this "bitplaning" technique to store two 2-bit spritesheets instead of a single 4-bit spritesheet. I took a shot at animating the process to show how it works.
Read more about it on my neocities blog!
Acknowledgements
I owe a lot of my understanding to Two Owls and 8-bit Caaz. Check out these posts for more
So the Pico-8 supports GPIO on the Raspberry Pi and Pocket Chip, but I don't want to have to use Raspberry Pi or the pocket chip just for GPIO! The Pi Pico does have GPIO that could be used, but I don't know if it connects with the Pico-8, I really want to make something interactive and it would be really helpful. Does anyone know any alternatives?
I just want to make some LED's light up, nothing to fancy, just want to send stuff in and outside of the Pico-8!
It would also be extremely helpful if I could at least do the same on Picotron, because that has WAYYY more room to put microcontroller GPIO entries in






0 comments
