matt [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=6 PICO-8 on NES/SNES Classic Mini? <p>What would it take to see pico8 on NES/SNES Classic Mini?</p> <p>Not just for playing but also for creating. USB keyboards can now be used via a micro USB OTG adapter so you could use it as a development machine.</p> <p>Of course it would be offline only, you'd have to sync with a computer to get your game off for distribution online.</p> <p>I'm quite happy to start a fund to make this happen? <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> https://www.lexaloffle.com/bbs/?tid=30671 https://www.lexaloffle.com/bbs/?tid=30671 Sun, 28 Jan 2018 05:41:31 UTC GUIDE: Working with videos (anim GIFs) <p>I was interested to see how easy/difficult it is to edit the animated GIF &quot;videos&quot; pico8 produces. My goal was to trim some frames from the beginning and end to make a more succinct recording.</p> <p>After much trial, error and experimentation here are my findings using Mac OS X.</p> <p>Animated GIFs can be:</p> <ul> <li>viewed frame-by-frame using macOS Preview.app</li> <li>manipulated using &quot;gifsicle&quot; command line tool</li> <li>converted using &quot;ffmpeg&quot; command line tool</li> </ul> <p>Notes</p> <ul> <li>useful tools need to be installed using &quot;brew&quot; command line tool <a href="http://brew.sh"><a href="http://brew.sh">http://brew.sh</a></a></li> </ul> <p><strong>VIEWING</strong></p> <p>Open the GIF in Preview.app and it will show you all frames.<br /> Preview calls the first frame 1 (one), but other tools usually call it 0 (zero).</p> <p>original/source animated GIF:</p> <img style="margin-bottom:16px" border=0 src="http://i.imgur.com/ygoo5ls.gif" alt="" /> <p><strong>TRIMMING</strong></p> <p>required: gifsicle</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> brew install gifsicle </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>then this is how you trim</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> gifsicle anim.gif &quot;#212-238&quot; &gt; trimmed.gif </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>note: this makes a copy of the GIF and keep frames 213 to 239 (gifsicle uses zero based frame count)</p> <img style="margin-bottom:16px" border=0 src="http://i.imgur.com/YaTs2ED.gif" alt="" /> <p><strong>RESIZING</strong></p> <p>if you want to double size of the image:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> gifsicle --scale 2 trimmed.gif &gt; resized.gif </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <img style="margin-bottom:16px" border=0 src="http://i.imgur.com/XCyedCT.gif" alt="" /> <p><strong>CAPTIONING</strong></p> <p>if you want to add an overlay to caption the animation</p> <p>required: imagemagick</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> brew install imagemagick </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>then use this bash script:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> #!/bin/bash source=$1 caption=$2 : ${1?&quot;Usage: $0 anim.gif overlay.gif [output.gif]&quot;} : ${2?&quot;Usage: $0 anim.gif overlay.gif [output.gif]&quot;} fnsource=$(basename &quot;$source&quot; .gif) fncaption=$(basename &quot;$caption&quot; .gif) output=${3:-&quot;$fnsource-$fncaption.gif&quot;} gifsicle -E $source for f in *.gif.*; do composite $caption $f $f; done gifsicle --loopcount *.gif.* &gt; $output rm *.gif.* </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>how to run the command</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> ./caption.sh anim.gif overlay.gif [output.gif] </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>note: if you do not specify an output name, it will be named using original filenames, eg. anim-overlay.gif</p> <p><a href="http://i.imgur.com/9GTBrmM.gif">caption.gif</a></p> <img style="margin-bottom:16px" border=0 src="http://i.imgur.com/xrWewys.gif" alt="" /> <p><strong>CONVERT TO VIDEO</strong></p> <p>required: ffmpeg</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> brew install ffmpeg </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>to convert the GIF to MP4:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> ffmpeg -i trimmed.gif video.mp4 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>video uploaded to YouTube:<br /> <object width="640" height="400"><param name="movie" value="https://www.youtube.com/v/Ydeg4bNHn08&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/Ydeg4bNHn08&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="400"></embed></object></p> <p><strong>EASY?</strong></p> <p>If there is enough demand I will create a trimming tool that does not require you load terminal every time.</p> https://www.lexaloffle.com/bbs/?tid=3614 https://www.lexaloffle.com/bbs/?tid=3614 Wed, 15 Jun 2016 20:26:00 UTC July Game Jam: A Game By Its Cover <p><a href="https://itch.io/jam/a-game-by-its-cover-2016">https://itch.io/jam/a-game-by-its-cover-2016</a></p> <p>MAKE A GAME INSPIRED BY FAMICASE COVER ART</p> <p>Submission open from July 1st 2016 at 1:00 AM to August 1st 2016 at 1:00 AM</p> <p>What is Famicase?<br /> It's an art exhibition of fictional NES cartridge art.<br /> Selected artists and designers are invited to contribute.<br /> It is hosted by and at a shop called Meteor in Tokyo, Japan.<br /> <a href="http://famicase.com/16/index.html">http://famicase.com/16/index.html</a></p> <p>What is the jam about?<br /> It's fun to turn things around and make real games of the fictional artwork. </p> <p>2015 entries:<br /> <a href="https://itch.io/jam/a-game-by-its-cover-2016"><a href="https://itch.io/jam/a-game-by-its-cover-2016">https://itch.io/jam/a-game-by-its-cover-2016</a></a><br /> <a href="http://www.youtube.com/playlist?list=PLYKU1lvSF85cpvEFdFvcgmnTbeA4Ka6Nu"><a href="http://www.youtube.com/playlist?list=PLYKU1lvSF85cpvEFdFvcgmnTbeA4Ka6Nu">http://www.youtube.com/playlist?list=PLYKU1lvSF85cpvEFdFvcgmnTbeA4Ka6Nu</a></a></p> <p>Disclaimer:<br /> I'm one of the hosts of this jam so I'd love to see some pico8 entries! </p> https://www.lexaloffle.com/bbs/?tid=3610 https://www.lexaloffle.com/bbs/?tid=3610 Wed, 15 Jun 2016 08:35:18 UTC Approaches to combat number limits? <p>I've seen many approaches to combat the limited accuracy of the maths functions, time() due to the fixed point number size limit of 32,768</p> <p>Given that all of this must have been solved during the 8-bit era are there any best practices or recommended solutions we should know about?</p> https://www.lexaloffle.com/bbs/?tid=3516 https://www.lexaloffle.com/bbs/?tid=3516 Tue, 31 May 2016 17:08:22 UTC Pico Pang - arcade bubble busting action! <p> <table><tr><td> <a href="/bbs/?pid=21363#p"> <img src="/bbs/thumbs/pico21668.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=21363#p"> Pang</a><br><br> by <a href="/bbs/?uid=6"> matt</a> <br><br><br> <a href="/bbs/?pid=21363#p"> [Click to Play]</a> </td></tr></table> </p> <p>CHANGE LOG</p> <ul> <li>more accurate collision with tail of wire</li> <li>transparent balls so you can see through them</li> <li>flashing ball when it can't be burst</li> <li>flashing of player after respawn is now faster</li> <li>added game score stats screen</li> <li>added new bubble sprites from Johan Vinet</li> <li>fixed some minor visual issues</li> </ul> <p>WHAT IS THIS?<br /> This is my version of Pang!</p> <p>STORY<br /> I've been obsessed with this game series by Mitchell Corp ever since the 1990 Atari ST version. I'm currently trying to 100% the Nintendo DS version (it's the best version by far!) though I also love the last arcade version which is called Mighty! Pang.</p> <p>HOW TO PLAY<br /> Move left and right and fire your harpoon wire.<br /> Split the bubbles into smaller sizes that are worth more points.<br /> Burst bubbles of the same type in sequence to increase your score multiplier.<br /> Discover special bubbles and power-ups.<br /> You have three lives.</p> <p>...go for the Hi Score!</p> <p>CONTROLS<br /> cursor left &amp; cursor right = move<br /> cursor up or X = fire harpoon</p> <p>WIP<br /> There's lots done already, I'm pretty happy with it so far.<br /> Gameplay came quickly. Ever since then I've been polishing and adding details.</p> <p>TODO<br /> I want to add more special bubbles and some collectible power-ups.<br /> Needs music. SFX and GFX are (probably) placeholders.</p> <p>NOTES<br /> I will write more about the design and my choices sometime before the end of the jam.</p> <img style="margin-bottom:16px" border=0 src="https://thumbs.gfycat.com/IllfatedSevereJuliabutterfly-size_restricted.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=3452 https://www.lexaloffle.com/bbs/?tid=3452 Wed, 25 May 2016 20:53:01 UTC time() function availability? <p>changelog says that time() has been removed</p> <p>but I can still use it?</p> <p>though it does seem to behave a bit oddly by eventually returning negative time?</p> <p>any ideas?</p> https://www.lexaloffle.com/bbs/?tid=3438 https://www.lexaloffle.com/bbs/?tid=3438 Tue, 24 May 2016 10:12:03 UTC 240x240 mini computer <p><a href="https://www.kickstarter.com/projects/thewebster/blaze-miniature-powerful-hackable-display-with-tou">https://www.kickstarter.com/projects/thewebster/blaze-miniature-powerful-hackable-display-with-tou</a></p> <p>&quot;Blaze is a miniature, high-res 1.6&quot; 240x240 display with capacitive touch, a powerful 120MHz Cortex M4 micro with GPIO and storage.&quot;</p> https://www.lexaloffle.com/bbs/?tid=3034 https://www.lexaloffle.com/bbs/?tid=3034 Mon, 01 Feb 2016 19:23:01 UTC Tweening/Easing <p> <table><tr><td> <a href="/bbs/?pid=14136#p"> <img src="/bbs/thumbs/pico14153.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=14136#p"> Tweening/Easing 2</a><br><br> by <a href="/bbs/?uid=6"> matt</a> <br><br><br> <a href="/bbs/?pid=14136#p"> [Click to Play]</a> </td></tr></table> </p> <p>HOW TO:<br /> Press Z to make spaceship move to another position<br /> Cart uses ease_in_out_cubic (but feel free to edit and change to another included easing function).<br /> Animation is locked at 0.5 seconds per move (feel free to edit this, too)</p> <p>ABOUT:<br /> Here is my attempt at providing tweening/easing functions in PICO-8.<br /> They are based on existing work done by many other people.<br /> These functions help you animate sprites smoothly from one position to another, with different types of acceleration and/or deceleration.<br /> I am using them to animate cards around the screen in my Hanafuda Koi-Koi game.<br /> To read more about Easings, go here: <a href="http://easings.net">http://easings.net</a></p> <p><strong>Working:</strong><br /> Linear<br /> Quadratic<br /> Cubic<br /> Quartic<br /> Quintic<br /> Sinusoidal <em><br /> Exponential </em><br /> Circular *</p> <ul> <li>partially working</li> </ul> <p>Maybe these are broken because I'm not familiar enough with how PICO-8 maths functions work?</p> <p>Any help appreciated getting those last few working is appreciated!</p> <p>Thanks,<br /> matt</p> https://www.lexaloffle.com/bbs/?tid=2464 https://www.lexaloffle.com/bbs/?tid=2464 Mon, 14 Sep 2015 11:34:10 UTC Function: zspr (draw zoomed sprite) <p>I find the syntax of <strong>sspr</strong> involves too much work, so I wrote a wrapper function that requires less arguments and less thinking.</p> <p>Ladies and gentlemen... zspr</p> <p>Arguments:<br /> --n: standard sprite number<br /> --w: number of sprite blocks wide to grab<br /> --h: number of sprite blocks high to grab<br /> --dx: destination x coordinate<br /> --dy: destination y coordinate<br /> --dz: destination scale/zoom factor</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function zspr(n,w,h,dx,dy,dz) sx = 8 * (n % 16) sy = 8 * flr(n / 16) sw = 8 * w sh = 8 * h dw = sw * dz dh = sh * dz sspr(sx,sy,sw,sh, dx,dy,dw,dh) 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>Please let me know if you find it useful.</p> https://www.lexaloffle.com/bbs/?tid=2429 https://www.lexaloffle.com/bbs/?tid=2429 Mon, 07 Sep 2015 18:20:28 UTC Hanafuda Koi-Koi (Japanese card game) <p>The story so far...</p> <p>I love Hanafuda and I'm making a version in #pico8</p> <p>First, I drew the cards:</p> <img style="margin-bottom:16px" border=0 src="http://cl.ly/image/0b4501313j2u/PICO-8_1.png" alt="" /> <p>And then made sure it will all fit on a single screen in this mock-up:</p> <img style="margin-bottom:16px" border=0 src="https://pbs.twimg.com/media/COIdjyoWUAADNY1.png" alt="" /> <p>Current status:<br /> on hold until after Playdate Hanafuda is released</p> <p>:)</p> https://www.lexaloffle.com/bbs/?tid=2421 https://www.lexaloffle.com/bbs/?tid=2421 Sat, 05 Sep 2015 14:27:29 UTC Mini bluetooth gamepad controller <p>I wanted to try some PICO-8 cartridges...</p> <p>And I just bought this new mini gamepad...</p> <p>So I thought it would be fun to get it working with PICO-8! :D</p> <p>The gamepad is a small, keyring size bluetooth controller. It costs around �3 on <a href="http://www.amazon.co.uk/gp/product/B00ZQBZEKY">Amazon.co.uk</a></p> <p>It's really meant for Android and iOS, and has various modes of button configuration. However, when connected to my iMac it's seen as an iCade controller (as it is on iOS).</p> <p>I used <a href="http://www.orderedbytes.com/controllermate/">ControllerMate</a> OS X app to remap the iCade controls to cursors+z+x+shift+esc. And it works great! </p> <p>Here's the setup file: <a href="http://cl.ly/290U3s2z3I0w"><a href="http://cl.ly/290U3s2z3I0w">http://cl.ly/290U3s2z3I0w</a></a></p> <p>Maybe there's similar software for Windows &amp; Linux to use this little gamepad? Maybe PICO-8 could add iCade support so we don't have to use external software?</p> <p>Anyway! That is my nice little PI-CO-NTROLLER for PICO-8</p> <p>:)</p> <p>If you want to try this, feel free to ask questions!</p> <img style="margin-bottom:16px" border=0 src="http://cl.ly/image/02070f0f0n3n/New-Smart-Mini-Bluetooth-Gamepad-Selfie-Shutter.jpg" alt="" /> https://www.lexaloffle.com/bbs/?tid=2346 https://www.lexaloffle.com/bbs/?tid=2346 Fri, 28 Aug 2015 18:44:08 UTC