This level started with just the idea o’ a neon palette, the implementation o’ which probably did take the bulk o’ the time I spent on this level. The “palette changes” as they seem to be in the actual game use completely different coding, bending this game’s flimsy ’scuse for a palette system e’en farther. Unlike ol’ consoles & computers, wherein changing palettes was much quicker than changing tiles that many ol’ games would cycle palettes to create the illusion o’ animation, changing the palette in this game requires regenerating textures, which is much slower than just animating tiles. Theoretically it’d be possible to do it rather quickly using shaders; howe’er, SDL doesn’t allow shaders, & it’s much too late in development to switch o’er to the much mo’ complex & much less intuitive OpenGL. What I did do to create the illusion o’ a cycling palette is take advantage o’ 2 caveats to this problem: 1. I can render a rectangle o’ any color that covers the whole screen in no time; 2. SDL allows me to apply the equivalent to Photoshop’s “multiply” blending mode to textures, which, when used with a white & black image makes whate’er is ’hind show through the white while still concealing what’s ’hind the black.1 Thus, I just set whate’er palette entries I want to show the shifting rainbow color ( which are dark gray & black ) to white while everything else is black.
I had originally planned to use the city theme for this palette, since I felt the city would look nice in neon, but since I had all 4 city slots filled, I ’stead considered making a space level, since that theme has the fewest slots filled & it would fit there, too. I think I played with the idea o’ focusing on dodging horizontally-moving sparks on wire or something; howe’er, none o’ this felt fun, so I shelved it for a while. I don’t remember where my mind went from there, but as some point I came up with the idea o’ dodging falling stars, — probably from the 1 memorable level from New Super Mario Bros., the 1 wherein lava rocks fall from the sky — & then decided to move “Sleet Streets” to the “domestic” theme ( since it’s mo’ ’bout homes than the city ) & make this a city level. Then, finally, I decided to make this a space level ’gain, despite keeping the city graphics, & would just say this was a city on ’nother planet. It’s not as if I haven’t been blending themes together & sticking them into whate’er slot was most convenient, & if any theme deserved to dip into other themes’ slots, it would be the city theme.
The falling stars are just a bit mo’ complicated than just randomly placing them round. To ensure the player could not outrun stars in either direction & that there was a steady supply, I made it so that every time it generated a falling star it not only placed it on the current screen, but also on the next & previous. & to decrease the chance so’ stars congregating in 1 area I made it so that it had to spawn the next star a few blocks ’way from where the last spawned.
Recording the time & gem scores were surprisingly smoothly. I made the time score somewhat lenient to make up for the delays falling stars can sometimes force on the player when they form walls. E’en then, I still couldn’t help myself from just running thru stars when I knew a heart was close ’head, which I try not to do, since I want these challenges to be possible without taking any hits. Shockingly, I was able to record the gem score on my 1st try, which I always found very hard to get during practice. Then ’gain, here you can see me moving as carefully as I can. I should point out that this will definitely replace “Stop & Go Space Station” as the 4th-cycle space level, pushing “Stop & Go Space Station” down to the 3rd cycle, as it is much mo’ difficult.
Learn mo’ ’bout this project @ boskeopolis-land.com.