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 XXXIV

Play in the Background

For some reason, whenever I claim that the next level I make will be something, that’ll turn out to be a lie.

This is a rehash o’ a gimmick from Legend of the Four Switches, ’cept half-competently implemented so that you can’t just jump on the switches themselves to bypass the whole gimmick.

I also gave this level a stageplay graphical theme, including checkered floor graphics that I later realized look a bit too similar to Super Mario Bros. 3’s… O well: I’ve seen plenty o’ commercial games outright steal the original Legend of Zelda staircase or Super Mario Bros.’s bricks far mo’ closely than my checkered ground.

Implementing the gimmick was simple: it just uses the on & off switches, having “on” be you in the background & “off” as you back in the foreground. Background blocks are set to only be solid when the switch is on, & foreground blocks are set to only be solid when it’s off. Also, foreground blocks have priority ( drawn o’er non-priority sprites ) when the switch is on & not when the switch is off.

Source code

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