Mot [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=39676 Instant Replays! <h1>Add an instant replay to your game!</h1> <img style="" border=0 src="/media/39676/replaytest3_1.gif" alt="" /> <p>(Shown here: <a href="https://www.lexaloffle.com/bbs/?pid=37086">OMEGA ZONE</a> by <a href="https://www.lexaloffle.com/bbs/?uid=12489"> @kometbomb</a>)</p> <p>New from the mind that brought you <a href="https://www.lexaloffle.com/bbs/?pid=106313">Instant 3D!</a> and still hasn't apologized, <strong>Instant Replays!</strong></p> <p>Paste this snippet into the end of your game and be <em>amazed at your new replay capabilities</em>!!! Or it could <em>fail completely</em>! That's the mystery of it!!!</p> <div> <div style="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>do local prev={ _update=_update, _update60=_update60, _draw=_draw, btn=btn, btnp=btnp } local bstate,pstate,addr,isplay={},{},0x8000,false local function updatebtns() for i=0,5 do pstate[i]=bstate[i] end if isplay then local mask=peek(addr) addr+=1 if(mask==0xff)run() for i=0,5 do bstate[i]=mask&amp;(1&lt;&lt;i)~=0 end else local mask=0 for i=0,5 do bstate[i]=prev.btn(i) if(bstate[i]) mask|=1&lt;&lt;i end if addr&lt;0x8000+0x42ff then poke(addr,mask) addr+=1 end end end local function doreplay() poke(addr,0xff) memcpy(0,0x8000,0x4300) cstore(0,0,0x4300,&quot;mot_replay.p8&quot;) dset(63,1) run() end cartdata(&quot;replay&quot;) cartdata=function() end isplay=dget(63)==1 if not isplay then local seed=rnd(0xffff.ffff) poke4(addr,seed)addr+=4 srand(seed) menuitem(5,&quot;replay&quot;,doreplay) else reload(0,0,0x4300,&quot;mot_replay.p8&quot;) memcpy(0x8000,0,0x4300) reload(0,0,0x4300) local seed=peek4(addr)addr+=4 srand(seed) menuitem(5,&quot;end replay&quot;,function()dset(63,0)run()end) end if _update then _update=function() updatebtns() prev._update() end end if _update60 then _update60=function() updatebtns() prev._update60() end end btn=function(i) return bstate[i] end btnp=function(i) return bstate[i] and not pstate[i] end _draw=function() prev._draw() camera() clip() if isplay then print(&quot;replay&quot;,103,121,8) else print(((addr-0x8000)/0x4300*100\1)..&quot;%&quot;,115,121,8) 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>Okay, I've exceeded by exclamation point quota.</p> <p>This is a little experiment in capturing the player's input and replaying it exactly as before in order to make the game play out exactly the same way - assuming everything goes to plan.</p> <p>To use, paste the snippet into the end of you cart, after the existing code. Then play the game for a minute and select &quot;Replay&quot; from the pause menu. The replay will continue looping until you select &quot;End replay&quot; from the pause menu.</p> <p>Note - There are a bunch of requirements/caveats for this to actually work:</p> <ul> <li>Your game must be controlled by the player 1 gamepad only. Player 2 controls, mouse, keyboard etc is not captured.</li> <li>Pico-8 must be able to read/write to an external cart (named &quot;mot_replay.p8&quot;). I don't think this will work in binary/web exports.</li> <li>Your game must not use: <ul> <li>Pico-8 memory above 0x8000</li> <li>Menu item slot 5</li> <li>Cart data slot 63</li> </ul></li> <li>The snippet will hijack your cart data and use cartdata(&quot;replay&quot;) instead</li> <li>Replays cut off after 10 minutes or so due to limited storage space.</li> </ul> <p>And there's probably other ways it can fail that I haven't thought of :-). Try it and see..</p> <p>A few games it seems to work with:</p> <img style="" border=0 src="/media/39676/harold s bad day 1 4_0.png" alt="" /> <p><a href="https://www.lexaloffle.com/bbs/?pid=harold-4">Harold's Bad Day</a> by <a href="https://www.lexaloffle.com/bbs/?uid=18117"> @biovoid</a></p> <img style="" border=0 src="/media/39676/phoenix_0.png" alt="" /> <p><a href="https://www.lexaloffle.com/bbs/?pid=phoenix08-0">Phoenix</a> by <a href="https://www.lexaloffle.com/bbs/?uid=33292"> @pahammond</a><br /> (Had to remove the cartdata() call from the snippet)</p> <img style="" border=0 src="/media/39676/ninja cat 1 0_1.png" alt="" /> <p><a href="https://www.lexaloffle.com/bbs/?pid=ninjacat-10">Ninja Cat</a> by <a href="https://www.lexaloffle.com/bbs/?uid=42963"> @cubee</a><br /> (Had to remove the cartdata() call from the snippet)</p> <img style="" border=0 src="/media/39676/superdiscbox_0.png" alt="" /> <p><a href="https://www.lexaloffle.com/bbs/?pid=superdiscbox-0">Super Disc Box</a> by <a href="https://www.lexaloffle.com/bbs/?uid=31740"> @Farbs</a></p> https://www.lexaloffle.com/bbs/?tid=46467 https://www.lexaloffle.com/bbs/?tid=46467 Sun, 06 Feb 2022 08:55:00 UTC Mot's Grand Prix track editor <p> <table><tr><td> <a href="/bbs/?pid=97963#p"> <img src="/bbs/thumbs/pico8_mot_grandprix_editor-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=97963#p"> mot_grandprix_editor</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=97963#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is the track editor for <a href="https://www.lexaloffle.com/bbs/?pid=mot_grandprix-4">Mot's Grand Prix</a></p> <p><strong>I don't recommend running this in browser as you cannot save/load tracks - anything you build will be lost.<br /> Rather download the file and run it in Pico-8 itself.</strong><br /> You will also need to download the main game and run it in Pico-8 in order to race on any tracks you create.</p> <p>This editor requires a keyboard and mouse.</p> <h2>Existing tracks</h2> <p>You can download the tracks from the existing game from this <a href="https://drive.google.com/drive/folders/1HVgyvdYYF_-AOY7YqfM-8yNggZ19gJ2A?usp=sharing">Google Drive folder</a>. Place them in your carts folder (next to the editor) then select &quot;Load&quot; from the editor hamburger menu (top right) to load them.</p> <h2>Basic usage</h2> <p><strong>IMPORTANT: There are known bugs that will crash the editor, so save often!</strong></p> <ul> <li>Use the arrow keys to scroll along the track.</li> <li>Use the hamburger menu (top right) to load save and export tracks.</li> <li>The &quot;New&quot; menu creates new stages, curves and items (described in detail further down).</li> <li>Click &quot;Drive&quot; to drive on the track (select &quot;Editor&quot; from the pause menu to return to the editor).</li> <li>Select things by clicking on them. You can then edit their properties, or delete them by clicking &quot;-&quot;.</li> <li>After making a change you usually have to click &quot;Update&quot; (bottom right) to update the visual model (I didn't have enough tokens to make this automatic).</li> </ul> <h2>Track format</h2> <p>The basic components of a race track are:</p> <ul> <li>Stages</li> <li>Curves</li> <li>Items</li> </ul> <h3>Stages</h3> <p>Are used to partition the race track. Every track must have at least one stage.<br /> The advantage of having multiple stages is that their curves and items are stored independently of the other stages, so if you modify the curves in a stage you only need to fixup the positions of the background items within that stage. Also they can help you keep track of what part of the track you are working on.</p> <p>Click &quot;New-&gt;Stage&quot; to add a new stage. The new stage will be inserted immediately after the current stage.</p> <p>The current stage is displayed top-left underneath the menu bar.</p> <img style="" border=0 src="/media/39676/Screenshot 2021-09-29 200847.png" alt="" /> <p>You can click on the name to edit it. Or click &quot;-&quot; to delete it.<br /> Deleting a stage deletes all its curves and background items, so be careful.</p> <h3>Curves</h3> <p>Curves define the shape of the race track, i.e. the corners, straights, hills, valleys etc.<br /> <em>Note: Despite the name a &quot;curve&quot; doesn't have to actually curve. It can be completely straight.</em></p> <p>Click on the race track itself to select a curve.</p> <p>Click &quot;New-&gt;Curve&quot; to add a new curve.<br /> If a curve is already selected, the new curve will be inserted immediately before it in the current stage.<br /> If no curve is selected, the new curve will be added to the end of the current stage.<br /> To delete the curve, select it and click the &quot;-&quot; button next to the curve (NOT the one next to the stage!)</p> <p>Edit the curves properties to modify it.<br /> Most properties are edited using sliders. Drag with the left mouse for small increments and right mouse for large.<br /> <strong>Remember to click &quot;Update&quot; to see the result of a change.</strong></p> <img style="" border=0 src="/media/39676/mot_grandprix_edit_4.png" alt="" /> <ul> <li><strong>Length</strong> = Length of the curve in units (units are about 4-10 meters long - scale isn't very accurate in this game)</li> <li><strong>Turn</strong> = How sharply the road turns. 0 is straight, negative values turn left, positive turn right.<br /> For reference the hairpin turn in &quot;Suzuka&quot; is -0.32, which is close to the limit of how sharply cars can corner in this game.</li> <li><strong>Pitch</strong> = Vertical gradient. 0 is flat, -1 is up 45 degrees, 1 is down 45 degrees.<br /> Pitch is an optional property. Tick the tick-box to enable it. If omitted the pitch from the previous curve will be used.<br /> Pitch is linearly interpolated. The value you set is actually the pitch at the <em>end</em> of the current curve. It will smoothly transition from the previous pitch to that value across the curve.</li> <li><strong>Left/Right</strong> = Define the horizontal range, i.e. how far left/right cars can go without crashing into a barrier.<br /> The left and right barriers are visually represented by the &quot;L Barrier&quot; and &quot;R Barrier&quot; settings below. It's a good idea to set these - otherwise the player will simply crash into an invisible barrier.<br /> The road is 8 units wide, so the &quot;Left&quot; usually is -4 or less, and right 4 or greater, although they can be set to -3/3 to clip into the gravelly region of the road. The AI cars expect the full width of the road to be available though, so be careful when doing this.<br /> Left/right are also optional, linearly interpolated properties.</li> <li><strong>L Barrier/R Barrier</strong> = Define the visual left and right barriers. Each one is a list of item types that will be repeated. Tick the tick box to specify the barrier type, then click &quot;[New]&quot; to add an item type.<br /> Select the item type from the list (use the mouse wheel to scroll). <em>Make sure to only select item types starting with &quot;Barrier_&quot;</em> (I didn't have enough tokens to automatically filter the list).<br /> Generally it makes sense to use just one barrier types, or combine &quot;Barrier_Fence&quot; with one of the other types.<br /> L Barrier/R Barrier are optional.</li> <li><strong>Trees</strong> = Generate random trees on the left/right side of the map.<br /> This is a list of horizontal positions to place the trees at trees' horizontal positions vary randomly by a few units as well.<br /> Trees are optional.</li> </ul> <h3>Items</h3> <p>Items are background items, like stadiums, buildings, signs. They don't affect gameplay, but make the track look more alive.<br /> Click on a background item to select it.<br /> You can also use the &quot;&lt;&quot; and &quot;&gt;&quot; buttons to cycle through the items in a stage (useful if you accidentally place one in a position where it is never visible and can't be selected normally).<br /> Click &quot;New-&gt;Item&quot; to create a new item, then select the item type from the list (mouse wheel to scroll).<br /> The item will be created in the current stage, a few units in front of the camera.<br /> To delete the item, click the &quot;-&quot; button next to it.</p> <p>Background items have 3 properties representing their position relative to the race track.</p> <ul> <li>X = Horizontal position relative to the race track (negative = left, positive = right)</li> <li>Y = Vertical position relative to the ground (negative = up, positive = down)</li> <li>Z = Distance along track from start of stage.</li> </ul> <h2>Other properties</h2> <p>You can also edit the sky and ground colours by selecting &quot;Properties&quot; in the hamburger menu.</p> <h2>Generated content</h2> <p>The following items are generated automatically and cannot be edited:</p> <ul> <li>Race track shoulder things (I tried to Google for the proper name, but only found things that stop horses from biting your shoulders...)</li> <li>Distance to turn signs</li> <li>Racing line markers</li> </ul> <h2>Exporting</h2> <p>To race on your track in the actual game, you need to export it:</p> <ol> <li>Click &quot;Export&quot; in the hamburger menu. This will copy a string to the clipboard.</li> <li>Open up &quot;Mot's Grand Prix&quot; in Pico-8.</li> <li>Open tab 8.</li> <li>Choose a track to replace (there isn't enough compressed space left to add any more).</li> <li>Replace the string for one of the existing tracks. <strong>Be sure to switch to &quot;Puny font&quot; mode (press Ctrl+P) before pasting from the clipboard.</strong></li> <li>Optionally edit the &quot;finline&quot; variable to set the finish line distance.</li> <li>If you want to change the track name on the start screen, edit the &quot;tracknames&quot; variable in tab 1.</li> </ol> <p>Your track should now be in the game.</p> https://www.lexaloffle.com/bbs/?tid=44812 https://www.lexaloffle.com/bbs/?tid=44812 Thu, 30 Sep 2021 23:37:44 UTC Mot's Grand Prix <p> <table><tr><td> <a href="/bbs/?pid=97606#p"> <img src="/bbs/thumbs/pico8_mot_grandprix2-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=97606#p"> Mot's Grand Prix</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=97606#p"> [Click to Play]</a> </td></tr></table> </p> <p>Title screen artwork by <a href="https://twitter.com/MarcoValeKaz">Marco Vale</a></p> <p><strong>Update: The track editor is <a href="https://www.lexaloffle.com/bbs/?tid=44812">now available here</a>.</strong></p> <p><strong>Update 2: Added Autodromo Nazionale di Monza circuit</strong></p> <p><strong>Update 3: Added last two tracks (Hockenheim and Spa Francorchamps) plus championship mode. The BBS version now plays identically to the <a href="https://tommulgrew.itch.io/mots-grand-prix">itch.io multi-cart version</a>.</strong></p> <p>Step back in time to an era when folk were real folk and racecar steering wheels were real steering wheels.<br /> Mot's Grand Prix is a pseudo 3D Formula 1 racer inspired by Grand Prix Circuit, Continental Circus and a bunch of other 80s/90s racers I've forgotten :).</p> <p>Strap into your single seater and blast around 6 classic race courses:</p> <ul> <li>Brands Hatch</li> <li>Hockenheim (old layout)</li> <li>Autodromo Nazionale Monza</li> <li>Silverstone</li> <li>Spa Francorchamps</li> <li>Suzuka</li> </ul> <p>Or enter the championship and try to be top of the points table at the end of the season.</p> <p>The game has 4 difficulty levels plus a practice mode to learn the courses without the pressure of racing.</p> <h3>Controls</h3> <ul> <li>Left/Right = Steer</li> <li>Z/Up = Accelerate</li> <li>X/Down = Brake</li> </ul> <h3>Mouse control</h3> <p>You can also enable mouse control in the pause menu. It has 3 settings:</p> <ul> <li>Off = No mouse control. Keys/gamepad only.</li> <li>Steering = Mouse controls steering (left/right axis). Keys/gamepad controls acceleration/braking.</li> <li>Full = Mouse controls steering (left/right axis) and acceleration/braking (up/down axis).</li> </ul> <p>&quot;Steering&quot; mode can be quite playable if you use a large window size or full-screen mode. Use the keyboard keys to accelerate/brake as usual.<br /> &quot;Full&quot; mode is not really playable unless you're some kind of robot, but can be useful for other input devices if they can be configured to output mouse movements (e.g. a Steam controller).</p> <h3>Tips</h3> <p><strong>This is a game where you have to slow down for the corners!</strong><br /> Use the colour of the racing line to judge your speed.</p> <img style="" border=0 src="/media/39676/mot_grandprix p8_11.png" alt="" /> <ul> <li>Green -&gt; You are fine</li> <li>Yellow -&gt; You are close to the limit, but should be able to make the turn</li> <li>Red -&gt; You are likely going too fast for the corner</li> </ul> <p>If you're really having trouble, you can switch on &quot;Auto Brake&quot; in the pause menu. Auto-brake automatically slows you down for corners, but not to avoid crashing into other cars.</p> <p><strong>Don't be timid about muscling through traffic</strong><br /> There is no damage model. Your car is indestructible. Be fearless! :-)</p> <p>Hope you enjoy this game.<br /> -Mot</p> https://www.lexaloffle.com/bbs/?tid=44700 https://www.lexaloffle.com/bbs/?tid=44700 Tue, 21 Sep 2021 12:36:25 UTC Feature suggestion - Enhanced controller input <p>Just a suggestion, but for modern controllers it would be really nice if the extra controls could be mapped like:</p> <ul> <li>Right trigger = X</li> <li>Left trigger = O</li> <li>Right thumbstick = Mouse</li> </ul> <p>That would allow FPS games like Poom, Sorcerer to be played like a twin stick shooter on capable input devices, without actually changing Pico-8's input model.</p> https://www.lexaloffle.com/bbs/?tid=44281 https://www.lexaloffle.com/bbs/?tid=44281 Tue, 17 Aug 2021 12:48:22 UTC Variable inspector (debugging) <p>This is a cut down version of the variable inspector I wrote a while ago. It's a bit more limited, but a lot more light weight. And there's a way to use it even if you have no tokens to spare (described below).</p> <p>You use it to view Lua table variables:</p> <ol> <li>Run your game</li> <li>Press Esc to break into it</li> <li>Type: dinsp(variable)</li> </ol> <p>Then use the mouse to expand values and scroll wheel to scroll up/down.</p> <img style="" border=0 src="/media/39676/dbg_test_0.gif" alt="" /> <p>Code snippet follows (for some reason I can't use the code formatting tags):</p> <hr /> <p>poke(0x5f2d,3)cursor()pal()clip()function dadd(n,v,i,p)add(lines,{n=n,v=v,x=type(v)==&quot;table&quot;and&quot;+&quot;or&quot; &quot;,i=i},p) end function dexp(l,p)if l.x==&quot;+&quot; then for n,v in pairs(l.v) do p+=1 dadd(n,v,l.i..&quot; &quot;,p)end l.x=&quot;-&quot;end end</p> <p>function dinp()local x,y,b,w=stat(32),stat(33),stat(34),stat(36)line(x,y,x,y+2,10)if btnp(❎) then local i=(y-10)\6+1 local p=s+i local l=lines[p]if l and (x-10)\4==#l.i then dexp(l,p)end end s=max(min(s-stat(36),#lines-18),0)end</p> <p>function dui()while true do rectfill(10,10,118,118,1)for i=1,18 do local l=lines[i+s]if l then print(l.i..l.x..l.n..&quot;:&quot;..tostr(l.v),10,(i-1)*6+10,7)end end dinp()flip() end end function dinsp(v)lines,s={},0 dadd(&quot;value&quot;,v,&quot;&quot;,#lines+1)dui()end</p> <hr /> <p>The snippet is 246 tokens.<br /> If you don't have 246 spare tokens, you can still use it as follows:</p> <ol> <li>Run your game</li> <li>Press Esc to break into it</li> <li>Paste in each of the 3 snippet lines one at a time, pressing enter after each.</li> <li>Type: dinsp(variable)</li> </ol> <p>The snippet must be entered as 3 separate lines because Pico-8 has a 255 character limit for lines in immediate mode.</p> https://www.lexaloffle.com/bbs/?tid=43955 https://www.lexaloffle.com/bbs/?tid=43955 Mon, 26 Jul 2021 07:12:46 UTC Feature request: Metronome in sfx editor <p>This is a suggestion, not a bug obviously.</p> <p>The ability to toggle on a metronome tick/beep every 4 beats in the sfx editor would be quite helpful for composing tunes.</p> https://www.lexaloffle.com/bbs/?tid=43869 https://www.lexaloffle.com/bbs/?tid=43869 Sun, 18 Jul 2021 08:41:58 UTC Trial of the Sorcerer <p> <table><tr><td> <a href="/bbs/?pid=94900#p"> <img src="/bbs/thumbs/pico8_mot_sorcerer-11.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=94900#p"> Trial of the Sorcerer</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=94900#p"> [Click to Play]</a> </td></tr></table> </p> <p><em>UPDATE: The dungeon generation logic has been revamped. Rooms are not always rectangular, and can often have a bit more cover (or hiding places for monsters). Also added a couple of new enemy types. Gold has been removed (I needed the extra tokens), but it didn't really do anything anyway.</em></p> <p>Grab your magic staff and venture deep into the demon realm to defeat Bahmott and his evil servants!</p> <p>Trial of the Sorcerer is a procedurally generated 3D first person shooter inspired by Wolfenstein 3D and Catacomb Abyss.</p> <p>Shoot monsters, collect loot, find keys to unlock doors, and try to find the exit to the next level.<br /> And don't forget to pickup the power crystals to level-up your magic staff along the way.</p> <h3>Input</h3> <p>Arrows = Move<br /> X = Shoot<br /> Z = Hold to strafe</p> <p>Or use player 2 controls (E,S,D,F) to move/strafe and player 1 controls to turn.</p> <p>Mouse input can be enabled via the pause menu (once in game), but only when playing via the Pico-8 application as mouse locking doesn't currently work in the browser version.</p> <h3>Tips</h3> <p>Doors with a small black keyhole require keys.<br /> Each door requires a specific key, so if one won't open it means you don't have the right key yet.</p> https://www.lexaloffle.com/bbs/?tid=43833 https://www.lexaloffle.com/bbs/?tid=43833 Fri, 16 Jul 2021 05:45:28 UTC Crypts of Mot <p> <table><tr><td> <a href="/bbs/?pid=94197#p"> <img src="/bbs/thumbs/pico8_mot_crypt-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=94197#p"> Crypts of Mot</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=94197#p"> [Click to Play]</a> </td></tr></table> </p> <p>Still needs quite a bit of finishing off.<br /> I'm posting it now mainly so I can play it on my phone :-)</p> <p>Levels are randomly generated. Shoot monsters, collect loot, find keys to unlock doors and reach the exit.</p> https://www.lexaloffle.com/bbs/?tid=43590 https://www.lexaloffle.com/bbs/?tid=43590 Tue, 29 Jun 2021 09:35:21 UTC Formula 1 practice lap <p> <table><tr><td> <a href="/bbs/?pid=87611#p"> <img src="/bbs/thumbs/pico8_mot_formula1-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87611#p"> mot_formula1</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=87611#p"> [Click to Play]</a> </td></tr></table> </p> <p>Strap into one of the world's fastest race cars and blast around the legendary Bronzerock circuit like it's 1988!<br /> ...or something - there's not a lot of physical or historical accuracy in this game :)</p> <p>Z/X=accelerate/brake<br /> Left/right=steering</p> <p>Driving off road slows you down. Driving too fast around corners causes you to slide.</p> <p>You can use the pause menu to view your last/best lap times (my best so far is 1:43.23)</p> <p>This is work-in-progress, so some caveats:</p> <ul> <li>There are no other cars yet.</li> <li>Lots of things need tweaking/adjusting.</li> </ul> https://www.lexaloffle.com/bbs/?tid=41554 https://www.lexaloffle.com/bbs/?tid=41554 Sun, 14 Feb 2021 03:01:03 UTC F1 racing game <p> <table><tr><td> <a href="/bbs/?pid=87276#p"> <img src="/bbs/thumbs/pico8_mot_f1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87276#p"> F1 racing game</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=87276#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is very unfinished and I wasn't planning to release this just yet, but somebody asked to play it so here it is :-)</p> <p>Z/X accel/brake<br /> Left/right to steer</p> <p>Eventually there will be consequences for leaving the road and crashing into things.</p> https://www.lexaloffle.com/bbs/?tid=41423 https://www.lexaloffle.com/bbs/?tid=41423 Fri, 05 Feb 2021 21:12:03 UTC Mot's Wolf3D engine <p> <table><tr><td> <a href="/bbs/?pid=86903#p"> <img src="/bbs/thumbs/pico8_mot_wolf3d-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86903#p"> Mot's Wolf-3D engine</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=86903#p"> [Click to Play]</a> </td></tr></table> </p> <p>This isn't really a game - unless you consider it a short &quot;Walking simulator&quot; - it's more of a tech demo.</p> <p>The engine is a basic Wolfenstein-3D like 3D engine. It has floor and ceiling textures and render reasonably sized and complex rooms at 60 frames-per-second, in a 128x96 viewport.</p> <ul> <li>Arrow keys = move</li> <li>X = toggle map mode</li> </ul> <p>If anyone feels like something out of it, it's fairly easy to get started with (details below).</p> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> Levels are built using the map editor, using the sprites on page 1.</p> <img style="" border=0 src="/media/39676/mot3dsspr p8_000.png" alt="" /> <p>The bottom left sprites are walls, except the left-most one which positions a door.<br /> The next row up is for placing objects.<br /> The numbered circles are for placing triggers that trigger code when the player reaches them.<br /> The gray arrows at the top are for setting the player start position and direction.</p> <p>You can use the top left 124x32 tiles of the map area.</p> <p>Wall textures (and door texture) are sprite tabs 2 and 3.</p> <img style="" border=0 src="/media/39676/mot3dsspr p8_001.png" alt="" /> <p>You can define up to 8 (including the door).</p> <p>Objects are sprite tab 4.</p> <img style="" border=0 src="/media/39676/mot3dsspr p8_003.png" alt="" /> <p>They are always 16x16 pixels. You can define up to 16.</p> <p>Objects must be defined in the &quot;otyp&quot; array (code tab 1):</p> <div> <div style="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>otyp={ -- y h w solid flat { .33,.4, .5, true}, {-.36,.25,.25,false}, { 0, 1, .3, true}, { .5,.45, .7, false,true}, {.375,.5, .7, true}, { -.3,.4, .3, false}, { .3,.35, .4, true}, { .5,.45, .8, false,true}, { .1, .8, .4, true}, { .2, .6, .6, true} }</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <ul> <li>y = y position (-0.5 = ceiling, 0.5 = floor)</li> <li>h = height</li> <li>w = width</li> <li>solid = true if object will obstruct player's movement</li> <li>flat = true to flatten object to floor/ceiling</li> </ul> <p>Floor and ceiling textures are defined at the very right of the map.</p> <img style="" border=0 src="/media/39676/mot3dsspr p8_004.png" alt="" /> <p>Floor and ceiling &quot;plane types&quot; must also be defined in code tab 1:</p> <div> <div style="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>-- plane types -- tex scale height xvel yvel pl_tile ={ 0, 0.5 } pl_panel={ 1, 0.5 } pl_dirt ={ 2, 0.125 } pl_stone={ 3, 0.25 } pl_sky ={ 4, 7, 10, .007,.003}</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <ul> <li>tex = Which &quot;texture&quot; to use. 0 = topmost.</li> <li>scale = Texture scale factor.</li> <li>height = Optional. Set the plane height, e.g. for sky textures. Otherwise defaults to floor/ceiling height.</li> <li>xvel,yvel = Optional. Creates moving planes.</li> </ul> <p>You then select the floor and ceiling planes by setting the &quot;floor&quot; and &quot;roof&quot; variables.</p> <div> <div style="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>floor={ typ=pl_dirt, x=0,y=0 } roof ={ typ=pl_sky, x=0,y=0 }</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p></div></div></div></p> https://www.lexaloffle.com/bbs/?tid=41315 https://www.lexaloffle.com/bbs/?tid=41315 Fri, 29 Jan 2021 07:19:44 UTC Flight simmy <p> <table><tr><td> <a href="/bbs/?pid=84733#p"> <img src="/bbs/thumbs/pico8_mot_flight-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=84733#p"> mot_flight</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=84733#p"> [Click to Play]</a> </td></tr></table> </p> <p>A little arcady &quot;flight sim&quot; I started writing.<br /> Buzz past randomly generated islands in a wrap-around ocean.</p> <p>I will probably add stuff to blow up eventually :)</p> <p>There is no throttle! Just steer with arrows.</p> https://www.lexaloffle.com/bbs/?tid=40572 https://www.lexaloffle.com/bbs/?tid=40572 Fri, 27 Nov 2020 07:47:28 UTC Mot's 8-Ball Pool <p> <table><tr><td> <a href="/bbs/?pid=82696#p"> <img src="/bbs/thumbs/pico8_mot_pool-23.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=82696#p"> Pool</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=82696#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is <strong>Mot's 8-Ball Pool</strong>, a little pool simulation inspired by 3D pool on the C64 and Amiga.<br /> Shoot a round of pool against a friend, or one of the 7 different AI characters.</p> <p><img style="" border=0 src="/media/39676/pool3d_37.gif" alt="" /> <img style="" border=0 src="/media/39676/pool3d_35.gif" alt="" /> <img style="" border=0 src="/media/39676/pool3d_38.gif" alt="" /></p> <h3>UI</h3> <p>The UI at the bottom of the screen shows how each player is progressing.<br /> The player's name flashes when it is their turn.<br /> The color they must sink is displayed next to their name, and the balls already sunk are displayed above.<br /> A white ball indicates they have a free ball.</p> <img style="" border=0 src="/media/39676/pool3d_006.png" alt="" /> <p>When player fouls, the reason for the foul is displayed in a scrolling message along the bottom of the screen.</p> <img style="" border=0 src="/media/39676/pool3d_007.png" alt="" /> <h3>Rules</h3> <p>I'll assume you know the basic rules of 8-ball pool, so I'll just describe how the rules have been implemented.<br /> The game uses a simplified set of rules:</p> <ul> <li>The game ends when the black ball is sunk.</li> <li>If you sink it (legally) after sinking all your colored balls, you win. Otherwise you forfeit and your opponent wins.</li> <li>The first ball sunk becomes that player's color.</li> <li>A legal shot involves hitting a ball of your color first, and not sinking the wrong color, white ball or black ball (except when you're supposed to).</li> <li>A free ball is awarded to the other player after a &quot;foul&quot;. A free ball means you get a free second shot even if you don't sink a ball - as long as your shot was legal.</li> </ul> <p>Hope you enjoy it.<br /> If you're curious, you can see the development progress in <a href="https://twitter.com/tommulgrew/status/1303218536010088448">this Twitter thread</a>.</p> https://www.lexaloffle.com/bbs/?tid=39859 https://www.lexaloffle.com/bbs/?tid=39859 Thu, 08 Oct 2020 08:05:51 UTC Still Movin' <p> <iframe src="sfxp.php?id=39676_0" width="769" height="97" style="border:none; overflow:hidden"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_39676_0"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/39676_0.txt", function (retdata){ var el = document.getElementById("sfxcode_39676_0"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_39676_0" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> <p>I felt like transcribing a little tune I made in Caustic to Pico8.<br /> Could use a bit more work (instruments, balancing, is pattern 14 off key?) but I'm happy enough with it.</p> https://www.lexaloffle.com/bbs/?tid=39648 https://www.lexaloffle.com/bbs/?tid=39648 Sun, 20 Sep 2020 04:27:06 UTC Pool <p> <table><tr><td> <a href="/bbs/?pid=81393#p"> <img src="/bbs/thumbs/pico8_mot_pool-22.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=81393#p"> Pool</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=81393#p"> [Click to Play]</a> </td></tr></table> </p> <p>A work-in-progress 3D pool table simulation.</p> https://www.lexaloffle.com/bbs/?tid=39447 https://www.lexaloffle.com/bbs/?tid=39447 Mon, 31 Aug 2020 11:55:35 UTC smap - sspr for maps <p>Not sure if anyone has posted a smap() yet, but it's reasonably straightforward to implement with tline, so here's mine.</p> <p>Parameters are:<br /> <strong>cx,cy,cw,ch</strong> Specify a region in the tile map. Measured in tiles.<br /> <strong>sx,sy,sw,sh</strong> Region on the screen to map to.<br /> <strong>flipx,flipy</strong> Whether to flip horizontally and/or vertically.<br /> <strong>layers</strong> Layer flags. Same as for map().</p> <p>You need to supply at least the c and s parameters.</p> <div> <div style="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 smap(cx,cy,cw,ch,sx,sy,sw,sh,flipx,flipy,layers) -- negative screen sizes if(sw&lt;0)flipx=not flipx sx+=sw if(sh&lt;0)flipy=not flipy sy+=sh sw,sh=abs(sw),abs(sh) -- delta local dx,dy=cw/sw,ch/sh -- apply flip if flipx then cx+=cw dx=-dx end if flipy then cy+=ch dy=-dy end -- clip if(sx&lt;0)cx-=sx*dx sx=0 if(sy&lt;0)cy-=sy*dy sy=0 if(sw&gt;128)sw=128 if(sh&gt;128)sh=128 -- render with tlines -- pick direction that results -- in fewest tline calls if sh&lt;sw then -- horizontal lines for y=sy,sy+sh-1 do tline(sx,y,sx+sw-1,y,cx,cy,dx,0,layers) cy+=dy end else -- vertical lines for x=sx,sx+sw-1 do tline(x,sy,x,sy+sh-1,cx,cy,0,dy,layers) cx+=dx 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> <table><tr><td> <a href="/bbs/?pid=79752#p"> <img src="/bbs/thumbs/pico8_mot_smap-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=79752#p"> mot_smap</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=79752#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=38931 https://www.lexaloffle.com/bbs/?tid=38931 Wed, 22 Jul 2020 05:44:11 UTC Mot's Animation System <h1>Mot's Animation System</h1> <p> <table><tr><td> <a href="/bbs/?pid=79085#p"> <img src="/bbs/thumbs/pico8_mot_animsys-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=79085#p"> Mot's Animation System</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=79085#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Mot's Animation System</strong> is a visual editor for creating 2D animations.</p> <p>You start by sequencing sprites and/or tilemaps together to create the basic components. Then combine them using timelines and key-frames to make animations. Or combine them again to make bigger, more complex animations.</p> <p>Animations can trigger sounds and music, and call back into to your main program, e.g. to trigger game play events.</p> <p>You could use it for:</p> <ul> <li>Character animations, like run cycles</li> <li>Larger multi-sprite animated characters</li> <li>Cutscenes</li> <li>Animated birthday cards</li> </ul> <p>Animations can be loaded and played in your own carts (the loading and playback code is 1836 tokens). They can either be stored in Lua strings or loaded from a separate cart.</p> <h3>Disclaimer</h3> <p><strong>This is all very much in Beta at the moment!</strong>. And some corners had to be cut to fit everything into the token limit. In particular the editor doesn't prevent you from shooting yourself in the foot by:</p> <ul> <li>Creating self referencing animations (infinite recursion)</li> <li>Creating animation files larger than 0x4300 bytes (about 17K) that won't save properly.</li> </ul> <p>It lacks any sort of undo/redo logic, so if you use this, please take frequent backups of your saved animations.</p> <p>And also, because the animation code is 1836 tokens and the animation data can be several kilobytes, it's not the best fit for every program.</p> <p>Feel free to @ me if you need any help.</p> <h1>Overview and basic navigation</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> <em>WARNING: While you can edit animations in the nested browser version <strong>you can't save them!</strong> So please don't get too invested if you play with it in-browser. Run it from Pico-8 itself in order to save your changes.</em></p> <h2>Selecting and playing animations</h2> <p>Move the mouse over the window to display the UI.</p> <img style="" border=0 src="/media/39676/mas_002.png" alt="" /> <p>You can pan the animation with the middle mouse button, and zoom in/out with the scroll wheel.<br /> At the bottom right there are 3 controls:</p> <ul> <li>A slider to zoom in/out (behaves exactly the same as the mouse wheel)</li> <li>A play/pause button that does what you'd expect</li> <li>A home (house) button recenters the animation and sets the scale back to 1</li> </ul> <p>The name of the current animation is displayed at the top. Click on it to select another animation.</p> <img style="" border=0 src="/media/39676/mas_003.png" alt="" /> <p>Use the mouse wheel to scroll through the animations. Animations with a person icon <img style="" border=0 src="/media/39676/manicon.PNG" alt="" /> are sprite/tilemap animations. Animations with a dotted line icon <img style="" border=0 src="/media/39676/dots.png" alt="" /> are key frame based animations.</p> <h2>Menus</h2> <p>At the top right are the menu icons. Clicking on them opens a drop down menu.</p> <p>The hamburger menu is for creating/deleting animations.</p> <img style="" border=0 src="/media/39676/animmenu.PNG" alt="" /> <p>You can create new animations of different types, or delete the current animation.</p> <p>The hourglass menu is for saving and loading animation sets.</p> <img style="" border=0 src="/media/39676/filemenu.PNG" alt="" /> <p>You can save/load your animations to from external carts or import sprites and tilemaps from another cart.</p> <p>This is covered in more detail later.</p> <h2>Animation properties</h2> <p>Click &quot;Properties&quot; at the bottom of the screen to expand the properties panel.<br /> This is where you edit the current animation. The UI changes based on the animation type.</p> <img style="" border=0 src="/media/39676/mas_005.png" alt="" /> <p>When expanded, the &quot;Properties&quot; bar also displays two icons. These toggle between different tabs.<br /> The I icon <img style="" border=0 src="/media/39676/infoicon.PNG" alt="" /> displays information and settings for the animation. Once again they differ based on the animation type. The other icon will be the person or dotted line depending on the animation type, and switches back to the main editor.<br /> </div></div></div></p> <h1>Creating animations</h1> <h2>Importing graphics</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>(...and music and sound effects)</p> <p>In order to create animations for your own carts, you'll want to import the sprites and tilemaps that your cart uses.<br /> Click the hourglass icon <img style="" border=0 src="/media/39676/hourglassicon.PNG" alt="" /> at the top right, then select &quot;IMPORT GFX&quot;. This will list the carts in your Pico-8 carts folder.</p> <img style="" border=0 src="/media/39676/mas_006.png" alt="" /> <p>Once again you can scroll with the mouse wheel.<br /> Click on the cart to import its sprites, tile maps, sound effects and music into the editor.</p> <p></div></div></div></p> <h2>Clearing animations</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> Select &quot;Clear&quot; from the hourglass menu <img style="" border=0 src="/media/39676/hourglassicon.PNG" alt="" /> to clear out the demo animations.<br /> </div></div></div></p> <h2>Saving and loading</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>The hourglass menu <img style="" border=0 src="/media/39676/hourglassicon.PNG" alt="" /> allows you to save and load your animations. Animations are saved to Pico-8 cartridges (&quot;carts&quot;).<br /> They overwrite the sprites in the cart, and possibly the tile maps, sfx and music, depending on how many animations you have defined. Therefore you should <strong>not</strong> save your animations into your existing game carts!</p> <p>To avoid catastrophe the editor will only save/load animation data into cart files that end with .anim.p8</p> <img style="" border=0 src="/media/39676/filemenu.PNG" alt="" /> <p>&quot;Save&quot;, &quot;Save as&quot; and &quot;Load&quot; work as you would expect.</p> <p>The first time you save (or if you click &quot;Save as&quot;) you will be prompted with a list of animation carts to save into.</p> <img style="" border=0 src="/media/39676/mas_016.png" alt="" /> <p>Or you can click &quot;New Cart&quot; and key in the name of a new cart to create.</p> <img style="" border=0 src="/media/39676/mas_017.png" alt="" /> <p>Enter the name <em>without</em> the .p8 extension, as the editor will add .anim.p8 automatically.</p> <p><strong>WARNING: The editor can only save 0x4300 bytes of animation data to a cart (about 17K). If your animations grow beyond this limit, they will not save correctly and may not reload either.</strong><br /> You can keep tabs on this by running Pico-8 in console mode. The number of bytes written is reported in the console when you save, so you can see when it gets near the 17K limit (for reference, the demo animation is about 3.8K).<br /> Taking frequent backups of your animation file is strongly advised.</p> <p></div></div></div></p> <h2>Sprite animations</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>Sprite (and tile map) animations are the building blocks of all animated sequences.<br /> Create a sprite animation by clicking the hamburger icon <img style="" border=0 src="/media/39676/animmenuicon.PNG" alt="" /> and selecting &quot;NEW SPRITE ANIM&quot;.<br /> <em>To edit the animation, make sure the &quot;Properties&quot; section is expanded.</em></p> <img style="" border=0 src="/media/39676/mas_008.png" alt="" /> <p>This UI allows you to define a sequence of frames, each of which displays a sprite.<br /> The frames of the animation are displayed horizontally.</p> <img style="" border=0 src="/media/39676/spriteframes.PNG" alt="" /> <p>Click on a frame to select it.<br /> If the animation has more than 5 frames, click the rightmost frame to scroll right and the leftmost to scroll left.</p> <p>The &quot;+&quot; and &quot;-&quot; buttons add and delete frames respectively. Adding always creates a new frame at the end of the animation. Alternatively you can insert a new frame immediately after the selected frame by clicking &quot;Ins&quot;.</p> <p>The bottom of the editor shows the available sprites.</p> <img style="" border=0 src="/media/39676/sprites.PNG" alt="" /> <p>As in Pico-8 itself, sprites are grouped into 4 pages, with page number &quot;tabs&quot; at the top right.<br /> To set the sprite for a particular frame, first click on the frame, and then click on the sprite in the sprites area.<br /> The sprite for the current frame is displayed with a white rectangle.</p> <p>You can also flip a frame horizontally or vertically by ticking &quot;Flip X&quot; and &quot;Flip Y&quot; respectively while the frame is selected.</p> <h3>Information and settings</h3> <p>Click the I icon <img style="" border=0 src="/media/39676/infoicon.PNG" alt="" /> on the &quot;Properties&quot; bar to display the sprite animation information and settings.</p> <img style="" border=0 src="/media/39676/mas_011.png" alt="" /> <p>The <strong>Name</strong> allows you to give your animation a name, so you can find it more easily in the animation chooser.<br /> You should try to choose short names in order to save space and so that they display properly in the animation list. (Ideally the editor would enforce this but it doesn't have enough spare tokens.)<br /> The name is also used to fetch animations when rendering them in your own carts, so it is a good idea to give each animation a unique one.</p> <p>The <strong>Type</strong> allows you to choose between a sprite or tile map based animation. (Tile map animations are described in the next section.)</p> <p><strong>FPS</strong> is the frames-per-second speed of the animation.<br /> The value is set using a &quot;number editor&quot; box. Click and drag left/right to decrease/increase the value. Click and drag with the right mouse button to decrease/increase 10x faster.</p> <p><strong>Size</strong> is the horizontal (left box) and vertical (right box) size of each frame in sprites (or tile map tiles, if using a tile map animation).</p> <p>The <strong>Origin</strong> defines the origin point of the animation. If the animation is rendered at coordinates X,Y then the origin is the part of the animation that will align with that position on screen. It is also the part of the animation that stays in the same place if you scale it larger or smaller. It's stored as two values ranging from 0 to 1, representing the fraction of the animation's width and height. So (0,0) sets the top left corner as the origin. (1,1) sets the bottom right corner. (0.5,0.5) sets the center. </p> <img style="" border=0 src="/media/39676/origin.png" alt="" /> <p>Hover the mouse over the animation preview area to see the origin point (displayed as a gray cross)</p> <p></div></div></div></p> <h2>Tile map animations</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>Tile map animations are special sub class of sprite animations, where the animation frames are defined as sections of the tile map. They are useful for creating larger &quot;sprite&quot; animations, or to define backgrounds for animated scenes.</p> <p>To create a tile map animation, first create a sprite animation (as described above), click the I <img style="" border=0 src="/media/39676/infoicon.PNG" alt="" /> to bring up the information/settings and click &quot;Tiles&quot;.<br /> Typically you will want to set &quot;Size&quot; here as well (to the width and height of the animation in tiles).</p> <p>Click the person icon <img style="" border=0 src="/media/39676/manicon.PNG" alt="" /> to edit the tile map frames.</p> <img style="" border=0 src="/media/39676/mas_012.png" alt="" /> <p>The UI is similar to defining sprite frames UI. The main difference is that the tile map is displayed instead of the sprite pages. Use the middle mouse button to drag the tile map around, so that you can select the region that corresponds to your animation frame.</p> <p>(The UI is unfortunately a bit cumbersome and would have benefited from a mouse-wheel zoom. But it's usable.)</p> <p></div></div></div></p> <h2>Timeline animations</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>This is the main feature of the animation system: the ability to create animations defined by key frames on a timeline.<br /> Timeline animations are built from other animations, which are often sprite animations but can be other timeline animations as well. In this section we will refer to the other animations as &quot;child animations&quot;.<br /> The key frames specify which animations to play at which positions, plus other attributes like scale and flip flags. The animation system interpolates between these values based to create the animation.</p> <p>Create a timeline animation by clicking the hamburger icon <img style="" border=0 src="/media/39676/animmenuicon.PNG" alt="" /> and selecting &quot;NEW TIMELINE ANIM&quot;.</p> <img style="" border=0 src="/media/39676/mas_014.png" alt="" /> <p>The timeline animation UI has two main areas.</p> <h3>Timelines and key frames</h3> <p>The left area contains the timelines and key frames.</p> <img style="" border=0 src="/media/39676/timelines.PNG" alt="" /> <p>The blue top line is for triggering events, like sound effects. This is covered later on.</p> <p>The gray lines are timelines. Each one displays a single &quot;child&quot; animation. You can include more child animations by creating more timelines, using the buttons at the bottom.</p> <img style="" border=0 src="/media/39676/tilemap buttons.PNG" alt="" /> <p>The + and - buttons add and delete timelines respectively.<br /> Use the up and down arrows to re-order the timelines. This controls the order that the child animations are drawn on screen. Timelines are drawn from top to bottom, so the topmost timeline's animation will appear behind the others, and the bottom timeline's animation will appear in front.</p> <p>The purple dots on the timeline are key frames.<br /> These can be added and deleted with the key frame buttons:</p> <img style="" border=0 src="/media/39676/keyframe buttons.PNG" alt="" /> <p>To insert a key frame, first click on the timeline at the position corresponding to the desired time. Then click +.<br /> <em>Note: If key frames are close together it may be difficult or impossible to click on the timeline between them without selecting one of the existing ones. The work around is to click + to create the new key frame anyway, then move it to the desired time.</em></p> <p>To delete a key frame, click on it to select it, then click -.</p> <h3>Key frame properties</h3> <p>The right hand side displays the properties of the selected key frame.</p> <img style="" border=0 src="/media/39676/keyframeprops.PNG" alt="" /> <p>Use the number box at the top to set the key frame time on the timeline (drag left/right with the mouse).<br /> (I would have preferred to implement this as dragging the key frame along the timeline, but you know... tokens.)</p> <p>The key frame properties are grouped into two tabs, which are accesed by clicking the icons to the right of the number box.</p> <p>The first tab (<img style="" border=0 src="/media/39676/manicon.PNG" alt="" />) has the following properties:</p> <p><strong>Anm</strong> selects which child animation to play. Click on the animation name to select it from the list. The child animation will play from this key frame onward. If &quot;None&quot; is selected, the key frame will not change the child animation.</p> <p><strong>Loop</strong> indicates whether the child animation will loop. If not it will stop once it has played to the end (or start if playing backwards).</p> <p><strong>T</strong> and <strong>Spd</strong> set the time and speed of the child animation. You can use these to start the child animation half way through, or play it in reverse, or double speed etc.<br /> T and Spd are <em>optional</em> properties. This means you can choose not to specify them on a particular key frame, which is useful if you want to add a key frame to change a <em>different</em> property (say the on-screen position). Optional properties are controlled by a tick box on the right hand side which must be ticked in order to enter a value.<br /> For T and Spd there is only one tick box, as you must either set them both, or none at all.</p> <p><strong>Visible</strong> indicates whether the child animation is visible from this key frame onward.</p> <p>Click the <img style="" border=0 src="/media/39676/props2icon.PNG" alt="" /> icon to display the second tab.</p> <img style="" border=0 src="/media/39676/keyframeprops2.PNG" alt="" /> <p>It has the following properties:</p> <p><strong>Pos</strong> sets the position of the child animation as a X and Y coordinates, relative to the center of the current time line animation. If you render the animation in the center of the screen (like the editor does by default), then 0,0 will position the child animation there.<br /> Pos is an optional property.<br /> It is also an <em>interpolated</em> property. As the animation plays the position will be linearly interpolated between the values supplied on the key frames, so that the child animation moves smoothly from one position to the next.</p> <p><strong>Sca</strong> sets the horizontal and vertical scale factor of the child animation. A value of 1 means no scaling.<br /> Sca is an optional interpolated property.</p> <p><strong>Flp</strong> flips the child animation horizontally and/or vertically from the current key frame onward.</p> <p><em>Note: The <strong>Visible</strong> property is also available on this tab page. It is the same property as on the other page.</em></p> <h3>Information and settings</h3> <p>As with sprite animations you can click the I icon <img style="" border=0 src="/media/39676/infoicon.PNG" alt="" /> to display the information and settings. </p> <img style="" border=0 src="/media/39676/mas_015.png" alt="" /> <p>Refer to the sprite animation section regarding the <strong>Name</strong> property.</p> <p>The <strong>Duration</strong> allows you to specify the animation duration in seconds.</p> <p></div></div></div></p> <h2>Storyboard animations</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>A storyboard animation allows you to play a set of animations one after the other. It is useful for stitching together smaller scenes, like the scenes that make up the demo animation. The editor ensures that each animation starts immediately after the previous one finishes, and adjusts it appropriately in response to duration changes.</p> <p>To create a storyboard animation, click the hamburger icon <img style="" border=0 src="/media/39676/animmenuicon.PNG" alt="" /> and select &quot;NEW STORYBOARD ICON&quot;.</p> <img style="" border=0 src="/media/39676/mas_018.png" alt="" /> <p>The storyboard animation UI is essentially a cut down version of the timeline animation UI.There is no events timeline and only one animation timeline, and key frames are restricted to a subset of properties.</p> <p>Create the storyboard by adding key frames to the single timeline and setting the &quot;Anm&quot; property to the animation that should play.</p> <p>Unlike timeline animations, you cannot set the key frame time directly. Instead there are two new key frame buttons that allow you to control their order.</p> <img style="" border=0 src="/media/39676/storyboardkeyframebuttons.PNG" alt="" /> <p>Click the left button to move the key frame to towards the start of the sequence. The right button moves it towards the end.</p> <p></div></div></div></p> <h2>Animation events</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>Timeline animations can also trigger events. These can be used to play sound effects and music, or display text on the screen. You can also create your own event types and handle them in your own carts.</p> <p>Events are created by inserting key frames into the blue top-most timeline.</p> <img style="" border=0 src="/media/39676/mas_019.png" alt="" /> <p>The <strong>Typ</strong> property specifies the event type.<br /> The remaining properties are data to supply to the event handler. If an event handler doesn't use a particular property, you can choose to omit it by leaving its right-hand tick-box unticked (which saves a byte or two in the animation data).</p> <p>Click on the value to select the event type.</p> <img style="" border=0 src="/media/39676/mas_020.png" alt="" /> <p>The editor displays the built-in event types that it understands. Or you can click &quot;Custom&quot; to create your own event type. Custom event types are ignored by the editor, but you can implement event handlers in your own carts (this is described later on).<br /> You should keep your custom event names short, as the name string is stored in each event.</p> <p>The built-in events are as follows:</p> <p><strong>SFX</strong> plays a sound effect.<br /> n=The sound effect number.</p> <p><strong>MUS</strong> starts/stops music.<br /> n=The starting pattern. Omitting it (unticking the right tick-box) indicates that the music should stop.</p> <p><strong>TXT</strong> displays text on the screen.<br /> txt=The text to display<br /> pos=The screen coordinates<br /> n=The number of frames the text will remain on screen</p> <p><strong>RELTXT</strong> displays text on screen relative to the current animation.<br /> This is exactly the same as <strong>TXT</strong> except that &quot;pos&quot; is relative to the center of the current animation.</p> <p><strong>CLR</strong> clears all text from the screen.</p> <p></div></div></div></p> <h1>Playing animations in your own carts</h1> <h2>Loading and playback code</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> In order to load and playback animations from your own carts, you will need the loading and playback code.<br /> All this code is in tab 1 of the &quot;Mot's Animation System&quot; cart, and needs to be copied into your cart. Be aware that it will cost you 1836 tokens.<br /> </div></div></div></p> <h2>Loading from an external cart</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>Loading animations from an external cart means that your cart will not be self-contained, and may prevent it from working when uploaded onto the Lexaloffle BBS. However it's relatively easy to setup, and makes for a streamlined workflow, where you save your changes in the editor and simply rerun your cart to load them.</p> <p>You might want to use this method while developing your cart, and then switch to the embedded Lua string method (described later) once you're ready to release it.</p> <p>To load from an external cart:</p> <div> <div style="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> -- load into gfx ram, then decode reload(0x0,0x0,0x4300,&quot;masintro.anim.p8&quot;) local stream=readmemstream(0x0) anims=loadanims(stream) -- restore gfx ram reload(0,0,0x4300,gfxcart) -- extract animation to play anim=anims[&quot;intro&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>This copies the animation data into memory, and deserializes it into a Lua table.<br /> The process overwrites the sprites and possible tile maps, sfx and music, so the &quot;reload&quot; is necessary to copy them back in from the cartridge ROM.<br /> Individual animations can then be fetched by name.</p> <p></div></div></div></p> <h2>Rendering an animation</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>To render an animation, call the &quot;draw&quot; method:</p> <div> <div style="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> anim:draw(t)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Where <strong>t</strong> is the animation time in seconds.</p> <p>By default the animation will not loop, but you can use the &quot;duration&quot; method to achieve this if necessary.</p> <div> <div style="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> anim:draw(t%anim:duration())</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 full list of parameters for &quot;draw&quot; is:<br /> t=The animation time<br /> x,y=The position on screen (defaults to 64,64)<br /> xscale,yscale=The horizontal and vertical scale factors (defaults to 1,1)<br /> flipx,flipy=Whether to flip horizontally or vertically (defaults to false,false)<br /> dt=The delta time from the last frame (defaults to 1/30 or 1/60 depending on whether _update or _update60 is defined)</p> <p>The delta time is used to trigger events, and tells the animation system how far the animation has advanced since the previous frame. The animation system will trigger all events on the timeline between then and the specified time.</p> <p></div></div></div></p> <h2>Drawing text</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>If an animation contains &quot;txt&quot; or &quot;reltxt&quot; events, this text is not rendered immediately by the &quot;draw&quot; method, but queued up to be rendered later. This this allows you to render one or more animations then draw the text last so that it appears in front.</p> <p>After drawing your animations, render the text by calling the &quot;framedone&quot; method of the &quot;anim_events&quot; global variable:</p> <div> <div style="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> anim_events:framedone()</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p></div></div></div></p> <h2>Handling animation events</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>When an animation event triggers, the animation system looks for a function on the &quot;anim_events&quot; global variable with the same name as the event to call.<br /> The system sets up a default &quot;anim_events&quot; table with handlers for the built-in events (&quot;sfx&quot;,&quot;mus&quot;,&quot;txt&quot;,&quot;reltxt&quot;,&quot;clr&quot;), so these events will work automatically.</p> <p>You can handle your own events by adding functions to the anim_events table.</p> <p>The parameters are:</p> <p>ev=The event key frame.<br /> This is a table variable with properties:</p> <ul> <li>t</li> <li>x,y</li> <li>n</li> <li>txt</li> </ul> <p>Which correspond to the values configured in the animation editor. Property values (except t) can be nil if no value was entered.</p> <p>x,y=The screen position of the animation that triggered the event.</p> <p>Note: To save tokens the event is called as a function, not a method. I.e. there is no &quot;self&quot; parameter.</p> <h3>After frame rendering</h3> <p>You can also create event types that render content after the animations have been rendered (like the &quot;txt&quot; and &quot;reltxt&quot; events), by calling anim_events.doafterframe and passing it a function to run.<br /> The function will be converted into a coroutine, so you can use yield() for multi-frame drawing.</p> <p>For example, here's an event that causes the screen to flash 3 times. The screen will flash white by default, or you can specify a colour by setting &quot;n&quot;:</p> <div> <div style="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> anim_events.flash=function(ev,x,y) anim_events.doafterframe(function() -- three flashes for i=1,3 do -- one frame of white cls(ev.n or 7) yield() -- two normal frames yield() yield() 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></div></div></div></p> <h2>Embedding animations as Lua strings</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p>Instead of loading animation data from an external cart, you can embed it directly into your Lua source as hexidecimal strings, to create a single self-contained cart. </p> <p>For example, here's the demo animation embedded into a cart as a Lua string:</p> <p> <table><tr><td> <a href="/bbs/?pid=79085#p"> <img src="/bbs/thumbs/pico8_mot_animintro-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=79085#p"> Mot's Animation System - Demo animation</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=79085#p"> [Click to Play]</a> </td></tr></table> </p> <p>You will need enough free space to fit the strings in without exceeding the compressed size limit however.</p> <p>To generate the Lua strings you must run Pico-8 in console mode.<br /> Load your animation in the editor, then click the hamburger icon <img style="" border=0 src="/media/39676/animmenuicon.PNG" alt="" /> and select &quot;EXPORT ANIMS&quot;.</p> <p>The editor will write a table of hexidecimal strings to the console window. This looks like (on Windows anyway):</p> <div> <div style="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>INFO: { INFO: &quot;6d617301390108622d636173746c65022810103232019007000107622d68696c6c7302281008320001a00b000107622d7261696c73022810013232012008000105622d736561022810103232018007000107622d7472656573022810103232012000000107632d64616e6365013b010232640a4000004100004000004100014000004100004200004200004200004200000107702d737061726b012802023232010100000106742d616e696d022810043232010003000107742d616e696d73022812043232010003000108742d656469746f72012804013232013000000106742d6d6f7473022810043232010000000108742d73797374656d022810043232018005000108742d76697375616c01280401323201200000010674682d61726d01280102321401460000010774682d626f647901280202416401430000010774682d636c756201280201503201740000010674682d6c656701280102326401450000010774682d6c65676201280102326401470000010774722d626f647902280b05323201940200010774722d7073746e02280201323201980600010774722d726f643202280501323201180700010874722d736b69727402280b01323201140500010874722d736d6f6b6501130101323203600000610000620000010974722d776865656c7302280b023232019405000308632d64616e636532880001020000&quot;, INFO: &quot;0b06000000000000640004440009060000640005000305696e74726f963201090000091b000064000492090b1c000000000000640004860b091d0000640004de0d091e00006400042a12091f00006400046a1809200000640004521c092100006400043a2009220000640004d2280923000064000400020731312d74686f679209010400000f3169001400c800c800000064000ce8030a19001400820000000c6c0702190014000c9e07026900140008034c0403747874070c0008005a1374686f67206265207468696e6b696e672e2e2eaa05037478740702000e00781f77686174206973206d6f74277320616e696d6174696f6e2073797374656d3fd007037478740710003c00781869276d20736f20676c616420796f752061736b65642e2e2e020831322d7469746c65f401040400000b2c00000000000064000c960004640064000caa0004640064000ca00004960096000c0200000b29000000000000640000b9000a0100cdff0000b400040200000b29000000000000640000d2000ad0ff23000000aa00040200000b29000000000000640000f0000a31000e000000dc000403c800037366780202e100037366780203fa00037366780204020731332d646573635802030600000b0df6ffd6ff0000640008410004320032000c550004780078000c690004640064000cc20102f6ffd6ff0cef0102a6ffd6ff0c0600&quot;, INFO: &quot;000b0a1800d6ff0000640008730004320032000c870004780078000c9b0004640064000cc201021800d6ff0cef01025200d6ff0c07000009090000640008eb000600000d00280028000cff0004640064000c130104550064000cc20104550064000cdb0104550005000cef01040a00050008040000037478740714001400ff0469732061af00037478740768001400ff03666f72c0000672656c74787407f4ffe8ffff067069636f2d38c20103636c7200020632312d7365714c04030600000f06d6ff2200c800c8000000000000fa000004770102d6ff220004f4010b1900001e00000096000c52030200001e000c010402000060000c0400000f0611000200c800c8000a00000000130100047701021100020004f4010200001e00000400000f0627002a00c800c80046000000002c01000477010227002a0004f4010200001e00000611000672656c74787407d3ffd8ffff1673657175656e636520737072697465206672616d6573170203636c720058020672656c74787407d8ffd8ffff136c6f6f6b696e6720676f6f6420627269616e21de0303636c7200f401036d757302054704036d757300020732322d636f6d62400601042c010d30c800c800000064000500000000f4010b310a002300000064000d78050250002300080400000672656c74787407c0ffd8ffff20636f6d62696e65207370726974657320666f&quot;, INFO: &quot;72206d6f726520636f6d706c657864000672656c74787407ecffe2ffff0a616e696d6174696f6e73260203636c7200e8030672656c74787407f2ffe8ff3c1274686f67206665656c2077656972642e2e2e020532332d6267e803020500000b24800000000000640008af0002800000000ce10002000000000c840302000000000cb6030280ff00000804000009310000640009e9000ae6ff0800000064000d30020af5ff08008c0000000d840300090300000672656c74787407c4ffceff5a1d7573652074696c65206d61707320666f72206261636b67726f756e6473c2010672656c74787407dcffe7ff3c0d6b6e6f636b206b6e6f636b2e2e9e020672656c74787407f6ffceff46127765277265206e6f7420617420686f6d652e020832342d636f6d6232e8030105c800093500006400047c0108b400000004580208b40064000494020b3914000000000064000ce8030292ff00000c0200000672656c74787407ceffc4ff5a196f7220746f206d616b65206c61726765722073707269746573f4010672656c74787407ceffc4ff641a77686963682063616e20616c736f20626520636f6d62696e6564020833312d7363656e659808010200000b2d000000000000000008c80008000064000c0400000672656c74787407c4ffc4ff781c7468656e20636f6d62696e6520697420616c6c20746f67657468657264000672&quot;, INFO: &quot;656c74787407d8ffceff7813746f20637265617465206375747363656e65732c01036d757302003308036d757300020634312d6f7574c409010300000b2b00000000000064000c080704640064000c6c07046400000008000209622d636173746c6532e803030100000b0400000000000064000c0100000b020000000000006400080100000b0100000000000064000c000208622d747265657332e803020100000b0500000000000064000c0100000b0300001500000064000c000208622d747265657366c800030100000b0400000000000064000c0100000b020000e1ff000064000c0100000b2700000000000064000c000208622d74726565736cc800020200000b2500000000000064000cc80002800000000c0200000b2580ff0000000064000cc80002000000000c000206632d74686f67c800010100000a00000000000064000c000208702d737061726b32c800010400000f07000000000a000a00000064000c1e0004640064000cc800040a000a00086e0004640064000c000208732d636173746c65e803020100000b2400000000000064000c0200000b31e4ff0800320064000d2c010af0ff0800960000000d0177010672656c74787407d8ffe4ff3c0d74686f6720636f6d6520696e3f0205732d6f7574d007040200000b2c00000000000064000c2c01082c0100000c02b4000b3992ff1e00000064000d13&quot;, INFO: &quot;0102b0ff1e000d03e1000b3157001400000096000c8a020a390014003c0000000c00000008028c000b19ecffe4ff000064000c00000008000207732d7469746c65f401030414000f0b0000dcff64006400000064000c000006000070ff900190010c5e01020000dcff0c7c01028000dcff080532000f080000000090019001000064000c00000008460004640064000c720102000000000c90010280ff0000080564000f0c0000900090019001000064000c78000600002400640064000c00000008860102000024000ca401028000240008031900037366780201460003736678020178000373667802010207732d747261696ed007020100000b2600000000000064000c0400000b346e00f6ff000064000c5802020a00f6ff0cb004020a00f6ff0c6c07022efff6ff0c01dd020672656c74787407d8ffd8ff3c1a74686973207363656e65206d616b65206e6f2073656e73652e2e020a74682d61726d636c75626400020100000f10feff0b0087006400000064000c0100000b0e00000000000064000c00020774682d626974739001040700000b1201000000000064000c320002030000000c6400020100ffff0c960002ffff00000cc80002010000000c0e010210000b000c5e0100080700000b0f0000f8ff000064000c3200020000faff0c6400020000f8ff0c9600020000faff0cc800020000f8ff0c0e01020900f4&quot;, INFO: &quot;ff0c540100080700000b11ffffffff000064000c320002fdff00000c670002ffff00000c960002010000000cc80002ffffffff0c0e0102fcff0d000c720100080700000b2e0000efff000064000c3f00020100f1ff0c7100020000efff0ca00002fffff1ff0cc800020000efff0c0e0102edffe7ff0c7c01000c0232000373667802009600037366780200020774682d6d616b65c800010100000b2f0000000090019cff0400020774682d77616c6bc800010100000b2f00000000000064000c00020774722d626974735e01060200000b38e0ffe6ff000064000c640000080400000b330000fbff000064000c6400020000fbff0ca0000aefffeaff000000000c2c0100080400000b1600001300000064000c640002000013000ca000021e0009000cfa0000080400000b1800001500000064000c640002000015000ca0000209001c000c130100080700000f151500130056006400000064000c320002150019000c190002110016000c4b0002180016000c640002150013000ca000022b002d000ce10000080700000b15f0ff1900000064000c320002f0ff13000c190002f3ff16000c4b0002edff16000c640002f0ff19000ca00002ddff28000cc800000800020874722d626f6479321400010200000b1300000000000064000c0a0002000001000c00020774722d6c6f6e67e803060100000b3124000a000000000004&quot;, INFO: &quot;0100000b3900000000000064000c0100000b365b001500000064000c0100000b1945000a00000064000c0100000b1954000a00140064000c0100000b1965000a000a0064000c00020774722d6d616b65f000010100000b320000000054019cff0400020974722d706c7466726de803020100000b160000f9ff000064000c0100000b1800000000000064000c00020974722d736d6f6b65326400010200000b170000000000006400046400020000ebff0400020974722d736d6f6b65336400040100000b3700000000000064000c0100000b37000000001e0064000c0100000b37000000003c0064000c0100000b3700000000500064000c00020874722d747261696e6400010100000b3200000000000064000c00&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&quot;, INFO: &quot;&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>You will need to copy it from the console window and remove the &quot;INFO: &quot; line prefixes. You can optionally remove any blank strings at the end of the table.</p> <p>Then add it to your code, assigning it to a variable. For example:</p> <div> <div style="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>animdata={ &quot;6d617301390108622d636173746c65022810103232019007000107622d68696c6c7302281008320001a00b000107622d7261696c73022810013232012008000105622d736561022810103232018007000107622d7472656573022810103232012000000107632d64616e6365013b010232640a4000004100004000004100014000004100004200004200004200004200000107702d737061726b012802023232010100000106742d616e696d022810043232010003000107742d616e696d73022812043232010003000108742d656469746f72012804013232013000000106742d6d6f7473022810043232010000000108742d73797374656d022810043232018005000108742d76697375616c01280401323201200000010674682d61726d01280102321401460000010774682d626f647901280202416401430000010774682d636c756201280201503201740000010674682d6c656701280102326401450000010774682d6c65676201280102326401470000010774722d626f647902280b05323201940200010774722d7073746e02280201323201980600010774722d726f643202280501323201180700010874722d736b69727402280b01323201140500010874722d736d6f6b6501130101323203600000610000620000010974722d776865656c7302280b023232019405000308632d64616e636532880001020000&quot;, &quot;0b06000000000000640004440009060000640005000305696e74726f963201090000091b000064000492090b1c000000000000640004860b091d0000640004de0d091e00006400042a12091f00006400046a1809200000640004521c092100006400043a2009220000640004d2280923000064000400020731312d74686f679209010400000f3169001400c800c800000064000ce8030a19001400820000000c6c0702190014000c9e07026900140008034c0403747874070c0008005a1374686f67206265207468696e6b696e672e2e2eaa05037478740702000e00781f77686174206973206d6f74277320616e696d6174696f6e2073797374656d3fd007037478740710003c00781869276d20736f20676c616420796f752061736b65642e2e2e020831322d7469746c65f401040400000b2c00000000000064000c960004640064000caa0004640064000ca00004960096000c0200000b29000000000000640000b9000a0100cdff0000b400040200000b29000000000000640000d2000ad0ff23000000aa00040200000b29000000000000640000f0000a31000e000000dc000403c800037366780202e100037366780203fa00037366780204020731332d646573635802030600000b0df6ffd6ff0000640008410004320032000c550004780078000c690004640064000cc20102f6ffd6ff0cef0102a6ffd6ff0c0600&quot;, &quot;000b0a1800d6ff0000640008730004320032000c870004780078000c9b0004640064000cc201021800d6ff0cef01025200d6ff0c07000009090000640008eb000600000d00280028000cff0004640064000c130104550064000cc20104550064000cdb0104550005000cef01040a00050008040000037478740714001400ff0469732061af00037478740768001400ff03666f72c0000672656c74787407f4ffe8ffff067069636f2d38c20103636c7200020632312d7365714c04030600000f06d6ff2200c800c8000000000000fa000004770102d6ff220004f4010b1900001e00000096000c52030200001e000c010402000060000c0400000f0611000200c800c8000a00000000130100047701021100020004f4010200001e00000400000f0627002a00c800c80046000000002c01000477010227002a0004f4010200001e00000611000672656c74787407d3ffd8ffff1673657175656e636520737072697465206672616d6573170203636c720058020672656c74787407d8ffd8ffff136c6f6f6b696e6720676f6f6420627269616e21de0303636c7200f401036d757302054704036d757300020732322d636f6d62400601042c010d30c800c800000064000500000000f4010b310a002300000064000d78050250002300080400000672656c74787407c0ffd8ffff20636f6d62696e65207370726974657320666f&quot;, &quot;72206d6f726520636f6d706c657864000672656c74787407ecffe2ffff0a616e696d6174696f6e73260203636c7200e8030672656c74787407f2ffe8ff3c1274686f67206665656c2077656972642e2e2e020532332d6267e803020500000b24800000000000640008af0002800000000ce10002000000000c840302000000000cb6030280ff00000804000009310000640009e9000ae6ff0800000064000d30020af5ff08008c0000000d840300090300000672656c74787407c4ffceff5a1d7573652074696c65206d61707320666f72206261636b67726f756e6473c2010672656c74787407dcffe7ff3c0d6b6e6f636b206b6e6f636b2e2e9e020672656c74787407f6ffceff46127765277265206e6f7420617420686f6d652e020832342d636f6d6232e8030105c800093500006400047c0108b400000004580208b40064000494020b3914000000000064000ce8030292ff00000c0200000672656c74787407ceffc4ff5a196f7220746f206d616b65206c61726765722073707269746573f4010672656c74787407ceffc4ff641a77686963682063616e20616c736f20626520636f6d62696e6564020833312d7363656e659808010200000b2d000000000000000008c80008000064000c0400000672656c74787407c4ffc4ff781c7468656e20636f6d62696e6520697420616c6c20746f67657468657264000672&quot;, &quot;656c74787407d8ffceff7813746f20637265617465206375747363656e65732c01036d757302003308036d757300020634312d6f7574c409010300000b2b00000000000064000c080704640064000c6c07046400000008000209622d636173746c6532e803030100000b0400000000000064000c0100000b020000000000006400080100000b0100000000000064000c000208622d747265657332e803020100000b0500000000000064000c0100000b0300001500000064000c000208622d747265657366c800030100000b0400000000000064000c0100000b020000e1ff000064000c0100000b2700000000000064000c000208622d74726565736cc800020200000b2500000000000064000cc80002800000000c0200000b2580ff0000000064000cc80002000000000c000206632d74686f67c800010100000a00000000000064000c000208702d737061726b32c800010400000f07000000000a000a00000064000c1e0004640064000cc800040a000a00086e0004640064000c000208732d636173746c65e803020100000b2400000000000064000c0200000b31e4ff0800320064000d2c010af0ff0800960000000d0177010672656c74787407d8ffe4ff3c0d74686f6720636f6d6520696e3f0205732d6f7574d007040200000b2c00000000000064000c2c01082c0100000c02b4000b3992ff1e00000064000d13&quot;, &quot;0102b0ff1e000d03e1000b3157001400000096000c8a020a390014003c0000000c00000008028c000b19ecffe4ff000064000c00000008000207732d7469746c65f401030414000f0b0000dcff64006400000064000c000006000070ff900190010c5e01020000dcff0c7c01028000dcff080532000f080000000090019001000064000c00000008460004640064000c720102000000000c90010280ff0000080564000f0c0000900090019001000064000c78000600002400640064000c00000008860102000024000ca401028000240008031900037366780201460003736678020178000373667802010207732d747261696ed007020100000b2600000000000064000c0400000b346e00f6ff000064000c5802020a00f6ff0cb004020a00f6ff0c6c07022efff6ff0c01dd020672656c74787407d8ffd8ff3c1a74686973207363656e65206d616b65206e6f2073656e73652e2e020a74682d61726d636c75626400020100000f10feff0b0087006400000064000c0100000b0e00000000000064000c00020774682d626974739001040700000b1201000000000064000c320002030000000c6400020100ffff0c960002ffff00000cc80002010000000c0e010210000b000c5e0100080700000b0f0000f8ff000064000c3200020000faff0c6400020000f8ff0c9600020000faff0cc800020000f8ff0c0e01020900f4&quot;, &quot;ff0c540100080700000b11ffffffff000064000c320002fdff00000c670002ffff00000c960002010000000cc80002ffffffff0c0e0102fcff0d000c720100080700000b2e0000efff000064000c3f00020100f1ff0c7100020000efff0ca00002fffff1ff0cc800020000efff0c0e0102edffe7ff0c7c01000c0232000373667802009600037366780200020774682d6d616b65c800010100000b2f0000000090019cff0400020774682d77616c6bc800010100000b2f00000000000064000c00020774722d626974735e01060200000b38e0ffe6ff000064000c640000080400000b330000fbff000064000c6400020000fbff0ca0000aefffeaff000000000c2c0100080400000b1600001300000064000c640002000013000ca000021e0009000cfa0000080400000b1800001500000064000c640002000015000ca0000209001c000c130100080700000f151500130056006400000064000c320002150019000c190002110016000c4b0002180016000c640002150013000ca000022b002d000ce10000080700000b15f0ff1900000064000c320002f0ff13000c190002f3ff16000c4b0002edff16000c640002f0ff19000ca00002ddff28000cc800000800020874722d626f6479321400010200000b1300000000000064000c0a0002000001000c00020774722d6c6f6e67e803060100000b3124000a000000000004&quot;, &quot;0100000b3900000000000064000c0100000b365b001500000064000c0100000b1945000a00000064000c0100000b1954000a00140064000c0100000b1965000a000a0064000c00020774722d6d616b65f000010100000b320000000054019cff0400020974722d706c7466726de803020100000b160000f9ff000064000c0100000b1800000000000064000c00020974722d736d6f6b65326400010200000b170000000000006400046400020000ebff0400020974722d736d6f6b65336400040100000b3700000000000064000c0100000b37000000001e0064000c0100000b37000000003c0064000c0100000b3700000000500064000c00020874722d747261696e6400010100000b3200000000000064000c00&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>You can now use the following code to load the animations:</p> <div> <div style="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> -- load animation from animdata string local stream=readstrstream(animdata) anims=loadanims(stream) -- extract animation to play anim=anims[&quot;intro&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></div></div></div></p> https://www.lexaloffle.com/bbs/?tid=38739 https://www.lexaloffle.com/bbs/?tid=38739 Sun, 12 Jul 2020 00:44:07 UTC Playing Ramps with a racing wheel <p><object width="640" height="400"><param name="movie" value="https://www.youtube.com/v/aoPL7nw_YMM&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/aoPL7nw_YMM&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="400"></embed></object></p> <p>OK, this may be a bit bonkers, but I figured out how to play <a href="https://www.lexaloffle.com/bbs/?tid=38221">Ramps</a> with a racing wheel, with proper analogue steering and acceleration/braking.</p> <p>It's a little involved and only works on Windows.</p> <h3>Mouse input</h3> <p>First, you need a version of Ramps (or whatever game you plan to play) edited to accept mouse input. Like this version:<br /> <table><tr><td> <a href="/bbs/?pid=77721#p"> <img src="/bbs/thumbs/pico8_mot_ramps_mouse-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=77721#p"> Ramps - with mouse input</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=77721#p"> [Click to Play]</a> </td></tr></table> <br /> <strong>WARNING: Attempting to drive with an actual mouse may cause high blood pressure and throwing things.</strong><br /> Also I've only tried this in PICO-8 itself - not sure if it works when running in a browser.</p> <h3>Joystick -&gt; mouse</h3> <p>Next, you need a utility to convert game controller input to mouse movement.</p> <p>I couldn't find one that did exactly what I needed, so I ended up <a href="https://basic4gl.net/misc/MapJoyMouse.zip">making my own here</a>.<br /> <em>Tip: If you try it out remember F12 toggles it on/off - as you can't use the mouse when it's enabled.</em></p> <h3>Race</h3> <p>So basically run the utility, run the mouse-input version of Ramps in PICO-8, switch to full-screen, and go :-)</p> https://www.lexaloffle.com/bbs/?tid=38306 https://www.lexaloffle.com/bbs/?tid=38306 Sat, 06 Jun 2020 01:58:54 UTC Suggestion: UDP/IP networking <p>I'm a bit new here, so I don't know if adding network capability has previously been discussed (?)</p> <p>But it feels to me some simple UDP send/receive instructions would add some cool functionality, without adding too much complexity.</p> <p>Perhaps something like:</p> <div> <div style="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>[write message to RAM] poke4([ip-locn],ip) poke2([port-locn],port) send(0x4300,length) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Where [ip-locn],[port-locn] would be some special reserved locations for IP address and port.<br /> UDP packets are usually small. I've seen &lt;=512 bytes recommended in places, which easily fits into the user RAM address range.<br /> And an IPV4 address would fit in a number variable, and would be adequate for LAN play.</p> <p>Receive could be:</p> <div> <div style="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>length=recv(0x4300,maxlength) [read message from RAM]</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Returning 0 if nothing is waiting.<br /> It could also populate [ip-locn] with the return IP address so that replying would be straightforward.</p> <p>Perhaps [port-locn] could be pre-populated with a default port number (0x1C08 ?).</p> <p>Any thoughts?<br /> Am I trying to make it simpler than is actually possible? (I haven't done socket programming in a while, so I forget what's necessary to get UDP/IP working).</p> https://www.lexaloffle.com/bbs/?tid=38293 https://www.lexaloffle.com/bbs/?tid=38293 Fri, 05 Jun 2020 09:36:53 UTC Ramps <h1>Ramps</h1> <p> <table><tr><td> <a href="/bbs/?pid=77443#p"> <img src="/bbs/thumbs/pico8_mot_ramps-21.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=77443#p"> Ramps</a><br><br> by <a href="/bbs/?uid=39676"> Mot</a> <br><br><br> <a href="/bbs/?pid=77443#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is <strong>Ramps</strong>! A 3D racer inspired by Powerdrift, Stunt Car Racer, Hard Drivin'.</p> <p>Choose from 8 varied race tracks, and overtake the other drivers in 5 laps to win.<br /> As well as racing you'll need to navigate jumps, roller-coaster like ramps and occasionally even drive upside down.</p> <p>Includes 3 difficulty levels, plus a practice mode for getting the feel of the tracks.</p> <img style="" border=0 src="/media/39676/mot_ramps_8.gif" alt="" /> <img style="" border=0 src="/media/39676/mot_ramps_2.gif" alt="" /> <img style="" border=0 src="/media/39676/mot_ramps_3.gif" alt="" /> <img style="" border=0 src="/media/39676/mot_ramps_6.gif" alt="" /> <p>This all started as an experiment to see how well Pico-8 could render a Powerdrift-like scaled sprite racetrack (pretty well, as it turns out). Then it was about trying to implement a driving model that could handle the ramps, jumps and loops. And finally wrapping it up into a somewhat finished game.</p> <p>Like with Loose Gravel, I would have liked to add a championship mode, but there just aren't enough tokens :-)</p> <p>Big thanks to everybody who gave advice and feedback. Particularly <a href="https://www.lexaloffle.com/bbs/?uid=25532"> @freds72</a> who even went as far as digging into the code and making some performance optimisations (~20% CPU improvement!).</p> <h3>Tips</h3> <p>Z = Accelerate<br /> X = Brake<br /> Left/Right to steer</p> <p>You don't have to wait to be automatically respawned after you fall of the track, select &quot;Respawn&quot; in the pause menu to get back into the race faster.</p> <p>The green and red lines on the speedometer are recommended <em>minimum</em> and <em>maximum</em> speeds.<br /> The green line (minimum speed) is particularly important for clearing jumps (and occasionally getting up steep hills), so make sure to keep your speed above it.<br /> The red line (maximum speed) is to prevent you from sliding out on sharp corners or overshooting the jumps. Typically this is just a suggested speed. Depending on your racing line, driving style etc you may be able to go faster.</p> <p>Enjoy,<br /> -Mot</p> <p><strong>Update: Other cars' speeds now vary randomly throughout the race</strong><br /> <strong>Update 2: Can knock other cars sideways a bit &amp; they don't knock you sideways as much. Round road sprite corners a bit.</strong><br /> <strong>Update 3: Fix game crashes in AI code when road is blocked.</strong></p> https://www.lexaloffle.com/bbs/?tid=38221 https://www.lexaloffle.com/bbs/?tid=38221 Sun, 31 May 2020 05:23:50 UTC