alexr [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=10816 Using controller shoulder button presses in a specific pico-8 game <p>I have a controller connected to my laptop. To configure pico-8 for it, I did : launch Gamepad Tool &gt; Copy Mapping String &gt; append string to sdl_controllers.txt &gt; relaunch pico-8. This works well.</p> <p>Now, I would like to use the controller's shoulder buttons as replacements for the d-pad's dpleft (btn 0) and dpright (btn 1), respectively. Can this be done at all? Note that this is not for exported (to html) games but rather to those launched from the pico-8 console.</p> <p>EDIT:<br /> To be clear, I'd like to control a pico-8 game using a gamepad's shoulder buttons.</p> <p>EDIT2:<br /> GamepadTool mapping string, as entered in sdl_controllers.txt is this:<br /> <span style=" display:inline-block; background-color:#eee; padding:2px; margin: 4px; padding-left: 8px; padding-right: 8px; color:#222">03000000bd12000015d0000000010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,</p> https://www.lexaloffle.com/bbs/?tid=36374 https://www.lexaloffle.com/bbs/?tid=36374 Thu, 26 Dec 2019 02:50:33 UTC Jammerboard (TweetTweetJam3) <p>Here's my 558-char TweetTweetJam3 entry, including memory poked sfx (thanks to <a href="https://www.lexaloffle.com/bbs/?uid=10210"> @eruonna</a> for documenting that). <table><tr><td> <a href="/bbs/?pid=0#p"> <img src="/bbs/thumbs/pico8_jammerboard-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=0#p"> jammerboard</a><br><br> by <a href="/bbs/?uid=10816"> alexr</a> <br><br><br> <a href="/bbs/?pid=0#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=35946 https://www.lexaloffle.com/bbs/?tid=35946 Sun, 17 Nov 2019 11:40:21 UTC How to poke memory to create an sfx? <p>How do I create a middle c note in sfx 0 programmatically? I'm not sure on the formula to calculate the offset from 0x6000.</p> https://www.lexaloffle.com/bbs/?tid=35932 https://www.lexaloffle.com/bbs/?tid=35932 Sat, 16 Nov 2019 14:03:39 UTC input addresses <p>I want to control my pico game via html element event handlers. Given that, what memory address (pico8_gpio offset) must I poke at if I want to simulate a btn(0) event? Also, what's the offset for simulating additional player actions, say, btn(0,1)? Thanks.</p> https://www.lexaloffle.com/bbs/?tid=30277 https://www.lexaloffle.com/bbs/?tid=30277 Sat, 18 Nov 2017 10:25:43 UTC Code tab switching shortcut? <p>Is there a shortcut for editor code tab switching? Couldn't find it in the docs.</p> https://www.lexaloffle.com/bbs/?tid=30169 https://www.lexaloffle.com/bbs/?tid=30169 Wed, 01 Nov 2017 05:44:16 UTC pico-8 program function invocation from external script <p>(This may sound convoluted)</p> <p>Is it possible to invoke an embedded (&quot;export html&quot;) pico-8 program's functions from an external javascript file?</p> <p>In this particular case, I wrote a .js app that fetches remote data asynchronously (via ajax). I then want to map that data to a sequence of pico-8 program function names, invoking each one in turn at regular intervals.</p> https://www.lexaloffle.com/bbs/?tid=28072 https://www.lexaloffle.com/bbs/?tid=28072 Tue, 15 Nov 2016 13:51:00 UTC [feature request] Add viewport meta to make site more legible on mobile <p>I often browse the pico-8 forums on my mobile. On my phone (Samsung S4), I have to squint like a maniac because the contents of the pages are not rescaled by the browser, which they would be if the following viewport meta was on each page:</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> &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no&quot; /&gt; </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Can the person responsible for these forums (and web site in general) add that so that I can go back to &quot;squintless&quot; reading. :)</p> <p>Cheers<br /> Alex</p> https://www.lexaloffle.com/bbs/?tid=3876 https://www.lexaloffle.com/bbs/?tid=3876 Tue, 19 Jul 2016 15:19:18 UTC foreach does not iterate over table objects: normal? <p>Hi all.<br /> The following code doesn't work -- players don't get drawn.<br /> What am I doing wrong?<br /> Thanks in advance.<br /> Alex</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> players = {} function make_player(col) local p = {} p.x = 0 p.y = 0 p.color = col return p end function draw_player(p) rectfill(p.x-2,p.y-2,p.x+2,p.y+2,p.color) end function _init() players.home = make_player(1) players.visitor = make_player(8) end function _draw() cls() foreach(players, function(p) draw_player(p)) end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=2516 https://www.lexaloffle.com/bbs/?tid=2516 Thu, 24 Sep 2015 10:12:18 UTC need glitch effects overview <p>Could someone explain how glitch effects similar to <a href="https://www.lexaloffle.com/bbs/?tid=1941">Benjamin Soul´┐Ż's Mr.Beam</a> were done? No code as much as an overview.</p> <p>Thanks in advance.<br /> Alex</p> https://www.lexaloffle.com/bbs/?tid=2398 https://www.lexaloffle.com/bbs/?tid=2398 Tue, 01 Sep 2015 22:44:26 UTC