- one continuous 'world' with each player with their nation statistics
- resources, units, research, production and such will all be updated on a tick basis (10 min periods, maybe?)
- long term statistics; e.g. political party popularity for each player updates every 2 weeks
- battles will be ticked and can last for days
Which begs the question of how to implement this tick system. The long term stuff and low bandwidth stuff can be arranged by cron job - simple solution probably. It's the resources and battles and all that stuff that I'm curious about. Most online advice says use timestamps and only update on request by the user, but is it actually that much more efficient? Anybody have any experience with it so they can benchmark?
What bothers me is that, one of the core features of the game will be trade, and with that you need a market place with lists of buy and sell orders. These will need to be kept up to date and every time the user visits the 'market.php' page it will have to do a search query and update it accordingly. I'm worried this could take very long and by the time the user chooses to buy or sell something, the data has changed and they'll get the wrong order when they submit.
I'd guess some of this data can be cached and work quickly but I have no experience with this.
Thanks