Advertisement

Is this the right architecture for our MMORPG mobile game?

Started by October 05, 2011 10:26 AM
0 comments, last by Acharis 13 years ago
These days I am trying to design architecture of a new MMORPG mobile game for my company. This game is similar to Mafia Wars, iMobsters, or RISK. Basic idea is to prepare an army to battle your opponents (online users).

Although I have previously worked on multiple mobile apps but this is something new to me. After a lot of struggle, I have come up with an architecture which is illustrated with the help of a high-level flow diagram:

DiVx2.png

We have decided to go with client-server model. There will be a centralized database on server. Each client will have its own local database which will remain in sync with server. This database acts as a cache for storing things that do not change frequently e.g. maps, products, inventory etc.

With this model in place, I am not sure how to tackle following issues:

  • What would be the best way of synchronizing server and client databases?
  • Should an event get saved to local DB before updating it to server? What if app terminates for some reason before saving changes to centralized DB?
  • Will simple HTTP requests serve the purpose of synchronization? _ How to know which users are currently logged in? (One way could be to have client keep on sending a request to server after every x minutes to notify that it is active. Otherwise consider a client inactive).
  • Are client side validations enough? If not, how to revert an action if server does not validate something? I am not sure if this is an efficient solution and how it will scale. I would really appreciate if people who have already worked on such apps can share their experiences which might help me to come up with something better. Thanks in advance.

    Additional Info:

    Client-side is implemented in C++ game engine called marmalade. This is a cross platform game engine which means you can run your app on all major mobile OS. We certainly can achieve threading and which is also illustrated in my flow diagram. I am planning to use MySQL for server and SQLite for client.

    This is not a turn based game so there is not much interaction with other players. Server will provide a list of online players and you can battle them by clicking battle button and after some animation, result will be announced.

Client-side is implemented in C++ game engine called marmalade... Server will provide a list of online players and you can battle them by clicking battle button and after some animation, result will be announced.[/quote]Using a cannon to kill a fly. Plus reinventing the wheel. Just download any free PHP script written by some smarter kid and upload it on the server.

Also, seeing how 50% of your diagram is used on a simple login/signup, I say you are in a big trouble. You definitely need to research the topic more (there are many open source games similar to the one you described, just download and see how they did it).

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

This topic is closed to new replies.

Advertisement