# Colony 44: server cluster ideas
For server we want to use dedicated server architecture. All important game logic and position updates is then running on the server. Server is just verifying user input and sending positions of game objects (in the range) to each player. For compensation of lags there is a position recording for one second backwards. Server has its own tick game time based on frame count. So each client rendering is with “delay” to ensure that every player has current position updated.
Nice inspiration of this server concepts is directly from Valve documentation for developers.
Today you can grab few dolars and you can use a powerfull infrastructure with high bandwidth and allowed transfer per month. Transfer depends on number of players too. If you have a higher budget, you can use powerfull GPU on server for computations instead of bunch of CPU. And then share the computation results thru shared memory. And server is then just sending the results from shared memory to clients in the main loop.
Population of Colony 44 is around 10 000 000 “AI” people as a miners which are divided to players. Ofcourse they are driven by some statistics. In Colony 44 there are a lot of places where are they spreaded. And you are controling some of those areas with workforce for your facilities and ships (but they can run away to somebody else or became a pirates).
Each game location has a jump coordinate. It is based on two angles and a distance from a reference point. However you can modify jump coordinates and explore a new areas (but every jump costs something based on a distance). And you can set there some mining facilities, if there are some resources and workforce nearby. That is the idea. When you are building and configuring something in your locations and no other players are around, your client donesn’t need to know their precise position for 10 times each second.
We like the idea to make a ship battle as a turn based game with some action points. There should be less load on servers too. The ships will slow down their movement to a bullet time. And then you can decide if you want to focus to shoot down incoming missiles or launch your own. Or if you want to do some quick ship repairs and hotfixes. Or if you need to release the overlodaded reactor out to the space to save your crew. Or hack the enemy ship with special ship and release their oxygen. Or if you want locally to return in time few minutes reconfiguring your jump device (but with ship sacrifice). Or to make a temporary black hole in the middle of enemy fleet.
For keeping every state of objects in location we want to use a object database and maybe a graph database. Object database is fast, but it can fail sometimes if two same operations returns different results. There is no support for transactions. So we need to replicate it. Then it should be performant and more reliable if two same operations are designed to return the same result. There are a plenty of solutions for that. Graph database we want to use to query between some objects relations (maybe not necessary).
There are some existing frameworks available to build a whole server cluster. Unity can now generate entire server image with help of google framework. Also there are some other solutions (there are a lot of multiplayer games theese days).
lb
Sunday, Mar 1, 2020