Jump to content

  • Log In with Google      Sign In   
  • Create Account


Android turn based multiplayer: how to implement


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 willmer   Members   -  Reputation: 142

Like
0Likes
Like

Posted 28 February 2013 - 11:01 AM

I am fairly new to Android development but feel confident in my ability to learn and implement new concepts.  I have been working on a Pokemon-style battle game and right now would like to focus on the multiplayer.  It would be a simple 2 player battle where each player has one monster that is fighting (maybe more in the future).  It would be turn based but I'm putting in a speed system where the order of who goes may change depending on the move used, but it is still turn based.  Having a lobby where people can select who they want to fight would be nice too.

 

What options do I have to implement this multiplayer battle system and which of those options is going to be easier to learn?

 

I have seen people suggest Skiller SDK, but it appears to be too limited to use, maybe not.  I only have a very basic understanding of servers so it would be a lot to learn (and maybe pay for?).  I know things change if I want the battle to be hosted some  place or just have the phones communicate back and forth (the latter is preferred).



Sponsor:

#2 hplus0603   Moderators   -  Reputation: 4517

Like
1Likes
Like

Posted 28 February 2013 - 11:25 AM

You could probably build this game on top of any web framework and database. Which one you are more likely to learn easily depends on what your experience and available services is.
The matchmaking and games could be done with polling for a game that's not too big. Once the game gets big, hopefully there's enough money to help build a dedicated version :-)

Some names to check out:
PHP and CodeIgniter
Ruby and Rails
Erlang and Nitrogen
Haskell and Yesod
Python and Django
Java and Spring
Node.js and Express
C# and ASP.NET
C++ and boost::asio

Node.js is nice, if your server host supports it, because it allows persistent connections, websockets, and JavaScript scripting which is similar to how you develop for web browsers. It can also scale pretty big before needing a re-architecture. If you really have no particular favorite, I'd probably recommend you start there.
enum Bool { True, False, FileNotFound };

#3 willmer   Members   -  Reputation: 142

Like
0Likes
Like

Posted 28 February 2013 - 02:22 PM

I only have experience with Java so Spring looks attractive.  Is is going to offer similar things as the other options?



#4 C0lumbo   Crossbones+   -  Reputation: 1830

Like
0Likes
Like

Posted 01 March 2013 - 03:05 AM

You could also consider using a backend-as-a-service (BAAS) provider if you don't want to get your hands dirty writing server side code or dealing with the logistics of setting up server machines and worrying about scalability, etc.

 

I found this article fairly useful http://www.raywenderlich.com/20482/how-to-choose-the-best-backend-provider-for-your-ios-app-parse-vs-stackmob-vs-appcelerator-cloud-and-more which tallied well with my impression that Parse looks like the best of the bunch (in terms of API at least).



#5 Olof Hedman   Crossbones+   -  Reputation: 2215

Like
0Likes
Like

Posted 01 March 2013 - 04:42 AM

To get a simple server up and running fast and cheap, and easily scale it up if and when you actually start to get some serious traffic, then Google App Engine is nice too.

Can program it either in python, or in Java.

The database is best for data that is written seldom, and read a lot though, so maybe not ideal for multiplayer, but should be ok for something low intensity like turn based battle.

We use if for level editing and sharing levels in our labyrinth game. (among other things)

Edited by Olof Hedman, 01 March 2013 - 04:46 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS