Fruit machine

Post Reply
User avatar
cogier
Site Admin
Posts: 392
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Fruit machine

Post by cogier » Monday 06th January 2020 4:52pm

This is just a bit of fun. NOTE that this requires a minimum i3 to run. It's better on i5 and i7.

Image
FruitMachine.tar.gz
(1.43 MiB) Downloaded 13 times

User avatar
Got2BeFree
Posts: 86
Joined: Saturday 26th November 2016 2:52am
Location: Lost

Re: Fruit machine

Post by Got2BeFree » Thursday 09th January 2020 12:58am

Stupid one-arm bandit stole all my credits! All 5 times I played! :lol: Fun game, thanks!

On line 67 in FMain I added a Wait 0.5 so the "handle" sound meshed better with the reels starting to spin.

It ran about the same speed on all three of my systems.

Intel Xeon
xeon.png
xeon.png (92.46 KiB) Viewed 98 times
Intel Core i3
i3.png
i3.png (89.44 KiB) Viewed 98 times
AtomicPi (Intel Atom)
atomicpi.png
atomicpi.png (111.69 KiB) Viewed 98 times
sholzy

I'm wondering around lost in the past, not knowing where the present is.

User avatar
stevedee
Posts: 183
Joined: Monday 20th March 2017 6:06pm

Re: Fruit machine

Post by stevedee » Thursday 09th January 2020 8:50am

cogier wrote:
Monday 06th January 2020 4:52pm
This is just a bit of fun...
"Good game, good game!" (...google "Bruce Forsyth" if you are not a Brit)

My only suggestion would be to add a jack-pot win for one combination of, say, 100 credits.

I guess you could also get players to enter their names and have a high-score leaders board.



Charlie, I notice you have recently "gone native" and almost completely stopped adding comments to your code!!!

User avatar
cogier
Site Admin
Posts: 392
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Fruit machine

Post by cogier » Thursday 09th January 2020 4:33pm

On line 67 in FMain I added a Wait 0.5 so the "handle" sound meshed better with the reels starting to spin.
That works!
It ran about the same speed on all three of my systems.
That's nice to know as I tried it on a Celeron and it was BAD! :( It was very difficult to stop the reels picking up speed after 1 or 2 had stopped which is why there is a huge loop that does nothing much but it slows slower processors down a lot.
My only suggestion would be to add a jack-pot win for one combination of, say, 100 credits.
Have a look at the sPict array in the Reel class. Say you wanted 3 x BAR to win. The 'Bar' is 3 so add a line in FMain between lines 110 and 111. If sWinningLine = "333" then byCredits = 100 I have not tested this.
I guess you could also get players to enter their names and have a high-score leaders board.
This is a good idea but I am not motivated to do this.
Charlie, I notice you have recently "gone native" and almost completely stopped adding comments to your code!!!
I know and I should as when I was looking for a way to make the "100" credits win I noticed that the Reel class still shows the original 5 reels that was experimented with in the beginning. This redundant code would have been picked up had I added a comment to each line but it seems I have "gone native".

User avatar
Technopeasant
Posts: 31
Joined: Saturday 13th July 2019 6:50pm

Re: Fruit machine

Post by Technopeasant » Saturday 11th January 2020 2:51am

Well, now I am a gambling addict. I hope you are happy... :lol:
Technical director,
Piga Software
http://icculus.org/piga/

User avatar
cogier
Site Admin
Posts: 392
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Fruit machine

Post by cogier » Saturday 11th January 2020 12:23pm

Well, now I am a gambling addict. I hope you are happy... :lol:
Would this help? 8-)

Post Reply