impbox [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=10242 Pico Physics <p> <table><tr><td> <a href="/bbs/?pid=21915#p"> <img src="/bbs/thumbs/pico21913.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=21915#p"> Pico Physics</a><br><br> by <a href="/bbs/?uid=10242"> impbox</a> <br><br><br> <a href="/bbs/?pid=21915#p"> [Click to Play]</a> </td></tr></table> </p> <p>After debugging some physics issues in <a href="https://www.lexaloffle.com/bbs/?pid=15562&amp;amp;tid=2243">PICORACER-2048</a> I decided to make a little area to play around with improving the physics and collisions.</p> <p>I'm using the &quot;Separating Axis Theorem&quot; to find collisions, and clipping to find the contact points.</p> <p>Lots of work to do still, many optimisations can be made.</p> <p>Known issues: contact points are sometimes broken, collision response is not always right.</p> <p>Optimisations to make: </p> <ul> <li>cache AABB</li> <li>cache world polygons</li> <li>don't check AABBs that are not in the same area</li> <li>don't check equivalent axes more than once</li> <li>remember the previous axis since it's likely to be the same or next to it on the next iteration.</li> </ul> https://www.lexaloffle.com/bbs/?tid=3512 https://www.lexaloffle.com/bbs/?tid=3512 Tue, 31 May 2016 10:51:48 UTC Coroutines <p>Pico8 0.1.6 added coroutines!</p> <p>coroutines are really handy if you want to trigger an action once and then have it continue to do stuff for a while in the &quot;background&quot;.</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> actions = {} function press_mysterious_button() local c = cocreate(function() for i=1,10 do launch_special_fx() yield() yield() yield() yield() end end) add(actions,c) function _update() for c in all(actions) do if costatus(c) then coresume(c) else del(actions,c) end end 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 above code when the mysterious button is pressed will create a new coroutine (cocreate) which will launch special fx every 4 frames, 10 times and then it will be completed.</p> <p>each loop of _update it'll run any actions up to the next &quot;yield&quot; and then return. when the action is complete, we remove the dead actions from the table.</p> <p>hope that makes sense and is helpful!</p> https://www.lexaloffle.com/bbs/?tid=3458 https://www.lexaloffle.com/bbs/?tid=3458 Thu, 26 May 2016 10:51:55 UTC Raincoat WIP <p> <table><tr><td> <a href="/bbs/?pid=17084#p"> <img src="/bbs/thumbs/pico17083.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=17084#p"> Raincoat 0.1</a><br><br> by <a href="/bbs/?uid=10242"> impbox</a> <br><br><br> <a href="/bbs/?pid=17084#p"> [Click to Play]</a> </td></tr></table> </p> <p>WIP for P8JAM1 &quot;Rain&quot;</p> <p>My first real attempt at a platformer.</p> <p>Currently struggling with the buoyancy, and still need to add water pressure but it's starting to come together.</p> <p>Hope is to make an interesting puzzle platformer utilising the rising water and flow mechanics.<br /> Switches to toggle floodgates and things.</p> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/deluge13.gif" alt="" /> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/deluge14.gif" alt="" /> <p>Rescue the kitty from the rain!</p> https://www.lexaloffle.com/bbs/?tid=2821 https://www.lexaloffle.com/bbs/?tid=2821 Thu, 26 Nov 2015 20:59:53 UTC Horrible token saving method! <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> foo() -- 3 tokens foo&quot;&quot; -- 2 tokens </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>when calling an argument where arguments are not used, note this is the same as passing an empty string, not nil!</p> <p>you can also call a function and pass a single table using</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> foo{1,2,3,4} --which is cheaper than foo({1,2,3,4}) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>use with care! =)</p> https://www.lexaloffle.com/bbs/?tid=2515 https://www.lexaloffle.com/bbs/?tid=2515 Thu, 24 Sep 2015 09:48:55 UTC PicoLove - Pico-8 Emulator in Love2D <p>Hi y'all!</p> <p>I've been working on a reimplementation of Pico-8 in Love2D (Another lua game framework)<br /> Mainly because I wanted to keep working on my games after I hit the token limits in Pico-8<br /> but didn't want to lose the pico-8 feel and start from scratch.</p> <p>So I'm sharing picolove with you, can grab the source on github.</p> <p><a href="https://github.com/ftsf/picolove"><a href="https://github.com/ftsf/picolove">https://github.com/ftsf/picolove</a></a></p> <p>Requires Love2D 0.9.x from <a href="https://love2d.org"><a href="https://love2d.org">https://love2d.org</a></a></p> <p>Can run a p8 cart with </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> love . cartname.p8 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>You can modify the love.load function to load a specific cartridge and package it into a .love file (renamed .zip) to distribute.</p> <p>Have fun!!</p> <p>Let me know about any bugs you find.</p> <p>I know there's some issues with removing stuff with del in a foreach loop (causes a bug in celeste.p8), but not sure what's going on there.</p> <p>Working on adding SFX and Music support as well as p8.png loading.</p> https://www.lexaloffle.com/bbs/?tid=2444 https://www.lexaloffle.com/bbs/?tid=2444 Wed, 09 Sep 2015 08:50:38 UTC Pico Music Studio <p> <table><tr><td> <a href="/bbs/?pid=12680#p"> <img src="/bbs/thumbs/pico12679.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=12680#p"> Pico Music Studio 0.1.0</a><br><br> by <a href="/bbs/?uid=10242"> impbox</a> <br><br><br> <a href="/bbs/?pid=12680#p"> [Click to Play]</a> </td></tr></table> </p> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/picomusic2.gif" alt="" /> <p>I wanted to experiment with modifying SFX data via a cart.</p> <p>Features:</p> <ul> <li>Compose and edit music</li> <li>Copy and Paste selections within patterns and between patterns</li> <li>Transpose selection by octaves</li> <li>Save to cart</li> </ul> <p>Known issues:</p> <ul> <li>Modifying selections only works if the selection was made in a leftwards direction.</li> <li>The music staff isn't actually accurate at all. It just uses one px per semitone.</li> <li>Green play line isn't always accurate if you've changed the speed or pattern length, restarting playback fixes it.</li> </ul> <p>SFX Data Layout for anyone interested:</p> <p>Starting from 0x3200<br /> Blocks of 68 bytes for each SFX pattern 64 bytes of sound data and then 4 bytes of metadata.</p> <p>Each sound data chunk is made of a 16 bit value divided into<br /> 6 bits for the note, 3 bits for the instrument, 3 bits for the volume, 3 bits of the FX, 1 bit unused.</p> <p>0bUFFFVVVIIINNNNNN</p> <p>byte 65 is the speed<br /> byte 66 is loop start<br /> byte 67 is the loop end</p> https://www.lexaloffle.com/bbs/?tid=2273 https://www.lexaloffle.com/bbs/?tid=2273 Sat, 15 Aug 2015 10:29:45 UTC PICORACER-2048 <p> <table><tr><td> <a href="/bbs/?pid=12408#p"> <img src="/bbs/thumbs/pico16305.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=12408#p"> PICORACER-2048 1.5.0</a><br><br> by <a href="/bbs/?uid=10242"> impbox</a> <br><br><br> <a href="/bbs/?pid=12408#p"> [Click to Play]</a> </td></tr></table> </p> <p>UPDATE 2017-05-16:</p> <p><a href="https://impbox.itch.io/vektor2089">VEKTOR2089</a> is now up for early access on itch.io!</p> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/vector-race.gif" alt="" /> <p>Features:</p> <ul> <li>Split screen multiplayer</li> <li>Trackmania style hotseat multiplayer</li> <li>Track editor</li> <li>60 fps</li> <li>Multiple cars to choose from with different feels and styles</li> <li>4 speed classes</li> <li>Maybe a story mode, we'll see!</li> </ul> <p>New in 1.5.0beta:</p> <ul> <li>8 set looping tracks, 3 laps each</li> <li>Level editor (needs some more work)</li> </ul> <p>Missing some stuff from the previous version that still needs to be fixed up:</p> <ul> <li>Boosters</li> <li>Narrowing tracks</li> <li>Time attack replays</li> </ul> <p>Wipeout inspired racing game!</p> <p>Z to ACCEL<br /> X to BRAKE<br /> UP to BOOST<br /> LEFT and RIGHT to STEER</p> <p>Q for MENU</p> <p>Update 1.2.0:</p> <ul> <li>Reduced token usage</li> <li>Multiple difficulty levels (Easy, Medium, Hard (original difficulty))</li> </ul> <p>Update 1.1.0:</p> <ul> <li>Somewhat easier AI, might actually be possible to beat them now</li> <li>Sharper turning circle</li> <li>Nerfed boosting a bit</li> <li>Boosted normal acceleration</li> <li>Reduced ship size slightly</li> <li>Warnings about upcoming turns and narrowing</li> <li>Performance improvements</li> </ul> <p>Challenge your ghost or AI racers.</p> <p>now with music + sound!<br /> 5 difficulty levels<br /> in game menu<br /> parallax scrolling foreground</p> https://www.lexaloffle.com/bbs/?tid=2243 https://www.lexaloffle.com/bbs/?tid=2243 Fri, 07 Aug 2015 11:42:39 UTC PICO8 MIXUP JAM! <p>OK here's an idea for a little pico8 gamejam.</p> <p>48 hours over a weekend.</p> <p>Day 1. Come up with a game, (it should have the basic mechanics and gameplay but doesn't need to be polished, leave some space for day 2: 4096 token limit!!!) and submit it here.</p> <p>Day 2. It gets given to another jammer at random to complete and polish.</p> <p>It'll be a good way to see how other people work and forces you to do both the game design and the polishing/juicing sides.</p> <p>What do you think?</p> https://www.lexaloffle.com/bbs/?tid=2215 https://www.lexaloffle.com/bbs/?tid=2215 Sun, 02 Aug 2015 22:36:39 UTC Feature Request: assert and log and backtrace <p>One thing that would be super handy for development in Pico-8 is an &quot;assert&quot; function which throws an error when a condition isn't met and can optionally print something in response, like the standard lua one.</p> <p>eg.</p> <p>assert(x != 0,&quot;this shouldn't happen&quot;)</p> <p>Another nice thing would be a way to write output to a console. you can do this with print, but it usually gets overwritten immediately and lost in the event you need to check up on some history.</p> <p>log(&quot;frame: &quot;..frame..&quot; x is &quot;..x)</p> <p>also showing a full backtrace on error rather than only the head of the stack would be super helpful.</p> https://www.lexaloffle.com/bbs/?tid=2204 https://www.lexaloffle.com/bbs/?tid=2204 Sat, 01 Aug 2015 04:48:37 UTC Feature request: Save/load state <p>It'd be awesome to be able to save/load state in your game like old console games.</p> <p>Maybe a small per/game buffer we can read from/write to.<br /> Or a virtual memory card type device we can access.</p> https://www.lexaloffle.com/bbs/?tid=2192 https://www.lexaloffle.com/bbs/?tid=2192 Fri, 31 Jul 2015 00:22:48 UTC Tempest <p> <table><tr><td> <a href="/bbs/?pid=12030#p"> <img src="/bbs/thumbs/pico40278.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=12030#p"> Tempest</a><br><br> by <a href="/bbs/?uid=10242"> impbox</a> <br><br><br> <a href="/bbs/?pid=12030#p"> [Click to Play]</a> </td></tr></table> </p> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/tempest/washedup2.gif" alt="" /> <p>Update:</p> <p>Finally fixed the map issue from changes in Pico8 and fixed the 10 minute game freeze bug.<br /> Some dialog stuff and fixed a bunch of bugs, cabins now work and there are caves you can rest in.</p> <p>How to survive your first day:</p> <ul> <li>When you wash up you're nearly dead, hungry, tired, and exhausted.</li> <li>Your health will drop if any statuses (hungry,tired,exhausted,cold) are in the red.</li> <li>Resting while your statuses are ok will restore health</li> <li>Quickly drink some water from your flask. (x -&gt; items -&gt; flask -&gt; drink)</li> <li>Find some fruit/berries and pick them then eat them.</li> <li>Salvage wood from your boat, and chop down another tree and get the logs</li> <li>Build a shelter, eat, drink and rest, stay warm</li> <li>After this, focus on finding freshwater (it has white sparkles) so you can drink and fill your flask</li> <li>Then try and find some stone and build a cabin which will replenish your stamina fully</li> <li>Build bridges to new areas</li> </ul> <p>Features:</p> <ul> <li>Day night cycle</li> <li>Weather</li> <li>Temperature (it's colder at night and when it's raining, stay warm in your shelter/cottage)</li> <li>Simple menu system</li> <li>Procedurally generated world</li> <li>Bridge building</li> <li>Building wells that fill with water when it rains</li> <li>Plants grows overnight while you're resting</li> </ul> <ul> <li>In progress <ul> <li>Farms and farming</li> </ul></li> </ul> <p>Plans</p> <ul> <li>Fishing minigame</li> <li>Wild animals and fences to keep safe</li> <li>Disallow some stuff at night to incentivise you to work during the day</li> </ul> <p>I suspect code size optimisation will be quite critical =\</p> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/tempest/snow.gif" alt="" /> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/tempest/daynight.gif" alt="" /> <img style="margin-bottom:16px" border=0 src="http://static.impbox.net/tempest/action.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=2186 https://www.lexaloffle.com/bbs/?tid=2186 Wed, 29 Jul 2015 23:46:33 UTC IRC Channel <p>Hi! I'm enjoying getting started with Pico-8!</p> <p>Does anyone here use IRC or is there already a pico8 channel somewhere?</p> <p>Happy to start one if not.</p> https://www.lexaloffle.com/bbs/?tid=2175 https://www.lexaloffle.com/bbs/?tid=2175 Tue, 28 Jul 2015 02:18:58 UTC