RTS style network game sincronization

Started by
4 comments, last by Pr3t3nd3r_007 18 years, 10 months ago
I hope i don't ask an already asked question but with my englis i can't find an other topic. Do you know any tutorials for network sinconizing an RTS game? I have writen my own algoritm but it have an small desincronization. The problem is that the event for networc are async. I have keyboard, mouse and game events. And the only reliable stat of the events is when i begin doing the frame-game loop. Until then the events can change. I will try to make an small scheme: Game1State player 1 player 2 GAME2State pl1 pl2 frame 1: mdown1 = 0 modown2 = 0 mdown1 = 0 medown2 = 0 netsend(mdown1 ) netsend(modown2 ) frame2 md1=1 md2=0 md1=0 md2=1 game->(md1,md2) game->(md1,md2) netsend(md1) netsend(md2) frame3 md1=0 ...... netrecive(md1); //here md 1 =1 game->(md1,md2) game->(md1,md2) ....... with an algoritm like that the curent player is always with his input on frame before others. But because in the game stat is dependent by the input this will cause some desincronization at an time. any tutorials for rts sincoronization ?
Advertisement
http://www.gamasutra.com/features/20010322/terrano_01.htm
Actually, this is been encapsulated quite well for similar military applications using an RTI (Real-time Infrasture) and handles syncronisations, attributes updates, fault tolerance and provides services for network bandwidgth optimisation.

You can download a trial version (allows up to two applicatons to connect) from:

http://www.mak.com/s1ss6p0.php

Anyway, might be worth a look for prototyping your game.

Mr. Creamy

What AP is talking about is the High Level Architecture (HLA), also known as IEEE 1516. This is a standard created by DoD to replace the aging DIS distributed simulation standard. Many different companies (including Mak) provide HLA implementations; another popular choice is the Pitch RTI.

HLA is designed by committe. This means that it solves many different distributed simulation problems. However, it imposes some requirements that make performance less than it could be. For example, each host in the federation (simulation) needs to publish properties for the simulated entities, and different hosts can publish properties for the same entity. Another example is the feature where a simulation host can send a message to another host, or the system at large, and later change their mind and revoke this message. The underlying RTI must then make it as if the message was never sent. These kinds of features are useful in certain simulation scenarios found in the M&S community, but they mostly get in the way for networked game design.

For something that has a lot of entities, but little bandwidth and high round-trip times, such as Internet gameplay, using an RTI is in my opinion unlikely to provide the best implementation. The suggestions in the Gamasutra article ("1,500 archers on a 28,8 modem") are likely to give a much better performing game.
enum Bool { True, False, FileNotFound };
is there anything more in-depth then 1500 archers?
-----------------www.stevemata.com
I know that article form gamasutra, by a few years but is a very very long way from there to an actuly implemented code.

This topic is closed to new replies.

Advertisement