Tweet Tweet Jam 4

Games! Small games! Games that fit into twitter posts! That’s right, it’s Tweet Tweet Jam again and I’ve got a batch of new games to talk about!

As with previous editions of Tweet Tweet Jam, I couldn’t contain myself to just a single entry so today I’ve got three games to talk about, two of which ended up being submitted as part of the jam.

First up is Treasure Finder, a relaxing walking simulator based on one of my previous tweet carts.

Whilst not the most heart pounding of video games, this entry is very minimalist from both a visual and design perspective. Players must locate some buried treasure hidden somewhere on a randomly generated island and have only a basic metal detector to help them find their way.

Play Treasure Finder and view full source code on itch.io

Next up is Mini Bloons, a demake of the classic Bloons flash game.
For this I think I ended up overinvesting in the colourful shooting indicator, perhaps these characters could be better spent by tarting up the projectile and/or the balloons. Aside from aesthetics I would’ve also liked to add a small amount of movement to the balloons to give them a more ‘floaty’ feel.

Play Mini Bloons and view full source code on itch.io

Ah yes, my third entry which isn’t actually an entry for this jam.
Whilst I didn’t manage to meet the size requirements for this game I do have a few interesting technical titbits I’d like to share with you.

My plan for creating a mini version of Tetris stemmed from the idea of using fill patterns to define the tetrominoes needed for a working tetris game. In Pico 8, a fill pattern is a 4×4 grid of pixels with values of one or zero to draw or not to draw a pixel at a certain point. For example, a binary pattern of 0101101001011010 would produce a checkered pattern. This makes a lot more sense more adding a line break after every fourth value like so;

0101
1010
0101
1010

Of course this binary representation is great for readability but not so great for our limited character count. Luckily we can simply use the decimal value for these patterns instead with the same results. So instead of creating sprites which I couldn’t share in a tweet I could now create prior to the game starting very quickly and will relative ease.

But how can you create sprites just from fill pattern data? I hear you ask, well Pico 8 being the fantastic console it is allows you to copy and paste memory wherever you choose. In this case, I could draw a rectangle using each fill pattern required to play Tetris at the top of the screen and then copy that screen data into my sprite sheet.

Each tetromino generated from fill patterns

These sprites could also be used for collision detection and rotation during gameplay. Selecting and rotating sprites was simply a matter of feeding an index into the sprite drawing function for which sprite to draw from the sheet and incrementing that value when rotating. Collision was managed by checking all 4×4 pixels around the position of the current peice for any non black pixels and doing the same on the sprite sheet.

Copying screen data also proved to be useful when programming line removal. In the same way you can copy from screen to sprite sheet, so too can you copy from the screen to a different part of the screen. This meant that using the clear screen command was out of the question. The active tetromino would also have to be cleared before each frame which was accomplished by drawing the same piece in its current position in black before moving it and drawing again, a necessary evil in this case which contributed more to my total character count.

Unfortunately despite my best efforts, I was ultimately unable to squeeze any more spare characters out of my cartridge in order to meet the jam requirements. Instead, I opted to minimise as much as possible and then added some visual treats such as a score down the bottom and decreasing the game resolution to 64×64 by using poke(0x5f2c,3) (set the value of a secret memory address value that handles video output). The end result is a fully functional version of Tetris less than 800 characters.

Play Tiny Tetris and view full source code on craigtinney.co.uk

But wait there’s more!
As it turns out a tweet tweet version of tetris in Pico 8 is very possible given the right approach, check out Jadelombax’s entry Tweetris!
And for a new spin on the classic block stacker I highly recomend Weird Tetris by Beep Yeah!

I hope you enjoyed this little summary and any of these games if you played them, exepect more tiny games for Tweet Tweet Jam 5!

Leave a Reply