3

The game itself is not complex at all -a simple board game. But complexity comes from the fact that when 1 player makes a move, the opponent must get this information immediately.

Obviously this is the responsibility of the backend. I plan to use Firebase for this purpose, but I am not sure if Firebase is capable to pass thru tons of messages like this. And I know it has cons because it's cheap and mBaaS cloud service.

Reading the docs did not tell me much - only bragging how they can do this all.

Does anyone have personal experience with Firebase and real-time game that exchanges a lot of messages between 2 players? Do I need any special setup in the code?

sandalone
  • 41,141
  • 63
  • 222
  • 338
  • 3
    As far as my knowledge, it is termed as `real-time database`. So basically nothing should stop you. However you can test it for free upto 100 simultaneous connections and you can decide on that.. – Guruprasad J Rao Apr 07 '17 at 15:10
  • There are alot of optimisations going in firebase, so maybe do not listen for changes, but send Firebase Cloud Messages on each turn to let the other side its done – X3Btel Apr 07 '17 at 15:14
  • 1
    Have you considered this- https://developers.google.com/games/services/android/turnbasedMultiplayer , – X3Btel Apr 07 '17 at 15:16
  • @X3Btel I will check multiplayer support for turn-based game but I have to see if it can handle the extra calculations the game does on the server on each turn. – sandalone Apr 07 '17 at 15:23
  • 1
    I will tell you this: Firebase is *blisteringly fast* by comparison to a lot of other databases. I have beat on Firebase with big datasets and it didn't even breath hard. So yes, Firebase can handle what you've described easily. It's real time and users will be notified of changes instantly (depending on the internet connection). – Jay Apr 07 '17 at 20:42
  • firebase can handle this very very easily. But, be aware there are many "baas" specifically for games (gamesparks, playfab, etc - these are huge industry players) – Fattie Sep 20 '17 at 12:45

1 Answers1

4

Yes it is definitely suitable. I build a game for iOS using firebase as backend and it is capable handling that messages. You don't need any special setup just include the sdk and configure Firebase in your Appdelegate class and voila start using your real time database.

Short description: Firebase is a cloud hosted Realtime Database. The data is stored as JSON and synchronized in realtime to every connected client. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data[Description from Firebase].

Kerem Baydoğan
  • 10,475
  • 1
  • 43
  • 50
Developer Omari
  • 434
  • 5
  • 14