Here's a little experiment for a technique to render water with some very rough-and-ready sprites.
It works by simply using memcpy to copy rows of pixels from the screen memory straight to another location in the screen memory, using some simple offset calculations.
After that a rectfill is used with the newly (ish) revealed bitmask poke to cheaply tint the water area.
There's a few rough edges and caveats - namely the water area (defined as a rectangle needs to ideally be aligned on a 2-pixel boundary, since it's copying whole bytes of screen data at a time and a single byte contains 2 pixles.
Secondly using a bitmask is cheap but crude in that you don't have complete control over the result since it depends on what is being reflected. However for water I think it ends up fine.
The third point is that you can't merge pixels behind the water area - it's reflection or nothing :)
Z - fire reindeer laser
Cursor keys - move left/right
Presents - check ... Sleigh-bells - check ... Reindeers - check ... Laser canon - check.
Just your average Christmas Eve for Santa, when all is quiet and those thieving present-obsessed aliens begin their marauding spree.
Stop the aliens from stealing the presents. If they get away they'll mutate and you'll never here the end of it. Make sure you catch presents if they fall. Imagine what could happen if all the presents where destroyed ... instant violation of the Insanity Clause!
This is my contribution to the amazing 2018 Pico-8 Advent Calendar, day 17.
There were bricks in the sky. Why?
They fell on our cities - we did not like this.
We considered sending fighter jets against them, or surface-to-air missiles.
Wiser heads prevailed and instead an enormous, gravity defying bat was constructed, armed with spherical counter-measures and launched to protect us.
Sounds like the plot of a soon-to-be-commissioned movie (contact details in my about section).
Whelp. Arrows, X to serve. Bounce bricks for bonuses, multiple times for more.
There's only a few levels there at the moment, so I may add more. It might be a bit hard though.
Obviously I apologise for the 'music'. But nothing else.
This game is too hard! I've reduced the number of bricks, made the bat a bit bigger and added some multi-ball power bricks.
It's STILL too hard! Oh well.
Changed the bat controls to be less floaty (thanks for the feedback :)
Chris Donnelly (@gruber_music) has also very kindly spent some time on greatly enhancing the simple ditty I had playing, so there is now real music!
Updated to VERSION 1.1
Version 1.0 was too easy. Maybe this is too hard? Or maybe I'm just not good enough.
Tweaked difficulty, star colours, and faster wave transitions.
We lived in peace for thousands of years, until they came.
Aggressive beyond reason and sporting a dubious dress sense, they attacked in droves; we pushed them back, but they kept coming. Eventually they were down to their last ship.
Still it comes at us, attempting to exterminate us for unknown reasons. Seemingly unable to take a hint.
You are that ship. Leave your morals at the door and destroy those poor aliens for no logical reason.
Controls .. usual sort of thing, you'll figure it out
I finally grabbed pico-8 a few weeks ago, just before I went on holiday, so jammed away at this in the evenings. Would have been finished quicker but I just kept iterating over it until I was happy.
I am finally free now and can get back to my larger project ..
No doubt this has bugs - there's about 20 waves, at which point it loops back to wave 1. Balancing may be a little off and it could do with fleshing out a bit more, but as a summer project it'll do :)
BTW: the cartridge should support 60fps and it's much nicer to play like this, so recommend playing it direct rather than via HTML
NB. The code is .. well, it is what it is :) I just kept piling stuff in there and it could be extensively improved and cleaned up (for example there are three different functions that create smokey stuff). So take it with a pinch of salt. There's a bit of slow down on some of the busy levels which could probably be optimised by making sure not to create more blobby things over a certain threshold, but it always seems to remain playable.