The Mezunian

Die Positivität ist das Opium des Volkes, aber der Spott ist das Opium der Verrückten

Let’s Code a Crappy 2D Platformer Like Millions o’ Other People on the Internet & Lose Interest & Give Up Only a Few Months In, Part XV

Soupy Sewers

@ 1st I had qualms ’bout the sloppy inconsistency o’ the sewer hole monster’s frames, but I’ve come to appreciate it in a Ren & Stimpy kind o’ way. It actually made me curious ’bout the prospect o’ an entire game animated that way.

I actually hadn’t lost interest, but was spending copious time on insignificant twiddling.

I rather radically refactored the block system, levels, & palette system so that they loaded JSON files automatically so that I don’t need to manually add them directly into the code. Unfortunately, due to the weird way RapidJSON handles objects, making it impossible for me to push its objects into other functions, this code is messy as hell. But a’least it’s all isolated & probably won’t need to be touched much. Meanwhile, the creation o’ levels, block types, & palettes is through clean JSON files.

I also finally split the block system into tilesets that vary by map ( ‘cept the added “universal” set which applies to every level ), though I had to simplify blocks so that they just took 16 x 16 graphics ‘stead o’ 4 8 x 8 graphics. The filesize saved through extra reuse o’ graphics wasn’t much, & wasn’t worth the tedium o’ redoing so many blocks.

I also changed the sprites so that I can now see what they are on Tiled maps. Tiled doesn’t allow you to have multiple tilesheets use the same #s, e’en if used for separate layers, & I unthinkingly made the sprites use 0 & onward, which the block types also use, since sprites & blocks use completely different lists. I changed it so that sprites start @ 401 & lengthened the tileset graphic files so that they & the universal tileset graphic add up to 400 blocks in Tiled. Then I just add the sprites tileset last & it handles 400+. I just need to hope that none o’ my tilesets need mo’ than 336 blocks ( 64 being taken for the universal set ).

None o’ this probably made any sense & probably sounds like a hungo’er mess.

Find sloppy source code @ GitHub

¿Liked it? ¡Take a second to support this idiot on Patreon!
Posted in Boskeopolis Land, Programming