Log In  
Follow
technohat
[ :: Read More :: ]

Cart #picolemonade-0 | 2022-03-18 | Code ▽ | Embed ▽ | No License
3


Pico Lemonade
Copyright (c) 2022 by Chris Pepin

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?

Answer all these questions and more in this upgraded port of the classic 1973 game Lemonade Stand!

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?

Plays great on PC with the keyboard or on a handheld like the Gameforce Chi

5 different game modes. (2 hidden)(Can you find them?)

Special Thanks

Bob Jamison - For Creating Lemonade Stand in 1973

Charlie Kellner - Who ported Lemonade Stand to the Apple II in 1979

DW817 - For His Two Digit Merchant Code and thunder sfx

Michael Mahon, David E. Gobel, Jeff Horn and Andy Poe - For helping me decipher the underlying economics of the game.

Joseph White (aka Zep) for creating Pico-8

P#108827 2022-03-18 03:05 ( Edited 2022-03-18 11:46)

[ :: Read More :: ]

Cart #zemehimera-0 | 2022-03-04 | Code ▽ | Embed ▽ | No License


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?

function _init()

cls(0)

scene="title"

end

function _update()
if scene=="title" then
update_title()
elseif scene=="instructions" then
update_instructions()
elseif scene=="page2" then
update_page2()
elseif scene=="page3" then
update_page3()
end
end

function _draw()
if scene=="title" then
draw_title()
elseif scene=="instructions" then
draw_instructions()
elseif scene=="page2" then
draw_page2()
elseif scene=="page3" then
draw_page3()
end

end

function update_title()

if btnp(❎) then
    scene="instructions"
end

end

function draw_title()
cls(12)
sfx(4)
print("title page",30,45,10)
print("press ❎ to start",30,63)

end

function update_instructions()
if btnp(❎) then
scene="page2"
end
end

function draw_instructions()
cls(3)
print("instructions",40,5,7)
print("page 1",25,45,4)
print("press ❎ to continue",25, 120,7)
end

function update_page2()
if btnp(❎) then
scene="page3"
end
end

function draw_page2()
cls(3)
print("instructions",40,5,7)
print("page 2",25,45,4)
print("press ❎ to continue",25, 120,7)
end

function update_page3()

end

function draw_page3()
cls(3)
print("instructions",40,5,7)
print("page 3",25,45,4)

end

P#108000 2022-03-04 00:26 ( Edited 2022-03-04 00:31)

[ :: Read More :: ]

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.

function _init()
cls()
potions = 0
gold = 200
cost_of_potions = 4
buy_potion_amount = 0
end

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#107747 2022-02-27 14:56

Follow Lexaloffle:          
Generated 2024-03-29 09:10:24 | 0.078s | Q:14