joeyspacerocks [Lexaloffle Blog Feed] Water experiment using a bitmask <p> <table><tr><td> <a href="/bbs/?pid=76518#p"> <img src="/bbs/thumbs/pico8_nituzapitu-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=76518#p"> watertest</a><br><br> by <a href="/bbs/?uid=15119"> joeyspacerocks</a> <br><br><br> <a href="/bbs/?pid=76518#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a little experiment for a technique to render water with some very rough-and-ready sprites.</p> <p>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.</p> <p>After that a rectfill is used with the newly (ish) revealed bitmask poke to cheaply tint the water area.</p> <p>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.</p> <p>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.</p> <p>The third point is that you can't merge pixels behind the water area - it's reflection or nothing :)</p> Wed, 13 May 2020 20:02:04 UTC There Ain't No Sanity Clause <p> <table><tr><td> <a href="/bbs/?pid=60043#p"> <img src="/bbs/thumbs/pico8_sanityclause-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=60043#p"> sanityclause</a><br><br> by <a href="/bbs/?uid=15119"> joeyspacerocks</a> <br><br><br> <a href="/bbs/?pid=60043#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Z</strong> - fire reindeer laser</p> <p><strong>Cursor keys</strong> - move left/right</p> <p>Presents - check ... Sleigh-bells - check ... Reindeers - check ... Laser canon - check.</p> <p>Just your average Christmas Eve for Santa, when all is quiet and those thieving present-obsessed aliens begin their marauding spree.</p> <p>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!</p> <p>This is my contribution to the amazing <a href="">2018 Pico-8 Advent Calendar</a>, day 17.</p> <p>If you like this, then you could follow me on Twitter <a href=""><a href=""> @joeyspacerocks</a></a>, or take a look at my other projects at <a href="">Fistful of Squid</a>.</p> Mon, 17 Dec 2018 08:15:44 UTC Brick Tickler (Updated to v1.2) <p> <table><tr><td> <a href="/bbs/?pid=27490#p"> <img src="/bbs/thumbs/pico29382.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=27490#p"> Brick Tickler (Updated to v1.2)</a><br><br> by <a href="/bbs/?uid=15119"> joeyspacerocks</a> <br><br><br> <a href="/bbs/?pid=27490#p"> [Click to Play]</a> </td></tr></table> </p> <p>There were bricks in the sky. Why?</p> <p>They fell on our cities - we did not like this.</p> <p>We considered sending fighter jets against them, or surface-to-air missiles.</p> <p>Wiser heads prevailed and instead an enormous, gravity defying bat was constructed, armed with spherical counter-measures and launched to protect us.</p> <p>Sounds like the plot of a soon-to-be-commissioned movie (contact details in my about section).</p> <p>--<br /> Whelp. Arrows, X to serve. Bounce bricks for bonuses, multiple times for more.</p> <p>There's only a few levels there at the moment, so I may add more. It might be a bit hard though.</p> <p>Obviously I apologise for the 'music'. But nothing else.</p> <p><strong>UPDATE 1 </strong></p> <p>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.</p> <p>It's STILL too hard! Oh well.</p> <p><strong> UPDATE 2 </strong></p> <p>Changed the bat controls to be less floaty (thanks for the feedback :)</p> <p>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!</p> Sat, 27 Aug 2016 18:39:50 UTC They Started It <p> <table><tr><td> <a href="/bbs/?pid=27113#p"> <img src="/bbs/thumbs/pico27177.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=27113#p"> They Started It 1.1</a><br><br> by <a href="/bbs/?uid=15119"> joeyspacerocks</a> <br><br><br> <a href="/bbs/?pid=27113#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Updated to VERSION 1.1</strong></p> <p>Version 1.0 was too easy. Maybe this is too hard? Or maybe I'm just not good enough.</p> <p>Tweaked difficulty, star colours, and faster wave transitions.</p> <p><strong>Original blurb..</strong></p> <p>We lived in peace for thousands of years, until they came.</p> <p>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.</p> <p>Still it comes at us, attempting to exterminate us for unknown reasons. Seemingly unable to take a hint.</p> <p>You are that ship. Leave your morals at the door and destroy those poor aliens for no logical reason.</p> <p>Controls .. usual sort of thing, you'll figure it out</p> <p>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.</p> <p>I am finally free now and can get back to my larger project ..</p> <p>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 :)</p> <p>BTW: the cartridge should support 60fps and it's much nicer to play like this, so recommend playing it direct rather than via HTML</p> <p>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.</p> Sat, 20 Aug 2016 11:24:37 UTC