Jump to content
  • Advertisement
Sign in to follow this  
Naujas Try

The best implementation of multiplayer game ? (android studio)

This topic is 814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hallo,

I like to create apps and games using Android studio but I've never created multiplayer game. I know only basic consepts. Recently a very nice idea came to my head and I started to think about it. It would be a kind of a game where all players compete against each other but they dont meet virtually. For example, each player will have 3 different attributes: attack, defense and speed. Players will individually train these skills (for example by clicking the screen or doing other tasks) but there will be the table of statistics where all other player may see your stats. So each time the player makes a progress, the table should be updated. Pretty much the same like in games such as travian, etc. :

http://imgur.com/a/gK4iv

 

Also during particular events players will be able to join the teams (alliances) and the system will automatically simulate the battles. As I mentioned there will be no virtual world where players can meet, fight, etc. Their only responsibility will be to train their own skills by doing tasks and then see the result of their battles (the battles will be simulated by the system). 

So, my questions are:

1) how do I implement such multiplayer system?

2) would it be enough to have just a database and every 2-3 mins save each player's statistics and display it to other players? or it would be too laggy cuz database operations are quite expensive...

3) maybe there are any alternatives special for android studio? i've found this guide: https://developers.google.com/games/services/android/realtimeMultiplayer

but it didn't help cuz in my game there will be no quick games or invite players to lobby opportunities. I want that each player can see other players statistics in real time.

4) what are some useful resources about multiplayer games that I should read before starting to work on my project?

Edited by Naujas

Share this post


Link to post
Share on other sites
Advertisement

In addition to your Android client software, you're going to need some kind of server to record each player's stats and distribute them to the other players. You'll also need to decide whether the battles happen on the client or the server. I can see advantages to both.

 

The database performance isn't going to matter much until/unless you have millions of players so I wouldn't worry about it much. Your players are *NOT* going to be happy if they lose all their progress because your server crashed so make sure you have a plan to preserve that player data in the event of disaster. That means data replication to multiple servers and/or regular backups to somewhere off-site.

 

When you're looking for tutorials, ignore anything about making real-time games. The interaction you described does not sound like real-time to me. What does it matter if your opponent's stats are a few seconds (or a few hours) out of date? You just need an opponent to fight and then you need to communicate the results of that fight back to the server. Instead, look for tutorials about how to create and use a basic RESTful server API.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!