Log In  

I've been getting really into PICO-8 development in the last two weeks, after having spent years mainly just playing the games. I have only the lightest background in programming (like coding microcomputer BASIC programs when I was a kid), but I understand a lot of the principles behind it, and in game design. I'm also pretty handy with a spreadsheet and have produced some fairly sophisticated things using Google Sheets code.

Anyway, Krystian pointed me to Delunky as a good example of procedural map generation for platformers, and someone else showed me X-Zero. I opened up both of the carts and took a peek under the hood. I'd just like to pick your brains if you all have a bit.

So, what I gather is that the fourth tab of the sprite sheet contains a bunch of tiles that represent mini-versions possible rooms. The game draws the level elements (platforms, walls, traps, and such) by reading the colored section of the mini-tiles and extrapolating the larger elements onto the playable area of the map, is that right? Also, it looks like the mini-tiles aren't necessarily 1:1 representations of the full rooms, but that the process for determining platform placement uses RNG based on the mini-tiles. So that let's say a pixel of color 7 might not always generate a tile on the playable map, but that the RNG has a decent chance of putting one there.

Do I have this all correct? Thank you.

P#123543 2023-01-02 22:35

Yeah that seems like a very good understanding. If each pixel corresponds to a single tile, you can have tables for each color, and the RNG picks a tile from that table, so you can have variation on your tiles. And, as you said, the table can include empty tiles.

P#123562 2023-01-03 01:07

[Please log in to post a comment]