Help me design an MMO-ish turn-based strategy,
Crossbones+ - Reputation: 2448
Posted 04 September 2012 - 04:08 AM
But instead of being real-time I want to make it turn-based and use a statistical method instead to simulate units going about their business.
Members - Reputation: 697
Posted 04 September 2012 - 07:01 AM
The simplest solution I can think of, is to make the networking entirely http based. That way you can code the account system in php connected to a MySQL db or whatever server side language you prefer. And for a turn based muiltiplayer game with no more than 32 players at a time, you could just as well code the game logic in php.
That way every player just needs to connect to the server every second to check for updates.
Your updates could contain some json or xml with info on the recent moves/actions and maybe the entire game state, just to verify the synchronization. The update should also let everyone know whose turn it is.
This is no an optimized approach, since every player connects to the server even if there are no new updates. You could write the server using simple tcp sockets for better performance, but I don't think you'll gain anything from that on a 32 players tbs. Any ways code the account/login system in php or other server side language.
Hope this helps