apLundell [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=17143 Rumble! <p>Recently I've been thinking about those old <a href="https://www.giantbomb.com/rumble-cartridge/3015-7992/games/">Gameboy color cartridges</a> that had built-in rumble-packs.</p> <p>I wanted a rumble-pack for Pico-8, and, by a happy coincidence, I had a bunch of tiny rumble-motors left over from when I was prototyping VR accessories for a former job!</p> <p>So here's my first draft of PICO-8 Rumble : </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/20200603_195548.jpg" alt="" /> <p>Here's a video of it in action. Obviously you can't feel the rumble through a video, but I put a microphone right up against the rumbler. Actually, I think I put it too close, this video is LOUD.</p> <p><a href="https://photos.app.goo.gl/jnz5LUBMB16Ds9576">https://photos.app.goo.gl/jnz5LUBMB16Ds9576</a></p> <p><strong>Here's how I did it. </strong></p> <p><strong>Step Zero :</strong> If you've got a pocketCHIP, and especially if you intend to fool around with the GPIO pins, I strongly recommend putting insulating tape over the 5V and BAT pins. If you accidentally connect one of these pins to any of the other pins you could instantly fry your CHIP! They even stay active when the device is off! </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/20200601_183223.jpg" alt="" /> <p><strong>Step one</strong> : I added header sockets to my PocketCHIP. This is pretty easy if you're even a little competent with a soldering iron. A 6-pin header and a 16-pin header fit nicely and cover the pins of interest. It leaves out the FEL pin, but you'll probably never need that.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/20200601_192130.jpg" alt="" /> <p><strong>Step two</strong> : The circuit.<br /> I'm really bad at electronics, so anybody who knows about this stuff please double-check my work here.<br /> The GPIO pins are normally high, so I've designed this circuit to rumble when the pin goes low.<br /> The diode and capacitor are to protect the pocketCHIP from any interference or voltage spikes caused by the motor. I'm not sure if a motor this tiny needs that, but better safe than sorry.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/20200603_190802.jpg" alt="" /> <p>I tested this on a breadboard and it worked great.</p> <p><strong>Step Three</strong> : The casing<br /> I'm also pretty bad at designing objects for 3d printing. But TinkerCAD makes it easy to make something functional, even if it's a bit ugly.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/Screenshot_2020-06-03 3D design Smashing Lappi.png" alt="" /> <p>The grey thing is the rumble-motor.</p> <p>The idea is that you put nuts and bolts through the bolt-holes, and then tighten it onto the top of the PocketCHIP board. The slot in the top is where the wires come out to connect to the pin headers.</p> <p><strong>Step Four</strong> : Assembly<br /> In my mind I was going to lay out all the components neatly. Turns out I didn't leave enough room for that. So I kind of just had to solder them into tangle of components.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/20200602_205244.jpg" alt="" /> <p><strong>Step Five</strong> : Programming<br /> One problem here is that only root has access to the GPIO pins. If anyone knows how to change those permissions please tell me. Instead of starting Pico8 from the main menu, you have to start it from the terminal by typing &quot;sudo pico8&quot;. It'll ask you for a password. If you don't know it, it's probably &quot;chip&quot;.</p> <p>Activating the rumble-motor through Pico-8 code is surprisingly simple. It was the easiest part of the project.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/rmbltest_001.png" alt="" /> <p>Here's the code. Just call that update_rumble() function once per frame. Any time RMBL_FRAME is greater than zero it will rumble for that many frames.</p> <p>One trap is that I've got the rumble connected to what's labeled as &quot;GPIO 1&quot;, but Pico-8 sees it as pin 2. :shrug:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/17143/rmbltest_000.png" alt="" /> <p>Here's a simple test program.</p> <p>I modified <a href="https://www.lexaloffle.com/bbs/?uid=12812"> @guerragames</a>'s <a href="https://www.lexaloffle.com/bbs/?tid=33832">&quot;Pinballvania&quot;</a> to use the rumble. It took me about 60 seconds to make the mod. I copy/pasted the update function, and added a single line to the existing &quot;Screen shake&quot; function, which already was triggered after every hard collision.</p> <p><strong>I really hope other people build rumblers into handheld pico-8 devices. It'd be great if we could come up with a loose standard for how rumble in Pico games works.</strong></p> <p>Here's a parts list : </p> <ul> <li><a href="https://www.amazon.com/NW-Powerful-Vibration-1-5V-4-5V-19000RPM/dp/B073VCMVBM">1 Rumble Motor</a></li> <li><a href="https://www.amazon.com/100-Pieces-1N4007-Rectifier-Electronic/dp/B079KBFKK5/">1 diode</a></li> <li><a href="https://www.amazon.com/Hilitchi-0-1uF-10uF-Monolithic-Multilayer-Capacitors/dp/B06Y5LD3JP/">1 0.1uf-ish capacitor</a></li> <li><a href="https://www.amazon.com/gp/product/B06Y49GB3F/">1 PNP transistor</a></li> <li>hookup wires</li> <li><a href="https://www.amazon.com/gp/product/B076GZXW3Z/">pin header sockets</a></li> </ul> <p>And a case to put it all in. If you've got a 3d printer, you can use <a href="http://andylundell.com/temp/PicoRumble/">the case I designed</a>, but I'll bet you could design a better one.</p> https://www.lexaloffle.com/bbs/?tid=38278 https://www.lexaloffle.com/bbs/?tid=38278 Thu, 04 Jun 2020 00:59:26 UTC PocketCHIP GPIO Permissions? <p>I've been experimenting with the GPIO pins on PocketCHIP in a Pico-8 game, but it's awkward that it only works for the root user.</p> <p>Is there some way I could change the permissions of the hardware so that ordinary users can access the GPIO?</p> https://www.lexaloffle.com/bbs/?tid=38104 https://www.lexaloffle.com/bbs/?tid=38104 Sat, 23 May 2020 21:12:39 UTC Retro Brothers <p> <table><tr><td> <a href="/bbs/?pid=66930#p"> <img src="/bbs/thumbs/pico8_retro_brothers-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=66930#p"> Retro Bros</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=66930#p"> [Click to Play]</a> </td></tr></table> </p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ffffcc><span style="color: #101010;"><br /> Oh no! There are vermin in the pipes!<br /> The only solution is to send in the world's best adventurer-plumber : <span style="text-decoration: line-through;">Mar</span> <strong>Jelpi!</strong></p> <p>Play as Jelpi and his siblings as he goes down into the sewers to clear out all the creatures living in the slimy darkness of the sewer pipes! <br></span></td></tr></table></p> <p>This one is obviously based on an old classic.</p> <p>Before the NES, Nintendo games were ported to every platform you can imagine, both officially and unofficially. (<a href="https://archive.org/details/a2_Mario_Bros._19xx_Atari_cr_202_Alliance_p">This</a> was the Mario of <strong>my</strong> youth) So I figured I'd have a go at bringing my interpretation of this old favorite to Pico-8.</p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ffffdd><span style="color: #101010;"></p> <ul> <li> <p>This game supports up to four players. Just use the directional buttons to choose your character and <strong>X</strong> to lock in your choice.</p> </li> <li> <p>Once in game use <strong>left</strong> and <strong>right</strong> to move, and either button to jump. </p> </li> <li> <p>Stun enemies by bumping them from underneath, and then kill them by jumping on them while they're stunned. </p> </li> <li> <p>The &quot;ZAP&quot; button will stun every creature currently touching the ground. But be careful! Zap can only be used three times before it's empty and has to regenerate.</p> </li> <li>Extra Life at 5,000pts, 10,000pts, and every 10,000pts thereafter. <br></span></td></tr></table></li> </ul> <p>Before the game starts, In the cart menu there's an option to switch it to Co-Op mode. In Co-op mode, all the players pull from the same pool of lives and contribute to the same high-score. That might be more fun if one player isn't as skilled as the others and keeps being left behind.</p> https://www.lexaloffle.com/bbs/?tid=35173 https://www.lexaloffle.com/bbs/?tid=35173 Sat, 24 Aug 2019 23:44:30 UTC Space Hangman <p> <table><tr><td> <a href="/bbs/?pid=66447#p"> <img src="/bbs/thumbs/pico8_space_hangman-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=66447#p"> space_hangman</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=66447#p"> [Click to Play]</a> </td></tr></table> </p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#bbeeee><span style="color: #101010;"><br /> <strong>Space Hangman!</strong></p> <p>Use your spaceship to pop the bubbles with letters in them to spell the mystery word.</p> <p>Pop the wrong bubbles and you lose health.</p> <p>Green bubbles are wildcards and will always fill in a letter.</p> <p>Red bubbles are hearts and will increase your health.<br /> <br></span></td></tr></table></p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#eeeeee><span style="color: #101010;"><strong>Controls :</strong> </p> <ul> <li><strong>LEFT</strong> and <strong>RIGHT</strong> to steer your ship</li> <li><strong>UP</strong> or <strong>O</strong> to accelerate (&quot;z&quot; on keyboard)</li> <li><strong>DOWN</strong> to brake</li> <li><strong>X</strong> to spin 180 quickly <br></span></td></tr></table></li> </ul> <p>This is a quick little idea I've had for a while. I think it worked out pretty good, so I'm posting it, even though it's not very elaborate.</p> <p>Strategy-wise, I recommend going for vowels first, but don't kill yourself trying to get a particular letter, it'll come around again.</p> <p>Please let me know about any typos or spelling errors in the word list!</p> <p>Old Versions :<br /> <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 /> <table><tr><td> <a href="/bbs/?pid=66447#p"> <img src="/bbs/thumbs/pico8_space_hangman-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=66447#p"> space_hangman</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=66447#p"> [Click to Play]</a> </td></tr></table> <br /> <table><tr><td> <a href="/bbs/?pid=66447#p"> <img src="/bbs/thumbs/pico8_space_hangman-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=66447#p"> space_hangman</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=66447#p"> [Click to Play]</a> </td></tr></table> </p> <p></div></div></div></p> <p>Changelog :<br /> <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 /> 2019-08-22</p> <ul> <li>Minor tweak to difficulty curve (helpful bubbles more likely on short words.)</li> <li>Added 11 new categories.</li> </ul> <p>2019-08-08 </p> <ul> <li>Minor removal of unused code, and added a reminder for keyboard users not familiar with Pico-8<br /> </div></div></div></li> </ul> <p>Screenshots : </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/17143/spell_ship_2.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=34989 https://www.lexaloffle.com/bbs/?tid=34989 Wed, 07 Aug 2019 23:10:19 UTC WIP Screenshots of finished games? <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ffeedd><span style="color: #101010;">I love seeing work-in-progress screenshots.</p> <p>The great thing about keeping these screenshots is that after the game is finished, you can tell in retrospect which screenshots were significant and interesting.</p> <p>Pico-8 encourages screenshotting, with its built-in screenshot and gif capability. And the file size is minimal. ... So I figure a lot of folk probably have cool early screenshots of games that later become great games.</p> <p>So let's see 'em!<br></span></td></tr></table></p> https://www.lexaloffle.com/bbs/?tid=30022 https://www.lexaloffle.com/bbs/?tid=30022 Sun, 01 Oct 2017 18:40:22 UTC Feature Request : Box-Drawing Characters <p>I notice the Pico-8 font has some semi-graphical characters, but not <em>quiite</em> enough to make a real retro text-mode UI out of.</p> <p>I'd love to see some of the old DOS <a href="https://en.wikipedia.org/wiki/Box-drawing_character">box-drawing characters </a>added to the pico font if there's space for a few more glyphs.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/17143/Screenshot_11.png" width=508 height=238 alt="" /> https://www.lexaloffle.com/bbs/?tid=29959 https://www.lexaloffle.com/bbs/?tid=29959 Tue, 19 Sep 2017 10:34:55 UTC Space Tavern Poker <p> <table><tr><td> <a href="/bbs/?pid=43606#p"> <img src="/bbs/thumbs/pico59127.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=43606#p"> Space Tavern Poker 1.3</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=43606#p"> [Click to Play]</a> </td></tr></table> </p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ccffcc><span style="color: #101010;">You are <strong>Pat Blastrock</strong>, down on your luck space hero. After a particularly ill-fated adventure, you stumble into <strong>Space Tavern Station</strong> with only 500 credits to your name and a busted up escape pod. (It was a <em>very</em> ill-fated adventure.)<br /> Luckily, if there's one thing Space Tavern Station has an endless supply of, besides surprisingly vile synth-ale, it's suckers. You're going take the only option you have left and gamble your way back to fame and fortune.</p> <p>The poker played here at Space Tavern Station is not a fancy tournament. Here, they play <strong>tavern-style</strong>. You can leave the table at any time, but you can't go &quot;all in&quot;. If you get raised out, you have to fold, so make sure you bring enough cash to play a grownup's game.</p> <p>Some of your opponents might be desperate enough to bet the keys to their ship. Don't feel any remorse in taking that bet. It's not your problem how they're going to get home.</p> <p>If you're light on cash, you can go to your inventory and sell something.<br></span></td></tr></table></p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#eeeeee><span style="color: #101010;"><strong>Controls :</strong><br /> Arrow keys and <strong> (O) </strong> to navigate menus.<br /> <strong> (X) </strong> to go back to the main menu. (Leaving the poker table.)</p> <p><strong>Pause Menu : </strong><br /> Sound : On/Off<br /> High-Viz cards - Alternate card design. Some people find it easier to see.<br /> Reset Data : <em>Delete all data</em> and go back to your initial $500 and busted up escape pod.<br></span></td></tr></table></p> <p>Old Version:<br /> <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 /> 1.1 : <table><tr><td> <a href="/bbs/?pid=43606#p"> <img src="/bbs/thumbs/pico44434.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=43606#p"> Space Tavern Poker 1.1</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=43606#p"> [Click to Play]</a> </td></tr></table> <br /> 1.2 : <table><tr><td> <a href="/bbs/?pid=43606#p"> <img src="/bbs/thumbs/pico44786.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=43606#p"> Space Tavern Poker 1.2.01</a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=43606#p"> [Click to Play]</a> </td></tr></table> <br /> </div></div></div></p> https://www.lexaloffle.com/bbs/?tid=29838 https://www.lexaloffle.com/bbs/?tid=29838 Fri, 25 Aug 2017 11:53:41 UTC The Forum's mobile player <p>The mobile player on the forum is pretty nice, but it's missing one important feature : It doesn't disable the long-press context menu. </p> <p>If you hold the d-pad or a button down (as you do) it pops up a context menu, making the games frustrating.</p> <p>Until this is fixed, I recommend using this bookmarklet to fix it.</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> javascript:(function()%7Bwindow.oncontextmenu%20%3D%20function(event)%20%7Bevent.preventDefault()%3Bevent.stopPropagation()%3Breturn%20false%3B%7D%7D)() </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 forum strips out JavaScript links, so I can't link to the bookmarket, but make a new bookmark, and copy/paste that code into the URL field. Tapping on it will disable the context menu, making Pico8 a joy to play on mobile firefox.</p> https://www.lexaloffle.com/bbs/?tid=29766 https://www.lexaloffle.com/bbs/?tid=29766 Tue, 08 Aug 2017 13:07:35 UTC Player 2 Controls <p>I certainly don't mean to complain about free games, but maybe a gentle reminder that Pico-8 games are not just played on desktop.</p> <p>Using the player 2 controls as &quot;extra buttons&quot; makes it very difficult to play on mobile or on PocketCHIP, or even just with controllers. The problem is compounded when you refer to the buttons by however they're bound on your system instead of their 'official' pico-8 names.</p> <p>Again, I know these are just hobby games, and I haven't paid a dime for them, so I have absolutely no right to complain, but I hope people <em>realize</em> that they're cutting out some potential players when they tell people to press &quot;D&quot; or &quot;Left Shift&quot; or something like that</p> https://www.lexaloffle.com/bbs/?tid=29420 https://www.lexaloffle.com/bbs/?tid=29420 Fri, 02 Jun 2017 11:38:36 UTC Mun Mine <p> <table><tr><td> <a href="/bbs/?pid=40084#p"> <img src="/bbs/thumbs/pico40083.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=40084#p"> Mun Mine </a><br><br> by <a href="/bbs/?uid=17143"> apLundell</a> <br><br><br> <a href="/bbs/?pid=40084#p"> [Click to Play]</a> </td></tr></table> </p> <p>I decided that the first game I should make for this system would be an homage to the earliest game I have strong memories of playing : �Moon Mine�. Published in 1983, �Moon Mine� was available only on the TI-99/4a, Which means that nobody has ever heard of it. I had it though, and it was a blast. For years this was my favorite game.<br /> So here�s my remake. Made from memory and by closely examining the old game manual I found in the basement.</p> <p>The original classic was made by Rob F Hendren and John Phillips and I�ve always felt it didn�t get enough nostalgia love.</p> <p>The instructions are in the system menu. Basically use the arrow keys to move the lasers. O to fire. X to beam down a crew-member to retrieve minerals and water samples.</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;"><img loading="lazy" style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/17143/PICO-8_16.gif" width=256 height=256 alt="" /><img loading="lazy" style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/17143/PICO-8_17.gif" width=256 height=256 alt="" /></div></div></div></p> https://www.lexaloffle.com/bbs/?tid=29256 https://www.lexaloffle.com/bbs/?tid=29256 Sun, 30 Apr 2017 20:02:35 UTC