technohat [Lexaloffle Blog Feed] picolemonade <p> <table><tr><td> <a href="/bbs/?pid=108827#p"> <img src="/bbs/thumbs/pico8_picolemonade-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108827#p"> picolemonade</a><br><br> by <a href="/bbs/?uid=63702"> technohat</a> <br><br><br> <a href="/bbs/?pid=108827#p"> [Click to Play]</a> </td></tr></table> <img style="margin-bottom:16px" border=0 src="/media/63702/3_pico_lemonade p8_6.png" alt="" /><img style="margin-bottom:16px" border=0 src="/media/63702/pico_lemonade p8_7.png" alt="" /><br /> Pico Lemonade<br /> Copyright (c) 2022 by Chris Pepin</p> <p>Do you have what it takes to sell lemonade? How many glasses should you make each day? How much advertising to you need? What price will net you the most cash? Will the weather cooperate?</p> <p>Answer all these questions and more in this upgraded port of the classic 1973 game Lemonade Stand!</p> <p>You're a video game starved student looking to earn a couple of extra bucks. You have until the end of summer to sell enough lemonade to bring your savings up so you can buy the latest video game console! You're so close, but will you make it in time? </p> <p>Plays great on PC with the keyboard or on a handheld like the Gameforce Chi</p> <p>5 different game modes. (2 hidden)(Can you find them?)</p> <p>Special Thanks</p> <p>Bob Jamison - For Creating Lemonade Stand in 1973</p> <p>Charlie Kellner - Who ported Lemonade Stand to the Apple II in 1979</p> <p>DW817 - For His Two Digit Merchant Code and thunder sfx</p> <p>Michael Mahon, David E. Gobel, Jeff Horn and Andy Poe - For helping me decipher the underlying economics of the game. </p> <p>Joseph White (aka Zep) for creating Pico-8</p> Fri, 18 Mar 2022 03:05:26 UTC Weird issue with title screen music <p> <table><tr><td> <a href="/bbs/?pid=108000#p"> <img src="/bbs/thumbs/pico8_zemehimera-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108000#p"> zemehimera</a><br><br> by <a href="/bbs/?uid=63702"> technohat</a> <br><br><br> <a href="/bbs/?pid=108000#p"> [Click to Play]</a> </td></tr></table> <br /> I've been playing around with figuring out music on the Pico-8. I decided to whip together a quick title screen test. The code is supposed to play a little ditty (sfx(4)) on the title screen but nothing plays until after I press X to go to the next screen. As far as I can tell, code wise that shouldn't be happening. Any idea what's going on here?</p> <p>function _init()</p> <pre><code>cls(0) scene=&quot;title&quot;</code></pre> <p>end</p> <p>function _update()<br /> if scene==&quot;title&quot; then<br /> update_title()<br /> elseif scene==&quot;instructions&quot; then<br /> update_instructions()<br /> elseif scene==&quot;page2&quot; then<br /> update_page2()<br /> elseif scene==&quot;page3&quot; then<br /> update_page3()<br /> end<br /> end</p> <p>function _draw()<br /> if scene==&quot;title&quot; then<br /> draw_title()<br /> elseif scene==&quot;instructions&quot; then<br /> draw_instructions()<br /> elseif scene==&quot;page2&quot; then<br /> draw_page2()<br /> elseif scene==&quot;page3&quot; then<br /> draw_page3()<br /> end</p> <p>end</p> <p>function update_title()</p> <pre><code>if btnp(❎) then scene=&quot;instructions&quot; end</code></pre> <p>end</p> <p>function draw_title()<br /> cls(12)<br /> sfx(4)<br /> print(&quot;title page&quot;,30,45,10)<br /> print(&quot;press ❎ to start&quot;,30,63)</p> <p>end</p> <p>function update_instructions()<br /> if btnp(❎) then<br /> scene=&quot;page2&quot;<br /> end<br /> end</p> <p>function draw_instructions()<br /> cls(3)<br /> print(&quot;instructions&quot;,40,5,7)<br /> print(&quot;page 1&quot;,25,45,4)<br /> print(&quot;press ❎ to continue&quot;,25, 120,7)<br /> end</p> <p>function update_page2()<br /> if btnp(❎) then<br /> scene=&quot;page3&quot;<br /> end<br /> end</p> <p>function draw_page2()<br /> cls(3)<br /> print(&quot;instructions&quot;,40,5,7)<br /> print(&quot;page 2&quot;,25,45,4)<br /> print(&quot;press ❎ to continue&quot;,25, 120,7)<br /> end</p> <p>function update_page3()</p> <p>end</p> <p>function draw_page3()<br /> cls(3)<br /> print(&quot;instructions&quot;,40,5,7)<br /> print(&quot;page 3&quot;,25,45,4)</p> <p>end</p> Fri, 04 Mar 2022 00:26:46 UTC item shop code help <p>Lets say I'm creating a game with an item shop that carries only one item (potions for example). I want the user to be able to buy up to 99 potions at a time. </p> <p>function _init()<br /> cls()<br /> potions = 0<br /> gold = 200<br /> cost_of_potions = 4<br /> buy_potion_amount = 0<br /> end</p> <p>I want the user to be asked how many potions they want and then they would need to enter it via the gamepad. I know Pico-8 now allows keyboard entry, but I don't want to use that as I want the game to be playable on handhelds like the Gameforce Chi which don't have keyboards. The code would need to check the number of potions the user is buying and compare it to the amount of gold they have and only let them buy the amount if they have enough gold. What would be the best way to implement this? I want it to be easy and quick for the user to enter any of the numbers between 0 and 99. Is there any things I should avoid because they use up to many tokens or are unwieldy code wise? Any suggestions would be appreciated. Thanks!</p> Sun, 27 Feb 2022 14:56:27 UTC