Bank Run game show FreeBasic game in YouTube TSD Let's Play series

User projects written in or related to FreeBASIC.
Post Reply
DCrawshawJr
Posts: 71
Joined: Oct 24, 2009 13:45
Contact:

Bank Run game show FreeBasic game in YouTube TSD Let's Play series

Post by DCrawshawJr »

A while back, I made an old game for FreeBasic, which in retrospect, was atrocious. It's listed in the FreeBasic Games Directory:

http://games.freebasic.net/dumpbyid.php?input=188

Anyway, I also have a YouTube series featuring my old games. The Bank Run series begins here:

https://youtu.be/Qfca9uAbc4g

What do you all think?
sancho3
Posts: 358
Joined: Sep 30, 2017 3:22

Re: Bank Run game show FreeBasic game in YouTube TSD Let's Play series

Post by sancho3 »

Very cool old school feel and sound.
I think the computer cheated. In the first round it deposited more than $1000 and in the second round it deposited much less.
DCrawshawJr
Posts: 71
Joined: Oct 24, 2009 13:45
Contact:

Re: Bank Run game show FreeBasic game in YouTube TSD Let's Play series

Post by DCrawshawJr »

Yeah, I've noticed that too.

Well here's the problem:

Code: Select all

ComputerGuess1:
    boxvalue(turn,a) = int(rnd * (strategy(strategypick,a,1) - strategy(strategypick,a,0)))+strategy(strategypick,a,0)
    'if strategy(strategypick,a,0) = 10 and strategy(strategypick,a,1) = 250 then 
    '    if moneyleft >= (250-(a-1)) then boxvalue(turn,a) = int(rnd * (250-(a-1))) else boxvalue(turn,a) = int(rnd * (moneyleft-(a-1)))
    'end if
    'print using "TURN # A # SP # S1 ### S2 ### BOXVALUE ###"; turn; a; strategypick; strategy(strategypick,a,0); strategy(strategypick,a,1); boxvalue(turn,a)
    'sleep 500
    if round = 3 then boxvalue(turn,a) = boxvalue(turn,a) * 2
    'if strategypick = 0 and a < 4 then boxvalue(turn,a) = int(rnd * (strategy(strategypick,a,1) - strategy(strategypick,a,0)))+strategy(strategypick,a,0)
    'if strategypick = 0 and a > 3 then boxvalue(turn,a) = int(rnd * 250)+1: if boxvalue(turn,a) > moneyleft- ((6-a)) then guess = moneyleft- ((6-a))
    'if strategypick = 1 and a < 4 then boxvalue(turn,a) = int(rnd * (strategy(strategypick,a,1) - strategy(strategypick,a,0)))+strategy(strategypick,a,0)
    'if strategypick = 1 and a > 3 then boxvalue(turn,a) = int(rnd * 250)+1: if boxvalue(turn,a) > moneyleft- ((6-a)) then guess = moneyleft- ((6-a))
    'if strategypick = 2 then boxvalue(turn,a) =  int(rnd * 250)+1: if boxvalue(turn,a) > moneyleft- ((6-a)) then guess = moneyleft- ((6-a))
    'Rounds to the nearest $10
    if boxvalue(turn,a) mod 10 > 4 then boxvalue(turn,a) = (int(boxvalue(turn,a)/10)+1)*10
    if boxvalue(turn,a) mod 10 < 5 then boxvalue(turn,a) = int(boxvalue(turn,a)/10)*10
    
    'if moneyleft <> 0 then goto ComputerGuess1
I commented the last line which, if uncommented, would have solved the problem. However, it creates a new problem: The computer has to start over if he doesn't have exactly $1,000 in the boxes, which might take forever.

Still, I made an updated version made in Javascript. Stay tuned for the playthrough of that starting Feb. 27 (http://www.thesweepingdeveloper.com/lp_schedule.html). (I'm hoping the computer doesn't cheat this time...)
sancho3
Posts: 358
Joined: Sep 30, 2017 3:22

Re: Bank Run game show FreeBasic game in YouTube TSD Let's Play series

Post by sancho3 »

Concerning the problem of doing the math to figure out the last box.
How about instead of showing the actual amounts in the boxes, just show the guesses and then at the end reveal the actual amounts?
Ryan
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY
Contact:

Re: Bank Run game show FreeBasic game in YouTube TSD Let's Play series

Post by Ryan »

The game is charming, but I honestly think watching you play it is even more entertaining. Makes me want to revisit some of my old games now. : P

Subbing to your channel - I dare you to play through some of our other old games in the future. ^_^
Post Reply