I'm currently trying to wrap my head around a suitable server architecture for a mobile tower defense game, which is verified on the server side. I've tried to analyze some apps from the app store, but reading the binary protocol is kind of hard.
Anyways, most of these games have the following in common:
- You can upgrade characters / towers beforehand
- Optional: you choose what you bring into the battle (deck)
- You select the mission
- You start, place towers, upgrade them ingame etc (there is NO internet connection require during the whole battle)
- You finish and get rewards (internet connection required again).
Almost all of them seem to use HTTPS apis.
Question is: Are there any books / references for such an architecture? I'm guessing that I'll have to replay the whole battle on the server for point 5, so I need to send all the user's commands to the server after the battle is done.
Every game server must be informed of the characters attributes, so for the replay the must queue the (huge) database server for these attributes of the towers the player put into battle, right? It isn't sufficient to "hardcode" the gameserver, since whenever a player upgrades e.g. attack damage, the master server reduces resources and increases the unit's damage. So it's kind of dynamic.
I also need to send the wave data (5 units of type x on timestamp y) right when the mission is started, correct?
I also thought about microservices (Unit service, Resource (Gold, other currency) Service, Mission Service) but there would be a lot of roundtrips for every replay. Ask the mission service for the wave information, ask the unit server for unit stats, verify, send response. These are a lot of internal http requests.
I found a lot of papers on FPS games, but really not any good one about such a game. Any hints? Are my assumptions correct?