Vertical scrolling bar like a slotmachine

Hi,

i’ve tried to program a slotmachine like scroller.

I needs to do following:

  • Has lot’s of thumbs (images in a row)
  • Scroll vertical (unlimited) so when go’s offscreen, move y to outside top of screen en rescroll etc etc
  • Can accelerate
  • Can stop

As you can see, it’s identical to a slot machine, i like to do this without animation, so the current slot machine source code won’t satisfy!

first try: i’ll tried it with accelerating the images (so each image) has a speed and when off screen place it back to the top off-screen so simply replacing the y. With this solution i got stuck with the acceleration, images are going over each other.

Second try, doing it with two identical groups with images and then scroll the whole group and then place the group on top of the other, also the same problem as the first try, got the speed conflict, images overlapping.

Anybody got an idea how i can accomplish this ?

Thanks [import]uid: 2734 topic_id: 28474 reply_id: 328474[/import]

There is a sample of a slot machine in the code exchange, although it’s horizontal it could be easily modified; https://github.com/altuzar/MarioSlotMachine

I’m not sure what you mean “without animation” - that would mean you just had static images and no movement at all, which wouldn’t work at all for a slot machine.

The issue with images overlapping in your code is something you’d really have to provide code or plug and play for, we can’t really guess what the cause is otherwise. [import]uid: 52491 topic_id: 28474 reply_id: 114926[/import]

Hi Peach,

Thanks for the link, i could use some of the code over there, thanks.

I mean by animations, that when the spin starts, it pushes over a animated image and when the bar stops, it will slide in after the animation.

Cheers,
Jasper
[import]uid: 2734 topic_id: 28474 reply_id: 114949[/import]