mole5000 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=24317 Afterburner Font <p>Who wants the Afterburner Font on a sprite sheet. Do you? Yes you do. Have at it.</p> <p>Transcribed from them lovely &quot;Arcade Game Typography&quot; by Toshi Omagari, published by Read Only Memory</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/24317/afterburner.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=51256 https://www.lexaloffle.com/bbs/?tid=51256 Thu, 19 Jan 2023 14:46:09 UTC Lights Out Together <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/24317/lightsouttogether_0.png" alt="" /> <p>Following on from my smash hit Lights Out Cart (hey, someone gave it a star, that counts) I've hacked it together to give you...</p> <p>MASSIVELY MULTIPLAYER LIGHTS OUT</p> <p>That's right, you and hundreds of other people around the world can attempt to solve a 16x16 lights out grid. Together!</p> <p><a href="http://geometricgames.com/lotw/lightsouttogether.html">http://geometricgames.com/lotw/lightsouttogether.html</a></p> <p>This is sooooooooo just barely working so please excuse it being terrible!</p> <p>Let me no here or on twitter ( @twitonatrain ) if anything is terribly wrong.</p> https://www.lexaloffle.com/bbs/?tid=45967 https://www.lexaloffle.com/bbs/?tid=45967 Sun, 02 Jan 2022 11:26:23 UTC Lights Out <p> <table><tr><td> <a href="/bbs/?pid=103130#p"> <img src="/bbs/thumbs/pico8_fuhususote-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=103130#p"> fuhususote</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=103130#p"> [Click to Play]</a> </td></tr></table> </p> <p>A classic.<br /> With screen shake.</p> <p>Just getting back into the flow of programming actual games rather than tweetcarts on the pico-8</p> <p>For those who don't know you are trying to turn off all the lights. When you click a square it inverts the light not just on the square itself but also the squares above, below, left and right as well.</p> https://www.lexaloffle.com/bbs/?tid=45760 https://www.lexaloffle.com/bbs/?tid=45760 Sun, 19 Dec 2021 20:25:48 UTC Pico8 Ray Tracer <p>This is a simple brute force raytracer based on the excellent book &quot;Ray Tracing in One Weekend&quot; It will take approximately 2 hours to render the image in the preview! The slowness is mostly caused by there being no form of object hierarchy so every single sphere is being test for every single ray generated. There's a lot of sphere's so that's a lot of calculations.</p> <p>The ray tracer produced by following Ray Tracing in One Weekend is really simple and straightfoward, as a result I think this is a great cart to look at if you want to get a handle on Ray Tracing. You probably don't want to run the cart as is but nick the code and play around with a scene yourself.</p> <p> <table><tr><td> <a href="/bbs/?pid=81341#p"> <img src="/bbs/thumbs/pico8_yizokigaga-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=81341#p"> yizokigaga</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=81341#p"> [Click to Play]</a> </td></tr></table> </p> <p>If you look at the end of the code it should be pretty clear how the scene is described (simply adding sphere's to the things table). There is also the &quot;fast&quot; option. If you set that to TRUE then the pico8 will switch to 64x64 mode and only do 1 sample per pixel. It's a great way of making sure you have setup a scene correctly before doing a longer render.</p> <p>Finally I have also implemented checkerboard material as well called CHECK which does black and vec(r,g,b) colour of your choice squares.</p> <p>I aim to improve this cart somewhat before moving into the next book (Ray Tracing the Next Week): the main thing is to improve the colour mapping. At the moment I simply map to the closest Pico8 colour from the default palette in RGB space. I'd quite like to pick a best possible monochrome (or at least two 8-colour monochrome palettes) to produce smoother images as some of the colour transitions are quite jarring at the moment</p> https://www.lexaloffle.com/bbs/?tid=39422 https://www.lexaloffle.com/bbs/?tid=39422 Sat, 29 Aug 2020 16:07:34 UTC Start of a sports game <p> <table><tr><td> <a href="/bbs/?pid=72074#p"> <img src="/bbs/thumbs/pico8_rugbysports-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=72074#p"> rugbysports</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=72074#p"> [Click to Play]</a> </td></tr></table> <br /> Started noodling with a sports game, probably going to be rugby.</p> <p>My dream has alwasy been to produce a rugby game as good as the mid ninties Jonah Lomu Rugby, never been bettered</p> <p>What I've got here is two 7 a side teams randomly distributed over the pitch with a physics engine to resolve collisions.</p> <p>From small acorns things grow and such like</p> https://www.lexaloffle.com/bbs/?tid=36545 https://www.lexaloffle.com/bbs/?tid=36545 Sat, 18 Jan 2020 22:07:08 UTC Lines of Action <p> <table><tr><td> <a href="/bbs/?pid=51218#p"> <img src="/bbs/thumbs/pico51217.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=51218#p"> Lines of Action 1.0</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=51218#p"> [Click to Play]</a> </td></tr></table> </p> <p>So this is mostly for those of you who are thinking about ChessJam and wondering if the Pico8 is tough enough for the job.</p> <p>The answer is clearly &quot;Yes!&quot; (1). Here is my implementation of a Sid Sackson classic board game Lines of Action. OF interest is that I'm using Negamax, bit boards and the 0x4300 user memory for the storing thereof.</p> <p>There is unfortunately some kind of bug hiding in my (horrible, horrible) code that means the smart AI occasionally glitches the game state. I did mostly write this late at night during a period I wasn't sleeping well. I am very hapy with the code about the menus though.</p> <p>(1) People have managed to fit (most of chess) into a ZX81 (that's a whole 1K of ram they were working with). <a href="http://users.ox.ac.uk/~uzdm0006/scans/1kchess/">http://users.ox.ac.uk/~uzdm0006/scans/1kchess/</a></p> https://www.lexaloffle.com/bbs/?tid=31071 https://www.lexaloffle.com/bbs/?tid=31071 Mon, 02 Apr 2018 16:42:27 UTC CoRoutine Drawing System <p> <table><tr><td> <a href="/bbs/?pid=42481#p"> <img src="/bbs/thumbs/pico42480.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=42481#p"> Drawing System</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=42481#p"> [Click to Play]</a> </td></tr></table> </p> <p>So I went a little crazy after doing my contribution for the invent a title screen thread. I thought it would be nice if the two Gs drew at the same time and I came to the conclusion (in a huge leap) that the best way of doing it would be to some kind of co-operative multitasking co-routine system.</p> <p>It doubled the token count from 200ish to 400ish but I'me pretty happy with it and I think it works well as a demonstration of the power of closures and co-routines.</p> <p>EDIT: So the library is based around additive drawing - there is no clearing of screen state between each frame so everything builds up. My next plan is to build a &quot;display list&quot; system when you can attach co-routines to properties of each display item to animate them - more flexible than this current system.</p> https://www.lexaloffle.com/bbs/?tid=29649 https://www.lexaloffle.com/bbs/?tid=29649 Fri, 14 Jul 2017 16:31:30 UTC Dither Line Function <p> <table><tr><td> <a href="/bbs/?pid=41918#p"> <img src="/bbs/thumbs/pico41917.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=41918#p"> Dither Line</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=41918#p"> [Click to Play]</a> </td></tr></table> </p> <p>While working on my 3d engine I've written a function that I think would be generally useful and I haven't seen it done before. It draws horizontal dithered lines such that odd and even rows have an alternating checkerboard pattern. Code is obviously in the cart but I post below as well.</p> <p>The code runs just as fast the native LINE function but with the bonus of optional dithered-e-ness</p> <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 dither(sx,ex,y,draw_colour,shade_colour) if (sx&lt;0 and ex&lt;0) or (sx&gt;127 and ex&gt;127) then return end sx = max(0,min(sx,127)) ex = max(0,min(ex,127)) if ex &lt; sx then sx,ex = ex,sx end local sos = sx % 2 local eos = ex % 2 local yind = y*64+0x6000 local ctu = -1 if y%2 == 0 then ctu = draw_colour else ctu = shade_colour end if sos == 1 then sx -= 1 poke(yind+sx/2, bor(band(peek(yind+sx/2),0x0f), band(0xf0,ctu))) sx += 2 end if eos == 0 then poke(yind+flr(ex/2), bor(band(peek(yind+ex/2),0xf0),band(0x0f, ctu))) ex -= 1 end memset(yind +sx/2,ctu, (ex/2-sx/2)+1) end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>The tricky bit being to deal with the start and end of the line when they do no perfectly align with the byte boundaries.</p> https://www.lexaloffle.com/bbs/?tid=29533 https://www.lexaloffle.com/bbs/?tid=29533 Sat, 24 Jun 2017 17:38:42 UTC Wireframe 3d Tech Demo <p> <table><tr><td> <a href="/bbs/?pid=41580#p"> <img src="/bbs/thumbs/pico41579.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=41580#p"> Wireframe 3d Tech Demo 0.1</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=41580#p"> [Click to Play]</a> </td></tr></table> </p> <p>I've finally managed to get a clean, 3d wireframe engine up and running. It does backface culling but otherwise is as plain as it comes.</p> <p>Working through the maths and pulling together from various sources was a pain as writing a software renderer is a bit of a lost art form with D3d/OpenGl doing all the maths for you these days. </p> <p>So I thought people might appreciate a simple example to start from.</p> <p>THis doesn't do any camera transforms - the camera is at 0,0 starting down the z-axis.</p> https://www.lexaloffle.com/bbs/?tid=29476 https://www.lexaloffle.com/bbs/?tid=29476 Tue, 13 Jun 2017 09:11:26 UTC Low to High <p> <table><tr><td> <a href="/bbs/?pid=40586#p"> <img src="/bbs/thumbs/pico40585.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=40586#p"> Low to High 1.0</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=40586#p"> [Click to Play]</a> </td></tr></table> </p> <p>Another memory game to go along with my earlier &quot;Simon Says&quot; game.</p> <p>I really loved the low-to-high game from Brain Training so thought I would implement it here. If I take this any further the I think I'd double the size of the tiles and make my own font as I have difficulty 'scanning' the numbers with Pico's default font.</p> <p>My personal high score on this Pico version is 9 numbers cleared (I was way better at the DS version!)</p> https://www.lexaloffle.com/bbs/?tid=29326 https://www.lexaloffle.com/bbs/?tid=29326 Sun, 14 May 2017 16:41:38 UTC Simon Says <p> <table><tr><td> <a href="/bbs/?pid=40458#p"> <img src="/bbs/thumbs/pico40457.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=40458#p"> Untitled</a><br><br> by <a href="/bbs/?uid=24317"> mole5000</a> <br><br><br> <a href="/bbs/?pid=40458#p"> [Click to Play]</a> </td></tr></table> </p> <p>A rough and ready &quot;Simon Says&quot; game I hacked together in a few hours. Use the arrow key to play the appropriate triangles and follow the sequence. What high score can you get?</p> <p>I am inordinately proud of the code that draws the triangles as I got it right first time.</p> https://www.lexaloffle.com/bbs/?tid=29302 https://www.lexaloffle.com/bbs/?tid=29302 Thu, 11 May 2017 11:05:50 UTC