profpatonildo [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=45642 No way to set gamepad as player 0? <p>Picotron always registers keyboard as player 0, and gamepad as player 1.</p> <p>Even when I boot picotron with the gamepad already plugged in, it gets assigned as if it were a second player (player 1), instead of mirroring the input of the first player (player 0).</p> <p>Is that intended?</p> <p>To work around this, I've been using this to check for both players when handling my input checks:</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>if btnp(0, 0) or btnp(0, 1) then -- do whatever I need 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=141697 https://www.lexaloffle.com/bbs/?tid=141697 Sat, 13 Apr 2024 13:21:52 UTC Kawaiiculator <p> <table><tr><td> <a href="/bbs/?pid=145586#p"> <img src="/bbs/thumbs/pico64_kawaiiculator-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=145586#p"> kawaiiculator</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=145586#p"> [Click to Play]</a> </td></tr></table> </p> <p>Kawaiiculator is a cute calculator, that will help you add, subtract, multiply and divide numbers!</p> <p>It supports simple expressions, decimal numbers, positive and negative numbers.</p> <p>Have fun!</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;">Kawaiiculator has a very juvenile sense of humor. Also, don't divide by zero!</div></div></div></p> https://www.lexaloffle.com/bbs/?tid=141416 https://www.lexaloffle.com/bbs/?tid=141416 Wed, 03 Apr 2024 17:45:39 UTC AltGr key not recognized on 0.1.0c <p>I have a keyboard in which I have to press altgr + q in order to type in the / character.</p> <p>That's not working on 0.1.0c picotron, it seems it doesn't detect the altgr key at all. On the previous version, it worked fine.</p> https://www.lexaloffle.com/bbs/?tid=141077 https://www.lexaloffle.com/bbs/?tid=141077 Mon, 25 Mar 2024 13:35:49 UTC How can I detect the AltGr key on Picotron? <p>I'm working on a desktop app for Picotron and I need to detect when the AltGr key is being pressed. I tried</p> <p>if keyp(&quot;altgr&quot;) then</p> <p>but it doesn't work. I've also tried </p> <p>if key(&quot;alt&quot;) and key(&quot;ctrl&quot;) then</p> <p>and its variants (like &quot;lctrl&quot; or &quot;rctrl&quot;) but it also doesn't detect when I press altgr on my keyboard.</p> <p>Thanks for any help!</p> https://www.lexaloffle.com/bbs/?tid=140961 https://www.lexaloffle.com/bbs/?tid=140961 Thu, 21 Mar 2024 09:23:19 UTC Top Down AI for Enemies <p> <table><tr><td> <a href="/bbs/?pid=115726#p"> <img src="/bbs/thumbs/pico8_topdownai-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=115726#p"> topdownai</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=115726#p"> [Click to Play]</a> </td></tr></table> </p> <img style="margin-bottom:16px" border=0 src="/media/45642/top_down_ai_0.gif" alt="" /> <p>This is an example of how to do enemies that somewhat follow and try to seek the player.</p> <p>It works like this:</p> <ul> <li>each enemy shoots sensors towards the player.</li> <li>if a sensor hits a wall, it gets deleted.</li> <li>if a sensor exceeds a set amount of time, it gets deleted.</li> <li>if a sensor hits the player, a position gets marked as a target for the enemy that emitted that sensor.</li> <li>enemies will move to their target positions.</li> <li>enemies will roam randomly when the player hasn't been detected.</li> <li>enemies have a fov: sensors are emitted only if they are inside the range of this fov.</li> <li>if the player gets too close to enemies, they will detect the player, regardless of their fov.</li> <li>if the enemy can't find the player, it will get deactivated after a set amount of frames or after it reaches its target position.</li> </ul> <p>This example also features:</p> <ul> <li>a bunch of helper functions;</li> <li>animation system;</li> <li>y sorting system;</li> <li>outlined sprites;</li> <li>outlined text printing;</li> <li>floating text messages system.</li> </ul> <p>If this was helpful or interesting for you, please give my itch.io page a visit: <a href="https://profpatonildo.itch.io/">https://profpatonildo.itch.io/</a> or consider buying me a coffee: <a href="https://ko-fi.com/profpatonildo70266">https://ko-fi.com/profpatonildo70266</a></p> https://www.lexaloffle.com/bbs/?tid=48889 https://www.lexaloffle.com/bbs/?tid=48889 Sun, 14 Aug 2022 00:30:44 UTC Any way to export a cartridge's label image? <p>Is there a way to export a cartridge's label image? I'm working on a mod of a cartridge and I wanted to make some small tweaks to the cart's label image.</p> https://www.lexaloffle.com/bbs/?tid=48879 https://www.lexaloffle.com/bbs/?tid=48879 Fri, 12 Aug 2022 17:46:28 UTC Turtle Tailgate! <p> <table><tr><td> <a href="/bbs/?pid=115085#p"> <img src="/bbs/thumbs/pico8_turtle_tailgate_test-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=115085#p"> turtle_tailgate</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=115085#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Controls!</h1> <img style="margin-bottom:16px" border=0 src="/media/45642/controls.png" alt="" /> <p>Arrows to move, Z to confirm, Enter for menu.</p> <h1>How to play!</h1> <p>Don't crash into turtles and avoid starfish and sea urchins!</p> <img style="margin-bottom:16px" border=0 src="/media/45642/hazards.png" alt="" /> <p>Collect hearts for extra lives!</p> <img style="margin-bottom:16px" border=0 src="/media/45642/heart.png" alt="" /> <p>To score points, stay behind turtles for as long as you can, but don't forget to dodge them at the last moment!</p> <img style="margin-bottom:16px" border=0 src="/media/45642/middle.gif" alt="" /> <p>The score multiplier decreases if you are too far away from the next turtle. Keep the multiplier high to score more points!</p> <p>Are you fast enough to keep up?</p> <h1>Tips and Tricks</h1> <p>You don't need to hold the arrow keys. Just tap the direction of the lane you want to switch to and you'll be moved there automatically.</p> <p>If your fingers are fast enough, it is possible to stay in the space between lanes for a short while. That will help you avoid seemingly impossible obstacles:</p> <img style="margin-bottom:16px" border=0 src="/media/45642/ezgif-3-a76ff62a97.gif" alt="" /> <p>You can often squeeze through very tight gaps. Take note of the size of the character's hitboxes:</p> <img style="margin-bottom:16px" border=0 src="/media/45642/hitboxes.png" alt="" /> <p>In the first stages of the game, a heart spawns whenever you get 1000 points. Don't forget to collect these extra lives, as their spawn rate decreases in the later stages.</p> <h1>Credits</h1> <p>I made this game by myself during July 2022. What inspired me was <a href="https://www.lexaloffle.com/bbs/?uid=16423"> @Krystman</a> Shmup tutorials on the Lazy Devs YouTube channel (<a href="https://www.youtube.com/c/LazyDevs">https://www.youtube.com/c/LazyDevs</a>), especially when he demonstrated how to create a parallax scrolling star field. You can see that I implemented that sort of thing with the bubbles in this game. I ended up not making a Shmup, though, but I think I'll try it out someday in the future.</p> <p>The main song of the game is a rendition of Misirlou, a folk song from Eastern Mediterranean countries. I wanted it to sound more like Dick Dale's arrangement of it, which is quintessentially surf rock, but I don't think I've succeeded in capturing that impression. The song is still catchy, though, but some people may feel like it doesn't really fit a marine setting.</p> <p>Thank you so much for playing! I made this game for the fun of it, but consider making a donation if you enjoyed this little toy I've put together for you: <a href="https://ko-fi.com/profpatonildo70266">https://ko-fi.com/profpatonildo70266</a></p> <h1>License</h1> <p>This game is released under CC BY-NC-SA 4.0. Here's a link to a summary of the license: <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">https://creativecommons.org/licenses/by-nc-sa/4.0/</a></p> https://www.lexaloffle.com/bbs/?tid=48720 https://www.lexaloffle.com/bbs/?tid=48720 Mon, 01 Aug 2022 03:51:57 UTC Feature request: help API command <p>In TIC-80, you can type on the command prompt &quot;help&quot; followed by the name of any built in function and the console will then output a short explanation about how to use that function. It would be nice to have something like this in Pico-8 as well. For example, you type in the command prompt:</p> <p>help spr</p> <p>and then Pico-8 outputs a short explanation of how spr works, followed by the parameters it takes.</p> https://www.lexaloffle.com/bbs/?tid=48014 https://www.lexaloffle.com/bbs/?tid=48014 Fri, 03 Jun 2022 03:38:50 UTC Collision and 8 way movement system <p> <table><tr><td> <a href="/bbs/?pid=112642#p"> <img src="/bbs/thumbs/pico8_moveandcollision-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=112642#p"> Collision and 8 way movement 1.0</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=112642#p"> [Click to Play]</a> </td></tr></table> </p> <p>I release this under the CC0 1.0 license: <a href="https://creativecommons.org/publicdomain/zero/1.0/">https://creativecommons.org/publicdomain/zero/1.0/</a></p> <p>This a simple collision system I wrote for fun. It can handle hit boxes with varying sizes and with different amounts of reference/sample points. It can handle collisions using tiles or used x/y positions from objects.</p> <p>Also, in this example there's code for an 8 way movement system with acceleration and sliding along walls.</p> <p>The code is VERY commented, so you can follow along and see what each part of it is doing/why it's there.</p> <p>Feel free to use this in any sort of project.<br /> If this was useful to you, consider buying me a coffee: <a href="https://ko-fi.com/profpatonildo70266">https://ko-fi.com/profpatonildo70266</a></p> https://www.lexaloffle.com/bbs/?tid=48010 https://www.lexaloffle.com/bbs/?tid=48010 Thu, 02 Jun 2022 19:42:30 UTC Load doesn't work with some carts <p>I'm running the Linux version of Pico-8<br /> The load command works with some carts but doesn't work with others. The only output from the pico-8 console is &quot;could not load&quot;. If I launch splore, then I can launch all carts from splore.<br /> I just recently reinstalled my system and the problem started after that.</p> https://www.lexaloffle.com/bbs/?tid=45520 https://www.lexaloffle.com/bbs/?tid=45520 Tue, 30 Nov 2021 22:26:47 UTC Simple input system <p> <table><tr><td> <a href="/bbs/?pid=84964#p"> <img src="/bbs/thumbs/pico8_simpleinputsystem-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=84964#p"> simpleinputsystem</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=84964#p"> [Click to Play]</a> </td></tr></table> </p> <p>Simple input system, to manage key/button presses.</p> <p>Registers pressed and release buttons.<br /> Horizontal axis, vertical axis, O and X buttons are all independent of each other.</p> <p>The code is commented, so you can follow along what it is doing (and possibly improve it, if you wish).</p> <p>As is, it is good enough and does the job, but I wouldn't be surprised if there is a more efficient way of doing this.</p> https://www.lexaloffle.com/bbs/?tid=40643 https://www.lexaloffle.com/bbs/?tid=40643 Wed, 02 Dec 2020 21:06:19 UTC [Feature request] Floppy disk sounds? <p>Working in Pico-8 is pure delight. I think it would be even nicer if we had the option to set Pico-8 to play a brief sound analogous to a floppy disk drive when loading a program/cart. </p> <p>Completely superfluous, but I would be very glad to have this option built in (even if it weren't the default and I had to enable it through a config file or menu).</p> <p>What do you think?</p> https://www.lexaloffle.com/bbs/?tid=39597 https://www.lexaloffle.com/bbs/?tid=39597 Tue, 15 Sep 2020 03:59:43 UTC Circular cartoon fade (vignette effect; fake flashlight) <p> <table><tr><td> <a href="/bbs/?pid=80866#p"> <img src="/bbs/thumbs/pico8_vignette-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80866#p"> vignette</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=80866#p"> [Click to Play]</a> </td></tr></table> </p> <p>Just a simple vignette fade effect (like on loony tunes cartoons, that circular fade in/out).</p> <p>Use X to open the vignette, Z to close it.<br /> Arrow keys move the smiley face.</p> <p>Can also be used to create a fake flashlight effect.</p> <p>The code is very simple and commented, so it can be easily modified/repurposed.<br /> The vignette works with a sprite that you can customize (to create other shapes).<br /> Mine uses 4 sprite slots on the sprite sheet, but you could easily make it work with only one if you really need to save sprites. Just remember to also customize the draw_vignette function to make it work with different sized sprites.</p> https://www.lexaloffle.com/bbs/?tid=39255 https://www.lexaloffle.com/bbs/?tid=39255 Sun, 16 Aug 2020 23:41:11 UTC Music Cart: Sadness and Sorrow (Naruto OST) <p> <table><tr><td> <a href="/bbs/?pid=80439#p"> <img src="/bbs/thumbs/pico8_sadnessandsorrow-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80439#p"> sadnessandsorrow</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=80439#p"> [Click to Play]</a> </td></tr></table> <br /> A cover of Sadness and Sorrow, originally composed by Toshio Masuda for the Naruto OST.<br /> Initially, I wanted to also include the shamisen solo, but it was way too complicated and I ran out of SFX slots to use. Perhaps I'll revisit this in the future and try to include it. </p> https://www.lexaloffle.com/bbs/?tid=39133 https://www.lexaloffle.com/bbs/?tid=39133 Fri, 07 Aug 2020 02:45:39 UTC Music Cart: Big Chungus Main Theme (Big Chungus OST) <p> <table><tr><td> <a href="/bbs/?pid=80316#p"> <img src="/bbs/thumbs/pico8_bigchungus-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80316#p"> bigchungus</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=80316#p"> [Click to Play]</a> </td></tr></table> </p> <p>Now, the best game of all time is also on Pico-8!<br /> Jokes aside, this is just a simple cover of the Big Chungus Main Theme, by Endigo.<br /> Feel free to use it if you make a real Big Chungus game!</p> https://www.lexaloffle.com/bbs/?tid=39095 https://www.lexaloffle.com/bbs/?tid=39095 Mon, 03 Aug 2020 17:48:52 UTC Music Cart: Rocket Jump Waltz (TF2 OST) <p> <table><tr><td> <a href="/bbs/?pid=80099#p"> <img src="/bbs/thumbs/pico8_rocketjumpwaltz-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80099#p"> rocketjumpwaltz</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=80099#p"> [Click to Play]</a> </td></tr></table> </p> <p>One of my favorite songs from the Team Fortress 2 OST.<br /> Original by Mike Morasky</p> https://www.lexaloffle.com/bbs/?tid=39019 https://www.lexaloffle.com/bbs/?tid=39019 Wed, 29 Jul 2020 17:29:45 UTC Bug Smash! <p> <table><tr><td> <a href="/bbs/?pid=79509#p"> <img src="/bbs/thumbs/pico8_bug_smash-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=79509#p"> bug_smash</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=79509#p"> [Click to Play]</a> </td></tr></table> </p> <p><em>&quot;It's a gory version of the Mario Paint game with a chill sound track. Very hip.&quot;</em><br /> <em>u/TheRedBeed from r/pico8</em></p> <p>Smash bugs with Z, move with arrow keys.<br /> To start the game, smash the bug!</p> <p>Player 2 can join and play at anytime. The game gets slightly more unforgiving with a second player, to compensate.</p> <p>You can hold down the buttons to move faster and to smash repeatedly or you can tap them to be more precise.<br /> Smashing multiple bugs in a streak without missing gives you bonus points, but it takes more time.<br /> Be it button mashing or attacking with precision, get rid of all the bugs!</p> <p>Coins give you some points.<br /> Clocks give you some points and more time.<br /> Ice gives you some points and freezes the bugs for a short while, making them easier to smash.</p> <p>Time caps at 30 seconds with a single player, to have that in mind when collecting clocks.<br /> After each wave is completed, you get a bit more time.</p> <p>How long can you last and how many bugs can you smash?</p> <p>This was my first Pico-8 game and it was a lot of fun to make it, I hope you enjoy it as well :)</p> https://www.lexaloffle.com/bbs/?tid=38889 https://www.lexaloffle.com/bbs/?tid=38889 Fri, 17 Jul 2020 19:45:21 UTC Music Cart: Hinata vs. Neji (Naruto OST) <p> <table><tr><td> <a href="/bbs/?pid=79476#p"> <img src="/bbs/thumbs/pico8_hinataneji-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=79476#p"> Music Cart: Hinata vs. Neji (Naruto OST)</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=79476#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is just a music cart I made to learn the music editor. It was very interesting to learn how the music editor works. Now, I want to get better at this and make more music covers in the future.</p> https://www.lexaloffle.com/bbs/?tid=38878 https://www.lexaloffle.com/bbs/?tid=38878 Fri, 17 Jul 2020 01:38:56 UTC Simple Text Box Example <p> <table><tr><td> <a href="/bbs/?pid=78868#p"> <img src="/bbs/thumbs/pico8_bururhopi-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=78868#p"> Simple Text Box Example</a><br><br> by <a href="/bbs/?uid=45642"> profpatonildo</a> <br><br><br> <a href="/bbs/?pid=78868#p"> [Click to Play]</a> </td></tr></table> <br /> This is a simple typewriter style text box, like we see in many RPGs and Adventure games.</p> <p>I was looking for examples of text boxes like these and only found complex and robust examples. They are excellent! But I thought it would be useful to have a simpler more &quot;noob friendly&quot; system. </p> <p>The code is very commented, so anyone should be able to follow along and understand what it is doing. Also, this system is very simple but versatile. It can easily be expanded or customized if you know what you are doing.</p> https://www.lexaloffle.com/bbs/?tid=38668 https://www.lexaloffle.com/bbs/?tid=38668 Sat, 04 Jul 2020 03:11:34 UTC