Question

I am developing a game for iOS and Android mobile platforms. I am curious about the database side of things as the game I am developing has a multiplayer feature in which a player would play a level and send its score to another player (like in a challenge format). When the other player plays the game, the app will query the database and finds a challenge has been issued to him. He then accepts the challenge, etc.

For this feature should I be using a SQL database hosted by, say, Microsoft/Amazon? Or are there other avenues for this?

Was it helpful?

Solution

Let's try a constructive answer here - although at the end you show zero effort to solve it.

Basics:

  • YOu have a multiplayer game.
  • It runs on mobile devices.

THe later is critical - this means (a) not trusted, (b) possibly not reachable (behind NAT - never seen a public IP for example in a mobile phone environment).

So yes, by definition if you want to coordinate things like highscore etc. you per definition need an external (central) data store of some sort. Thre is no way around this because you IOS (IPhone, IPad) and Android (tablets, phones) make seriusly poor servers and any coordination needs "Known constants" (url, IP address) at least to "boot" a mesh.

Where you put it is a question you have to decide or ask with a lot more info. Same on what you need. A game with 10 people at the same time is different from a million people in requirements. Generally goind with some cloud helps to scale faster but if you get serious base load - the prices aren not so low.

Where you go should also depend. If I would go cloud I would go Azure because my development is all microsoft stack and azure integrates EXTREMELY nice into all the operations and maangement and development tools. I am not even sure what stack you would use (IOS+Android at the same time) - likely it is based on Java which.... sort of is hard for the back end. Not as a language but... It is hard to find a decent host (web hosting) with java, so you are on a virtual machine. Your technology stack should run a lot of decisions for you - try to avoid adding more and more langauges just because you can - makes things harder to maintain.

One word of warning: NEVER put the database on the internet, always use an application elvel proxy (i.e. a website with a REST / JSON api for example). THe databsae is a nice large big target and if someone hacks it - bye bye to basically all the game.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top