Rts Lock Step Network Base Sample(WIP) - Anyone Interested?

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.

this is how it seems btw.

if mobile , yes

as i said this is not to be used directly but learn from it. if unity’s networking works on mobile then no problem.
i will also make tests on mobile then, thank you.

Depends on price :slight_smile: as its only for learning purpose and no finished solution I would be willing to pay 20 bucks. If its expensive I would prefer buying a book.

can you tell me what would you expect from it.
it will be tested on real world scenarios, ideally(system able to run 10 fps and smooth connection) you wont feel 100ms latency if set to run at 10 fps or 200ms at 5fps. it wont be a complete solution but a working core structure.

I guess a basic setup where all commands are send over network in an lockstep architecture would be quit enough. So player a gives some unit move command while player b gives an attack command and c does something else. No fancy stuff just stay basic with cubes.

The basic Lockstep I send my command you send yours and they are executed at the same time is the hardest part the rest is game depending.

well if you read the first post that is what i am offering :slight_smile:

Yes thats why I said :slight_smile: if cheap enough definitly a buy worth