RealShadowCaster [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=82211 Pushing the cartdata limit a bit <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/cartdata_limit.png" alt="" /> <p>Officially, you can't use multiple data storage one one program.<br /> This feels mostly true, but very similar in spirit to statements like &quot;pico-8 has 16 colors&quot;.</p> <p>&quot;cartdata() can only be called once per program&quot;, is already less restrictive :<br /> You could have a game that uses 3 save slots, each with a different cartdata ID because each save requires most or all of the 256 bytes of a cartdata storage, and let the player choose his slot at start of the program. You'd only ever call cartdata once per game session, but would have three storage slots used in one program.<br /> This would still not be great because you can't display any info about the slots before loading them so the player would have to blindly load a slot, see if it's the save he intended to use, and reset the game if he made a mistake.</p> <p>Could we do that programmatically ? Turns out that yes, we can :<br /> extcmd(&quot;reset&quot;)<br /> Does reset the cart. Problem is, how do we remember what the previously viewed storage was, or what we were doing before triggering the reset ?<br /> Previous storage content is super simple to get : the reset call did not erase the memory, so you can just peek it at address 0x5E00. You can't get it with dget() : you'd get a crash &quot;dget called before cartdata()&quot;<br /> The &quot;what were you doing&quot; part is less convenient but manageable : poke the info into high memory that doesn't get cleared when you reset, and at start of the game, check the memory to see if it's a fresh boot or the continuation of something.<br /> Pretty cumbersome, but this opens a lot of possibilities :<br /> You could build an achievements page that would load cartdata form other games and display the list of completed ones, (if the info is in the save, of course).<br /> You could have a cartdata containing a custom player sprite that could be used in many of your games...<br /> You could have a multi-part save, but you'd lose the flexibility of dget()/dset()<br /> Lots of possibilities, has anyone explored those yet ?</p> https://www.lexaloffle.com/bbs/?tid=148878 https://www.lexaloffle.com/bbs/?tid=148878 Thu, 08 May 2025 06:55:18 UTC SSPR sandbox <h1>SSPR sandbox</h1> <p>According to the documentation, sspr is pretty self explanatory :</p> <p>QUOTE</p> <p>SSPR(SX, SY, SW, SH, DX, DY, [DW, DH], [FLIP_X], [FLIP_Y]]<br /> Stretch a rectangle of the sprite sheet (sx, sy, sw, sh) to a destination rectangle on the screen (dx, dy, dw, dh). In both cases, the x and y values are coordinates (in pixels) of the rectangle's top left corner, with a width of w, h.<br /> Colour 0 drawn as transparent by default (see PALT())<br /> dw, dh defaults to sw, sh<br /> When FLIP_X is TRUE, flip horizontally.<br /> When FLIP_Y is TRUE, flip vertically.</p> <p>END OF QUOTE</p> <p>So I was pretty surprised to see an upside down sprite while debugging, when I knew I wasn't even using the flip parameters anywhere.<br /> Things are pretty normal as long as the coordinates are in the 0-127 range and the sizes in the 1-128.<br /> What happens otherwise is unclear, so I wrote this little test cart. (image in the sprite sheet by Freds72)</p> <p> <table><tr><td> <a href="/bbs/?pid=165723#p"> <img src="/bbs/thumbs/pico8_sspr_sandbox-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=165723#p"> sspr_sandbox</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=165723#p"> [Click to Play]</a> </td></tr></table> </p> <p>Conclusions :</p> <p>Source :<br /> SX and SY can be outside the 0-127 range without problem, pixels outside the sprite sheet are considered black/index zero.<br /> SW and SH must both be in the 1-128 range. Otherwise nothing is drawn at all.<br /> Destination :<br /> DX and DY can be outside the 0-127 range without problem.<br /> DW/DH can exceed 128 without problem and without extra CPU cost that seem roughly proportionnal to the actual pixel surface drawn to regardless of the declared destination size.<br /> a width or height of 0 doesn't draw anything, as expected.<br /> a negative width or height results in a mirrored image. It also affects where the image is placed :<br /> if DH is negative and DW is positive, the image id flipped vertically and DX/DY are the coordinates of the lower left corner of the image instead of the usual top left.<br /> DW negative and DH positive results in horizontal flip with coordintates indication lower right corner?<br /> DW negative and DH negative results on flipped both horizontally and vertically, and the DC/DY indicate lower right corner</p> https://www.lexaloffle.com/bbs/?tid=148467 https://www.lexaloffle.com/bbs/?tid=148467 Thu, 17 Apr 2025 12:12:29 UTC Need help with CPU optimisiation <p>User <a href="https://www.lexaloffle.com/bbs/?uid=54999"> @taxicomics</a> started a thread compiling fades and transitions code snippets <a href="https://www.lexaloffle.com/bbs/?tid=148256">https://www.lexaloffle.com/bbs/?tid=148256</a></p> <p>I though I'd add my screen dissolve effect, base on a 14 bit variation of the xorshift algorithm<br /> <a href="https://en.wikipedia.org/wiki/Xorshift">https://en.wikipedia.org/wiki/Xorshift</a></p> <p>The shift parameters used are &gt;&gt;3 &lt;&lt;1 &gt;&gt;4 . It's not good as a random generator, but that's a property I don't care about in this context, and amongst the many triplets that give the maximum cycle length needed to progressively blacken every screen pixel, it's the easiest to remember : 314 is the start of pi and 14 is the number of bits.</p> <p>It works as expected for the first 2/3 of the screen, but after that, the CPU load goes over 100%, and the frame skips makes the animation end in awful looking flicker :</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/flicker.gif" alt="" /> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>function fade(progress) pset(0,0,0) local s=1 while progress&gt;0 do s^^=s\8 s^^=s&lt;&lt;1 s&amp;=0x3fff s^^=s\16 pset(s\128,s%128,0) progress-=0x0.0004 end end extcmd(&quot;rec&quot;) for p=0,1,1&gt;&gt;7 do cls(7) fade(p) flip() end extcmd(&quot;video&quot;)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I've only used it for fade outs, so without screen clears, I just had to go pset a few pixels every frame, but with the versatility of the fade(progress) approach, every pixel has to be redrawn every frame, in case it's used for a fade in for example.<br /> I'm stuck at the moment. Any advice ?</p> https://www.lexaloffle.com/bbs/?tid=148433 https://www.lexaloffle.com/bbs/?tid=148433 Tue, 15 Apr 2025 10:43:33 UTC Pinging BBS users that have special characters in their user name <p>To ping a user in a post, you usually just type @ directly followed by their user name.<br /> This sometimes fails if the user has special characters in their name.<br /> For example, to ping <a href="https://www.lexaloffle.com/bbs/?uid=87001"> @Peter Mosevich</a> that has a space in his user name (how are you buddy ? any new pico-8 cart or puzzlescript in preparation ?), you can use @ then { then the user name with the space, then }.<br /> This has worked for me so far, but today, I tried to ping a user (cat-8) that has a minus sign in his user name, and I ended up pinging user cat instead (sorry).<br /> Does anyone know how to properly ping such a user ?</p> https://www.lexaloffle.com/bbs/?tid=148401 https://www.lexaloffle.com/bbs/?tid=148401 Sun, 13 Apr 2025 17:38:33 UTC Daydreaming about pico-8 maps <p>While looking at an empty project in the built-in pico-8, I thought about the default map/sprite options available without extra code.</p> <p>There are the two classic approaches :<br /> 1) use the shared map/sprite area for sprites.<br /> We get 256 tiles with 8bit flags, and a map 2 screens tall and 8 screens wide.</p> <p>2) use the shared area for map.<br /> We get 128 tiles, and a 4 screen tall and 8 screens wide map.</p> <p>We can also use a hybrid of the two, where the bottom of the shared space is used for sprites, while keeping the map rectangular...</p> <p>Option 1 is efficient, IE every bit counts, while option 2 is pretty wasteful :<br /> in the map, every tile index is in the 0-127 range, but still uses one byte. That's 20% of the map data forced to be zero.<br /> Flags for tiles 128-255 are also unused...</p> <p>What if these unused spaces had had significance ?<br /> For example, the tiles 128-255 could have been a horizontal mirrors of the tiles 0-127.<br /> Maybe instead, two of the flags of each tile in the 128-255 range could be used as horizontal and vertical mirror ? That would save a few tiles, but in tile sets, you often have the 4 versions (normal, HFLIP VFLIP H&amp;VFLIP), or even eight if 90&deg; rotation is also needed.<br /> Having the referenced tile be a fixed index-128 would only allow one of the 8 variations.<br /> Maybe have another flag : false for index-128 reference, and true for index-1.<br /> That would mean 1 flag for reference, 1 flag for HFLIP, 1 flag for VFLIP, and maybe one last for 90&deg; rotation... Leaving 4 or 5 flags for normal usage.</p> <p>Moving the sprite data to high memory and drawing the tiles in the range 128-255 based on the flags in _init wouldn't be too hard and would take almost no tokens (probably &lt;100) , but the map drawing in pico-8 would be absolutely miserable, with visual garbage all over the map... And if we had to use an external tool, we'd be better off with and advanced system like picomap anyway...</p> <p>It would only make sense if someone reprogrammed the map/sprite/flag editor part of pico-8 in pico-8, so the new flag interpretation/map display could be added.</p> <p>Has anyone tried to do that ?</p> https://www.lexaloffle.com/bbs/?tid=147979 https://www.lexaloffle.com/bbs/?tid=147979 Sat, 22 Mar 2025 06:17:59 UTC Discussion about token optimisation, especially aout Beam game <p><a href="https://www.lexaloffle.com/bbs/?uid=27691"> @pancelor</a>, <a href="https://www.lexaloffle.com/bbs/?uid=80228"> @rupees</a>,</p> <p>Pancelor suggested in Beam's thread to start a new thread for technical discussion in order not to clutter the game's thread. I fully agree with the idea and I'm sorry for cluttering.</p> <p>Here's what Pancelor wrote :</p> <ul> <li>you can replace the body of get_random_bird_name() with this: return del(bird_names,rnd(bird_names)) or &quot;&hearts;&quot;</li> <li>you can replace p.velocity_x=p.velocity_x+i_x<em>p.acceleration with p.velocity_x+=i_x</em>p.acceleration, etc</li> <li>you should be able to remove tfnsplit altogether, by saying things like a,b,c,d=unpack_split&quot;1,2&quot; (which does the same thing as a,b,c,d=1,2,nil,nil. this one will probably take some more explanation)</li> </ul> <p>End of Quote</p> <p>About the 3rd point :<br /> when doing a multi assignation, it still works if the number of elements does not match :<br /> a,b,c=1,2,3,4<br /> a is 1, b is 2, c is 3, 4 is discarded.<br /> a,b,c=1,2<br /> a is 1, b is 2, c is nil ([NIL] when printed.)</p> <p>Now a word about what is considered true and false in LUA :<br /> false is false, nil is false, and everything else is true.(including 0, &quot;&quot;, functions... everything is true in LUA)<br /> So if a variable is only ever used as a boolean, having it be nil instead of false will change nothing.<br /> Using unpack_split and putting all the false booleans at the end of the assignation will assign them to nil witch evaluates to false in boolean context.<br /> Similarly, you can use any value instead of true. &quot;String but true&quot; would work just fine for example.<br /> During debugging, I find it useful to be able to distinguish between false for assigned boolean and nil for unassigned, and there are also functions that will treat nil as no parameters passed and behave differently than if false was passed, so I tend to avoid using nil as false, but as a token saving trick for a working program that uses booleans, it's a great trick. Thank you Pancelor.</p> <p>About Pal :<br /> if you still want to change the beam colors and HUD beam squares during the night without changing the colors of the map, You have to change some of the duplicate entries in the display palette for the beam colors.<br /> before calling map(), you have to change the draw palette so the map colors that show as the same color during the night all write the same value to the screen memory. This way, the unused display palette indexes are free to use for the beams. Am I making sense to you ? Do you want an example cart ?</p> https://www.lexaloffle.com/bbs/?tid=146392 https://www.lexaloffle.com/bbs/?tid=146392 Thu, 02 Jan 2025 09:30:48 UTC radio function ? <p>I was browsing the _ENV content, hoping to find the modulo and integer division function exposed (no luck) with this quickly written cart (not even alphabetic sorting)</p> <p> <table><tr><td> <a href="/bbs/?pid=158964#p"> <img src="/bbs/thumbs/pico8_kiyejamose-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=158964#p"> kiyejamose</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=158964#p"> [Click to Play]</a> </td></tr></table> </p> <p>Amongst the unknowns to me, there is a mysterious radio() function.<br /> I tried to call it with different parameters, and only got [nil],0 as return values.<br /> Does anyone know more about that ?</p> https://www.lexaloffle.com/bbs/?tid=145990 https://www.lexaloffle.com/bbs/?tid=145990 Mon, 09 Dec 2024 12:11:52 UTC Populous, using pico-8 to figure it out <p>One of the games I used to play the most was populous.<br /> While some of my friends could play it with beautiful graphics on their amiga or atari ST :</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/populusamiga.png" alt="" /> <p>I was playing on a slow TO-16 PC compatible with CGA graphics and a monochrome green screen. You can't even find an online picture of a setting that bad for this game, the closest I could find online was color CGA that is actually almost as bad looking as the green version.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/popcga.png" alt="" /> <p>Despite the visuals, I was hooked and somehow managed to finish the game (level 400 something), using every possible trick available. (save scumming so the &quot;random&quot; swamps would always spawn under the enemy's knights feet, abusing the bad AI when possible (enemy flood that insta-kill every single enemy unit was the most memorable), using a bug that allowed to raise the terrain to level 1 on levels where it was disabled...).<br /> Despite all that, after level 400, the building speed of the computer was just insane : he would add a block every frame (around 4 times per second on my crappy PC), making enemy progressing absolutely overwhelming.<br /> Given the difficulty of fast and precise clicking (even after removing the dust on the rollers of the mouse), I stood no chance playing the same strategy, so I tried things and found a magic combo : 5 times raising terrain, 5 times lowering, 3 times raising and one time lowering.<br /> With practice, in 14 frames, I could flatted a 6 by 6 square of land lo level 2, where the computer would use 49 frames to flatten the same surface to level 1, one square corner at a time(for way less mana though).<br /> I could never understand at the time why the game would have such an obscure build shortcut.<br /> There also was something both magical and slightly disturbing about the game :<br /> The graphics felt somehow slightly wrong, even on the beautiful amiga/atari versions, yet impossibly easy to read.<br /> In the 2nd screenshot, the castle is a very classic looking isometric view, reminiscent of all the classic of the genre, like marble madness or head over heels for example. But contrary to those games, the slopes are much less &quot;pixel clean&quot;, but you have no problem reading the height of the elements, and somehow you can always see everything, regardless of the terrain.<br /> Because I couldn't figure out why that was the case, I tried to re-make the terrain logic in pico-8.<br /> <table><tr><td> <a href="/bbs/?pid=157085#p"> <img src="/bbs/thumbs/pico8_yoyewawamo-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=157085#p"> yoyewawamo</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=157085#p"> [Click to Play]</a> </td></tr></table> <br /> 1st few tries had the classic isometric look, but the back sides of pyramids was hidden, so I reduced the pixel height between levels and it became more readable, but some big mountain peeks or holes would occupy the same place onscreen as other elements, resulting in a big mess. Still, I was able to display actual terrain copied from screenshots, and that's how I figured out the trick : the game does not allow two touching intersection points (orthogonal or diagonal) to have a difference of height of more than one. If you try, the modification is processed, but then the game also moves the adjacent points that are too far towards the moved point. This can have a cascading effect, and that's where the magic 5 up 5 down 3 up 1 down comes from. It's absolutely not a hidden cheat, but just a consequence of the constrains chosen for the graphics to stay legible at all times and not require any hidden element logic.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/5U5D3U1D.gif" alt="" /> <p>Finally, to view that all terrain stays within its pixel rhombus regardless of terrain, here are the two extremes :</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/extremes.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=145221 https://www.lexaloffle.com/bbs/?tid=145221 Fri, 08 Nov 2024 23:27:02 UTC Xblast demake <p>Hello everyone, I'm thinking about de-making Xblast, a linux clone of bomberman that allows up to 6 players at the same time.<br /> Here's a early WIP screenshot :</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/xblast.png" alt="" /> <p>What I'm worried about now is the 6 players local game play.<br /> On paper, Pico-8 has native support of up to 8 controllers.<br /> I wrote a simple cart that just highlights in red the active buttons of the 8 controllers.<br /> Could anyone confirm that this actually works for up to six controllers before I go further into the dev ?<br /> I'm a bit worried as I've never encountered a pico8 game that plays with more than two controllers at the same time so far.<br /> If you get it it to highlight buttons of players 3 to 7, could you please tell me how you set it up ?</p> <p> <table><tr><td> <a href="/bbs/?pid=155591#p"> <img src="/bbs/thumbs/pico8_zuhapiheku-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=155591#p"> zuhapiheku</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=155591#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=144702 https://www.lexaloffle.com/bbs/?tid=144702 Fri, 11 Oct 2024 09:40:33 UTC Question about metatables and assignation <p>One of the simple examples in the LUA documentation for metamethods is to implement set logic on tables.<br /> s1+s2 returns a new set that is the union of the two by defining __add, s1*s2 returns the intersection thanks to __mul, so far so good.<br /> There is also the very useful __index and __newindex to handle reads and writes to unassigned indexes of the table, but the very important assignation metamethod at table level seem to silently not exist, as if it were of no use.</p> <p>when I do<br /> set1=set2<br /> followed by<br /> set2=set2+{new_elem}</p> <p>I most certainly didn't mean for set1 to be changed.</p> <p>There's of course plenty ow ways to force the behavior I wanted :<br /> set1=set2+{}<br /> would work.<br /> We could define a set_copy function<br /> set1=set_copy(s2)</p> <p>But there seem to be no way to override the assignation behavior, like we would redefine the = operator of a class in C++ for example.</p> <p>Could someone please shed some light on the subject ? What is the reason behind this omission ?<br /> Is there a way to override table assignation that I missed, or maybe a conventional good us of copying objects by value, for objects where it makes more sense ?</p> https://www.lexaloffle.com/bbs/?tid=144354 https://www.lexaloffle.com/bbs/?tid=144354 Sun, 22 Sep 2024 22:26:28 UTC clipboard_setter <p> <table><tr><td> <a href="/bbs/?pid=154064#p"> <img src="/bbs/thumbs/pico8_clipboard_setter-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=154064#p"> clipboard_setter</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=154064#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=144179 https://www.lexaloffle.com/bbs/?tid=144179 Wed, 11 Sep 2024 21:11:16 UTC clip_test <p>WIP experiments with clipboard writing across online carts calling each other.</p> <p>Cart1 building a clipboard and calling cart2</p> <p>Cart2 clipboard info display<br /> <table><tr><td> <a href="/bbs/?pid=154062#p"> <img src="/bbs/thumbs/pico8_clip_test-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=154062#p"> clip_test</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=154062#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=144178 https://www.lexaloffle.com/bbs/?tid=144178 Wed, 11 Sep 2024 20:23:13 UTC Problems pining some BBS users <p>First, a big thank you for fixing the code viewing functionality of BBS pico-8 carts.</p> <p>Now for the ping related problems :</p> <p>when a user has a space or a minus sign in his user name, the ping is either lost, or worse sent to another user :<br /> For example, user Peter Mosevich won't get pinged because of the space, but unrelated user Peter will.</p> <p>Support for something like <a href="https://www.lexaloffle.com/bbs/?uid=87001"> @Peter Mosevich</a> with documentation in the Formatting Help would be welcome.</p> https://www.lexaloffle.com/bbs/?tid=144112 https://www.lexaloffle.com/bbs/?tid=144112 Mon, 09 Sep 2024 11:27:11 UTC Map dimensions and sprite tradeoff <p>A little tool to search for unusual map dimensions and sprite tradeoff<br /> <table><tr><td> <a href="/bbs/?pid=148162#p"> <img src="/bbs/thumbs/pico8_map_tradeoff-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=148162#p"> map_tradeoff</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=148162#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=142180 https://www.lexaloffle.com/bbs/?tid=142180 Thu, 09 May 2024 01:38:22 UTC Has anyone written a print command with flip and rotation (90&deg;) options ? <p>Title says it all.<br /> I'm making a horizontal scrolling game with a map 32 screen wide and 1 screen tall, and with the player using extra colors different from the enemy colors. (enemies can't be over or under the player).<br /> For this, I'm using screen rotation, but now I can't use print to display text any more as it appears rotated.<br /> Has anyone already implemented a 90&deg; rotated print function ?</p> https://www.lexaloffle.com/bbs/?tid=142137 https://www.lexaloffle.com/bbs/?tid=142137 Mon, 06 May 2024 17:16:09 UTC Mamono pico bugfix <p> <table><tr><td> <a href="/bbs/?pid=147977#p"> <img src="/bbs/thumbs/pico8_mamono_pico_fix-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=147977#p"> mamono_pico_fix 0.1</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=147977#p"> [Click to Play]</a> </td></tr></table> </p> <p>A bug fix version of mamono pico by <a href="https://www.lexaloffle.com/bbs/?uid=10158"> @65c02</a><br /> <a href="https://www.lexaloffle.com/bbs/?pid=128341">https://www.lexaloffle.com/bbs/?pid=128341</a></p> <p>Fixed :</p> <ul> <li>crashing at end of levels</li> <li>impossible to win levels</li> <li>not dying when killed by a monster that would have made you level up</li> </ul> <p>Remaining known bugs :</p> <ul> <li>you can mark a monster even after killing it, and this can disable showing the red number of the monster</li> <li>some rare crashes from menu after game over, unknown cause.</li> </ul> <p>Done :</p> <ul> <li>damage is now the same as the original game</li> </ul> <p>Todo :</p> <ul> <li>blank pause menu</li> <li>Remaining ennemy count in status bar</li> <li>timer</li> <li>high scores</li> <li>Max difficulty</li> <li>custom levels</li> <li>wraparoud</li> <li>mage (fireball chording)</li> <li>scout (blind mode)</li> <li>skunk oil</li> <li>achievements</li> </ul> https://www.lexaloffle.com/bbs/?tid=142126 https://www.lexaloffle.com/bbs/?tid=142126 Mon, 06 May 2024 09:24:40 UTC Map sandbox <p> <table><tr><td> <a href="/bbs/?pid=146772#p"> <img src="/bbs/thumbs/pico8_wukerebajo-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=146772#p"> wukerebajo</a><br><br> by <a href="/bbs/?uid=82211"> RealShadowCaster</a> <br><br><br> <a href="/bbs/?pid=146772#p"> [Click to Play]</a> </td></tr></table> <br /> Just a sandbox to get a better understanding of what happens when you change the map width (0x5f57) and the map address (0x5F56)<br /> Upper memory 0x8000-0xFFFF is fully initialized to 53 (blue square sprite)<br /> Arrow keys to move the camera<br /> X / O to change the map width<br /> pause menu to change what X/O changes between map width and map address.</p> https://www.lexaloffle.com/bbs/?tid=141767 https://www.lexaloffle.com/bbs/?tid=141767 Tue, 16 Apr 2024 16:01:46 UTC Can't see cart's code from the BBS any more <p>Title says it all.<br /> Problem is the same on firefox and safari on Mac, and on safari on iPhone.<br /> Embed arrow still works, so you can still get the cart's id from it and view the game's code in pico-8's editor.</p> https://www.lexaloffle.com/bbs/?tid=141426 https://www.lexaloffle.com/bbs/?tid=141426 Wed, 03 Apr 2024 21:32:02 UTC Rounding errors and tables <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/82211/madness.png" alt="" /> <p>I've spent two hours fixing a nasty bug. The image above is essentially the bug I was trying to fix, except all the steps were spread in three functions, and took a good minute of playing on average before everything aligned just right (or just wrong depending on how you look at it) for it to seemingly randomly occur.<br /> Can you figure out why t[2] is not 8 in the end ?</p> <p>Hint : Lua arrays and # operator are cursed.</p> <p>Ideally, I'd like the game to crash at t[i]=8 if possible. Anyone knows if you can add some sanity checks to all array accesses ?</p> https://www.lexaloffle.com/bbs/?tid=140988 https://www.lexaloffle.com/bbs/?tid=140988 Fri, 22 Mar 2024 11:09:37 UTC Thumbnail as data ? <p>A lot of old games save space by using the same data for multiple purposes. I&rsquo;ve seen code used as graphics, code inside graphics, graphics containing map data, and was daydreaming what parts of pico8 could be interesting to use as double purpose.<br /> The game thumbnail seems very promising : 128x128 32 Colors is 10Kb worth which is pretty big for pico8.<br /> There &acute;s nohing in the api related to it, just a keyboard shortcut to save the current screen to it. It&rsquo;s hidden when using the built in editor, but you can see it when viewing a .p8 file.</p> <p>I&rsquo;m a newbie in lua, and don&rsquo;t know if it&rsquo;s a valid lua section, or maybe a type of multi line named comment designed for documentation for example.<br /> Or maybe it&rsquo;s just part of the .p8 format and never passed to the interpreter ?<br /> If there&rsquo;s a way in code to interact with it, I&rsquo;d love to know.<br /> Or maybe the source code is somehow in the scope of the program and can be opened and parsed ?</p> https://www.lexaloffle.com/bbs/?tid=139782 https://www.lexaloffle.com/bbs/?tid=139782 Wed, 10 Jan 2024 15:06:29 UTC