JadeLombax [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=42638 Where do I get info on the unpack() function? <p>Lately I've heard bits here and there about a new function called <em>unpack</em> that seems to have some significant benefits, but after searching the BBS, the Pico 8 Wiki, and Google, I've barely been able to come up with any solid infomation on it or how to use it.</p> <p>If someone could point me in the right direction, I'd much appreciate it.</p> https://www.lexaloffle.com/bbs/?tid=38759 https://www.lexaloffle.com/bbs/?tid=38759 Sat, 11 Jul 2020 00:50:41 UTC Space Invaders Arcade <p> <table><tr><td> <a href="/bbs/?pid=78157#p"> <img src="/bbs/thumbs/pico8_sia01-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=78157#p"> sia01</a><br><br> by <a href="/bbs/?uid=42638"> JadeLombax</a> <br><br><br> <a href="/bbs/?pid=78157#p"> [Click to Play]</a> </td></tr></table> <br /> Yes, this is yet another version of Space Invaders, but with this one I'm going for a direct port of the original arcade game. It's mostly complete, with functional gameplay and a working high score save system, but it needs some gameplay tweaks and a few graphical elements, and the sound effects are very much unfinished (I'm working on a version of the 4-tone march using subtones, but haven't ironed out the glitches yet). Anyway, in addition to going for authenticity, I also tried to code this very efficiently, and the whole game (including all graphics and sound), takes under 3KB and only about 1100 tokens.</p> <p>Any constructive criticism and general feedback is welcome, thanks.</p> <p>Controls:<br /> L/R------Move cannon<br /> X--------Fire</p> https://www.lexaloffle.com/bbs/?tid=38446 https://www.lexaloffle.com/bbs/?tid=38446 Tue, 16 Jun 2020 18:22:33 UTC Cloud Bounce EX - Full game version <p> <table><tr><td> <a href="/bbs/?pid=77005#p"> <img src="/bbs/thumbs/pico8_cbex_01-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=77005#p"> cbex_01</a><br><br> by <a href="/bbs/?uid=42638"> JadeLombax</a> <br><br><br> <a href="/bbs/?pid=77005#p"> [Click to Play]</a> </td></tr></table> <br /> Join Squirt as he jumps and bounces in the sky through varying times of day, on his way to Cloud Land.</p> <p>Controls:</p> <p>Left/Right---Move<br /> Z------------Small jump/bounce<br /> X------------Regular jump/bounce<br /> Z+X----------Super jump/bounce</p> <p>A little while ago I uploaded my first game Cloud Bounce, an animated platformer designed to fit in 280 characters. I was happy with the basic gameplay, but in order to fit it in such a crazy small space, it was pretty bare-bones. The EX version is fundamentally the same game, and still tiny at just over 700 characters, but with a lot of important game features added, including:</p> <ul> <li>Title screen</li> <li>Lives system</li> <li>Game over screen with restart</li> <li>Checkpoints</li> <li>Gameplay timer</li> <li>An improved ending (the original was by necessity super abrupt)</li> </ul> <p>It's still missing sound because I haven't figured out how to make music yet, and when I tried adding a basic jump sound without music, it got monotonous quick. The game's a simple and straightforward platformer with no enemies or in-depth mechanics besides reaching the end in good time, and I don't plan to really change that outside of making a sequel. I'd appreciate any feedback on ways I could make it better and more engaging within those limitations, though. Thanks.</p> https://www.lexaloffle.com/bbs/?tid=38068 https://www.lexaloffle.com/bbs/?tid=38068 Fri, 22 May 2020 09:24:42 UTC Tweetris -- fully playable tetris in 560 characters <p> <table><tr><td> <a href="/bbs/?pid=76116#p"> <img src="/bbs/thumbs/pico8_tweetris1_0-5.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=76116#p"> tweetris1_0</a><br><br> by <a href="/bbs/?uid=42638"> JadeLombax</a> <br><br><br> <a href="/bbs/?pid=76116#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is a fully playable version of Tetris in fewer characters than a moderate-length email, including:</p> <ul> <li>Line removal</li> <li>Level progression (speed increases after every 10 lines cleared)</li> <li>'Lines cleared' display</li> <li>Soft drop button (with slight delay when next piece appears)</li> <li>Reset button</li> </ul> <p>Controls:<br /> L/R-------move piece<br /> Down------soft drop<br /> O,X-------rotate piece<br /> S---------reset game</p> <p>Fitting everything in this small a space was really tough, but I made it. I had to cut a few corners, for instance there's no next piece preview, only one rotation direction, and there wasn't space for logic to allow movement of blocks once they land, so overhangs are a nuisance. With all that said, though, I worked hard trying to make this an actually decent version of tetris and not just a technical curiousity, so hopefully somebody actually enjoys playing it instead of just staring at the indecipherable souce code. Shoutout to 2dArray, whose Tweetjam Tetris and its genius piece indexing system I built on for this project.</p> https://www.lexaloffle.com/bbs/?tid=37812 https://www.lexaloffle.com/bbs/?tid=37812 Fri, 08 May 2020 08:53:36 UTC Avalanche --Tweetcart Shooter <p> <table><tr><td> <a href="/bbs/?pid=75452#p"> <img src="/bbs/thumbs/pico8_avalanche_02-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=75452#p"> avalanche_02</a><br><br> by <a href="/bbs/?uid=42638"> JadeLombax</a> <br><br><br> <a href="/bbs/?pid=75452#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Version 0.2</strong> - Now has definite fail state with timer stop, and recolored graphics</p> <p>Avalanche!</p> <p>You are a ground-based defense drone at a top-secret research base inexplicably located by a mountain prone to avalanches. When a tidal wave of snow and ice rushes toward you, you must use your cannon to vaporize it, keeping it at bay for as long as possible so the base staff can get to safety. How long can you hold out?</p> <p>Controls:<br /> L/R------Move drone<br /> X--------Fire cannon</p> <p>This is the unintended result of trying to cram a minimalistic space invaders clone into 280 characters. I couldn't figure out how to fit code for individual enemies, but an advancing amorphous mass was just doable. Hopefully it turned out alright on its own terms, and I welcome any feedback or criticism. Warning, though, this can get a bit nerve-wracking. o_O</p> https://www.lexaloffle.com/bbs/?tid=37610 https://www.lexaloffle.com/bbs/?tid=37610 Sun, 26 Apr 2020 23:42:48 UTC Test: Base64 storage efficiency vs. Hex <p>After discussing base64 encoding in a recent thread, I decided to try my own version of it for storing level strings, but after some experimentation I started wondering how much of a storage benefit it really offers vs. hexidecimal. I also came across an old post from user Overkill from 2016, in which he concludes that unfavorable interaction with Pico-8's built-in compression basically negates base64's byte-per-character advantage.</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=3738">https://www.lexaloffle.com/bbs/?tid=3738</a></p> <p>I decided to perform a test of my own to measure the difference precisely. To do this, I used some web-based tools to generate random strings, using both hexidecimal and my own base64 character set, which uses as many 1-byte characters as possible (59, to be specific -- certain characters like small caps and glyphs use 2 bytes). I generated very large strings and pared them down just enough to fill the compressed data limit to 100.00% using each character set. I performed 3 trials each, recording how many characters would fit for each encoding type, then averaged these amounts for a general comparison. Results are as follows:</p> <p>Trial 1<br /> Base64: 15846 characters max.<br /> Hex: 23230 characters max.</p> <p>Trial 2<br /> Base64: 15776 characters max.<br /> Hex: 23261 characters max.</p> <p>Trial 3<br /> Base64: 15757 characters max.<br /> Hex: 23275 characters max.</p> <p>Averages<br /> <strong>Base64: 15793 characters max. -- 11,845 bytes</strong><br /> <strong>Hex: 23255 characters max.-- 11,628 bytes</strong></p> <p>From these trials, the difference in byte capacity vs. compressed size appears to be <strong>about 2%</strong>, which suprised me. While there could be cases in which custom encoding offers various benefits, in general I think I'll stick with hexidecimal. For me, a negligible increase in storage efficiency is more than offset by much easier conversion to and from byte values and some degree of readability.</p> https://www.lexaloffle.com/bbs/?tid=37574 https://www.lexaloffle.com/bbs/?tid=37574 Sat, 25 Apr 2020 07:59:50 UTC Cloud Bounce - 60fps Tweetcart platformer <p> <table><tr><td> <a href="/bbs/?pid=74630#p"> <img src="/bbs/thumbs/pico8_cloud_bounce_proto-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=74630#p"> cloud_bounce_proto</a><br><br> by <a href="/bbs/?uid=42638"> JadeLombax</a> <br><br><br> <a href="/bbs/?pid=74630#p"> [Click to Play]</a> </td></tr></table> </p> <p>Join Squirt as he jumps and bounces in the sky through varying times of day, on his way to Cloud Land.</p> <p>Features character and level animation, 60fps gameplay, and 150 unique screens of platforming-- all in 280 characters!</p> <p>Controls:</p> <p>Left/Right---Move<br /> Z------------Small jump/bounce<br /> X------------Regular jump/bounce<br /> Z+X----------Super jump/bounce<br /> Reset Cart---Retry</p> <p>This is my first game for Pico-8 (or for any platform, for that matter...). I wasn't originally planning to try and fit a game in this small a size, I was just working on a platformer game test, but then I came across the concept of tweetcarts and things went in an unexpected direction.The game won't change a lot because I can't find any way of packing more in, but I figured it would be good to have some feedback before releasing. Thanks.</p> https://www.lexaloffle.com/bbs/?tid=37315 https://www.lexaloffle.com/bbs/?tid=37315 Fri, 10 Apr 2020 20:11:07 UTC Outputting data strings from program? <p>Hello, first post here.</p> <p>I just got started with Pico-8 recently, and have learned about the usefulness of storing data in strings to get around token limits. I was wondering, can I build a data string using a p8 program, then output that string as text that can be fed into another p8 program without it being reformatted? I'm working on a graphical level-editor program that will output level data strings usable by another cart.</p> <p>I tried using printh(), but when I opened the text file it mangled up the extended character glyphs and didn't preserve the 4x3 font lower-case letters I had in the string. My goal is to have all 121 characters available so I can store about 7 bits per character, instead of the 4 possible with hexadecimal, if this is possible.</p> <p>Thanks.</p> https://www.lexaloffle.com/bbs/?tid=37079 https://www.lexaloffle.com/bbs/?tid=37079 Sun, 15 Mar 2020 22:20:21 UTC