Fruit Machine - problems!!
-
I made one of these once ( using a Dev kit which shall remain nameless) . My approach was to make images of the reels then move them up as they span. When a reel's image gets to the top it goes back to the bottom. The height of the reel can be controlled by an angle variable so that setting a random start position is simply a matter of setting random start angles.
Let me know if you'd like a clearer explanation. I was thinking of trying my hand at one of these myself. -
Thank @mario-bodemann and @DomDom both good ideas. I’ll definitely be back with an update and probably more questions!
@MikeDX also had a good solution on discord which I need to read a few times as may be above my understanding!
-
Here is a closeup picture of my attempt at this
-
By the way, did you draw the fruits yourself? I could not find any in the media vault.
-
Nice @DomDom !! I got it 'working' (not done much more since) but having an array of symbols. So AppleSpr[0], [1] etc. Not the most efficient way, but thats the great thing about coding, lots of ways to do things.
yea, the symbols took some finding, but I settled on "Ravenmore/platformPickups".
Some really nice graphics generally there too.
-
DomDom that is pretty awesome looking!
-
Thanks Steve. All for less than 100 lines of code. I will try to get around to commenting it then I will share it.
-
@SwitchedOn That's better! Thanks.
-
That looks superb @DomDom - how on earth have you got the 'curved' effect on the reels? That looks so cool.
I feel a bit silly for trying it myself now as I'd not be able to do what you've done here :(
-
Basically it involves using drawquad() with a dash sin()
I''ll post some kind of explanation soon but first want to refine one step in the process -
@SwitchedOn said in Fruit Machine - problems!!:
That looks superb @DomDom - how on earth have you got the 'curved' effect on the reels? That looks so cool.
I feel a bit silly for trying it myself now as I'd not be able to do what you've done here :(
My word, it looks incredibly good. I get frustrated as I wouldn't even THINK of doing that, let alone knowing how too. I'd love to see the finished code if you wouldn't mind.
-
Don't sell yourself short man. As I said, I've done this before. The first version started off looking a lot like yours. It wasn't until the basic version was up and running that the ideas for tweaks (and how to go about implementing them) started to arise. I expect you would have had much the same experience.
I'll post the code when it has been commented. -
FF633MND1U.
I haven't explained everything but I'm sure you'll get the gist
-
-
@DomDom said in Fruit Machine - problems!!:
FF633MND1U.
I haven't explained everything but I'm sure you'll get the gist
Thank you! Says "project not found" so probably not been put live yet?
But appreciate it thanks, looking forward to checking it out.
-
It has just been approved
-
thanks @pianofire
-
incredibly clever @DomDom - I probably would have got the reels 'spinning' but to do it in pseudo 3D as you've done is another level.
Thanks for the detailed commenting too, really appreciate it. Will be digging through this for some education!
-
My pleasure.