hi, i have been working on a rts demo that can be synched over network with a lock step system.
if you read about it before you may know that there are serious problems that should be solved to achieve this. well this is not going to be a silver bullet that can be used in production but should help you understand how you can start with it. current implementation is simple in all aspects, no graphics, no pathfinding, no fancy ai etc. and it is not supposed to provide these. what i am offering is:
a simple scenario:
-someone creates a game and waits in lobby, players join in(2-4), when everyone set ready, game starts.
-every player starts with a couple of units and units go on spawning at regular intervals until a limit is reached.
-you can select and move units around. they will attack any unit in range without waiting your order. dead units will be recycled for spawning.
-if anyone quits, everyone will be forced to quit.
technically:
-well commented, simplistic(not the optimal) c# source code. possibly less than 1k lines.
-uses unity networking(only rpcs) and unity random.
-lock step mechanism: 10 fps simulation(FixedUpdate), store input, send at certain intervals, simulate when all inputs are received.
-if a client is slow or has high ping values, others game freezes until they receive the ack. in my tests i could get good results with about 100ms ping.
-for every tick a world hash value is calculated and send to every other players. a mismatch will end the game.
-fixed point math may be used, read below.
this is still wip. i am testing it locally and with friends from different cities, tougher tests are on the way. i have both tried floating point and fixed point math with amd, intel cpus on windows. both seems to work but fixed point is about 2x slower somehow. i have read a couple of times that floating point is not to be trusted but does not matter since this will be a learning tool.
please ask any questions you may have and comment on how much would you pay for such a sample.