Hello! I’m working on a simple multiplayer word game like scrabble or Wordfeud for android. What kind of server do I need to make this work? I can’t find any tutorial on multiplayer for android.
I’d recommend you give a look at Firebase Cloud Firestore. It is a service that stores structured data online and handles authentication & access permissions too. GDevelop integrates it and allows you to watch changes, so you can make the game respond in real-time to changes to the data stored online, and of course send and receive data.
That way, you can keep players’ moves and the game state saved online, so even if the players exit or crash the game, they can resume it later, or they can play multiple games in parallel, but you can still get that real-time game experience.
Thank you for your reply! I have been reading about Firebase and it seems very interesting. Would you say Firebase is the easiest way or maybe the only way to accomplish this? I have a lot of experience with php and MySQL, but not that much with GDevelop or android. Thinking that maybe php can be used? Or maybe GDevelop P2P? There will never be more than 2 players in each game, so maybe Firebase will be too advanced?
I’d say Firebase is the most practical here, yeah. You could use PHP and MySQL if you know what you’re doing, but these tools don’t really have real-time capabilities in the same way Firebase does and would require quite a lot of code out of GDevelop, whereas you can have real-time reaction to changes and all your game logic kept within GDevelop with Firebase.
P2P is a nice option for action games, where a lot of always updating data is transmitted, and missing a few updates is not important as new data is coming all the time anyways.
For a game like you describe, e.g. scrabble, there are relatively few updates being transmitted (one update each time a player does their move) and it is more important that this single update is correct & being reliably and correctly transmitted. In this case, a database like Firestore is more suitable.
For a multiplayer word game like Scrabble, you’ll likely need a backend server to handle player interactions, game state, and real-time updates. A good starting point could be using Firebase Realtime Database or Firestore, as they simplify setup and syncing across players.
Yes thank’s, I’ve been working a bit with Firebase now and realized that it’s a good alternative. And it seems very easy to integrate into gdevelop.
I haven’t gotten that far with my game. But I’ve made a very basic login page. When a new player starts the game for the first time, they are asked to choose a username. If the username does not already exist in the Firestore, it will be saved along with a unique ID. The ID and username are also saved in the user’s phone’s storage, in order to automatically log in the next time the game is launched. I understand that this is not a safe way to do it, but it works very well and is so easy. Just wondering what happens to the data stored locally in the storage? Will this be deleted automatically at some point? Maybe only when you delete the game or clear the game cache?
Setting up an Android multiplayer server can be a super fun project! If you’re aiming for something smooth and reliable, I’d say go with dedicated server hosting. It might sound fancy, but it’s just renting a powerful computer online to handle all the player connections, game logic, and data without hiccups.