Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by mostlygeek

Hi,

I'm pretty new to Impact. What do you guys recommend as the best way to animate a slot machine reel.

Should I:

1. one entity for each tile and animate them (seems really slow / inefficient)

2. create an Image() and position is based on the reel's position?

3. create a BackgroundMap() and position it? The BackgroundMap class has some assumptions on how a background map should work, so this is not a perfect fit.

4. create a new module, ie: impact.slot-reel, that works like BackgroundMap() but accepts various tiles, preRender's them into a new chunk, and draw/repeat that?

- this seems like a pretty efficient way to animate them, as I only need one for each reel (5 in total).

5. ??

Thanks for any suggestions.

1 decade ago by dominic

I'd go for with #2. You can have each strip of the slot machine as an ig.Images, that you draw one or two times when it wraps around. If you put this its own module is really up to you :)

BackgroundMaps really have a different use case; tiles as Entities is a bit harder to manage, since you have to keep track of all of them.
Page 1 of 1
« first « previous next › last »