flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
9.01k stars 883 forks source link

Designing an Arcade #254

Closed thoward27 closed 4 years ago

thoward27 commented 4 years ago

Hello and thank you for this great game engine.

Today, I am desperately trying to figure out what the design patterns should be to create an arcade in flame. I need to provide a homescreen, game selection screen, and a number of leaderboards. Unfortunately, I can't seem to put my finger on any good resource for this type of work. Everything I'm finding is based around a single game with a lot of code in main that seems non-portable.

If anyone has any experience with this I would really appreciate a nudge in the right direction!

erickzanardo commented 4 years ago

Hey,

Flame does not implements any type of screen change features, we decided to leave that to Flutter's route system, which is already quite powerful. So since a Flame game is a widget in the end, you just need to register it on a router to have multiple screens.

Let me know if you have further questions.

thoward27 commented 4 years ago

Thanks for the quick reply! Do you know of any examples that I could explore? I'm having trouble determining how to handle gestures/tap interactions across multiple games.

erickzanardo commented 4 years ago

Take a look on this repository, maybe it help you

https://github.com/fireslime/gravitational_waves

For handling taps I suggest you taking a look on Flame gesture api, you can find about it o the input section of the flame site.

thoward27 commented 4 years ago

thank you! Really appreciate all of your help! Closing for now, will re-open if I have future questions

erickzanardo commented 4 years ago

Thanks for the feedback, feel free to re open if needed, although I would recommend you joining our Discord, we have channels for help there, you can find the link for it on the README.