For this C3 I had planned to have a couple more screenshots of my hack ready, but progress has been almost zero for the past couple months so whatever I showed off last C3 is actually still recent. Instead, I decided to put together an idea I had a while or two ago: program Snake in SMW. (I realize this has been done before using code injection in TAS's, but those are kind of different circumstances.)
The rules are simple: collect money, don't touch the edges, don't eat yourself. (same advice as in real life, really.) Use the arrow keys to move around, aim for the coins and see how long you can get!
how do you make sure the snake only changes direction when it's aligned with the grid, while allowing for input at all times? (my solution: a RAM address to temporarily store the next direction)
how do you make the block-eating "tail" follow the same path as the "head"? (my solution: a buffer that holds a history of all the directions taken, with the tail reading from a certain spot in that buffer depending on the snake's current length)
how do you check if the head touches another part of the snake but don't count the block that's currently being spawned? (my solution: look ahead one tile depending on the current direction)
Another thing I'm wondering is... would this hack even be allowed in the Hacks section? It is a full game alright and it took a reasonable amount of effort, but with so little actual content I wonder if it'd be more accurately treated like a custom sprite showcase. (plus there's no win state.) I have no preference or strong desire to submit it either way, so I'll leave this one for the mods to decide.
In the meantime, if you'd like to indulge in hours upon hours of incredibly varied and exciting gameplay, here you go:
Yep, the source is included as well. It's basically just two sprites - put them right on top of another, place a coin near them, and let the fun begin. I'm not sure how useful they'll be for the public (they're also hardcoded to stay in the lower half of screen 0 and kill you otherwise), but if there's interest and the rules allow it, I can submit them officially.