Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Synchronizing online games  (Read 3334 times)
0 Members and 1 Guest are viewing this topic.
Offline nickdotjava

Junior Devvie

I have fallen to the dark side.  I'm using DX9

« Posted 2003-05-27 16:18:40 »

I'm writing a server for an on-line rts game and trying to decide how to make sure all players see the same thing.  Originally, the server was just going to pass commands along to all players, but would all players see the same thing at the same time (eg if player A gives a move order at 5:32, will all players see it at 5:32, or will some see it at 5:33 or later)?  One reason for the game logic to be run on the user is that there will be single player, lan capabilities, and direct ip connections.


"Oh ya, that's trivial.  I should have it done in an hour."
Offline elias

Senior Devvie

« Reply #1 - Posted 2003-05-27 16:51:22 »

is the article I'm particularly interested in when the time comes for me to implement networking. It uses the idea of a totally synchronized game by letting player commands lag a few game turns, depending on connection.

- elias

Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #2 - Posted 2003-05-28 05:45:55 »

Typical RTS setups work completely synchronous. Game commences when every msg is processed.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder

Got any cats?

« Reply #3 - Posted 2003-06-24 22:06:22 »

The problem with frame by frame synchronization is that, done naively, everyones response is equal to that of the worst player and it can vary a lot.

Some lessons we learned when getting Duke Nukem 3D to play well over the internet might be helpful.

(1) Get your data rate down. Dont synchronize every frame but rather every N frames.  In an RTS you coudl for instance have a "command beat" thats much lower then (and decoupeld from) your frame rate.

(2) Packet aggregate at the server if you have one.  You'll generally get better performane characteristics by collecting all the frames at your server, building one "turn" packet and sending it out to everyone rather then sending individual moves through the server to everyone.

(3) You *might* want to consider loosening up the synchronization and going with a tiem based scheme for commands and corrections.  Looked at this way the RTS problem really isnt different from any other dead-reckoning situation except that your controls are actually looser and thus differences are easier to hide...

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Pages: [1]
  ignore  |  Print  

hadezbladez (290 views)
2018-11-16 13:46:03

hadezbladez (160 views)
2018-11-16 13:41:33

hadezbladez (291 views)
2018-11-16 13:35:35

hadezbladez (72 views)
2018-11-16 13:32:03

EgonOlsen (2152 views)
2018-06-10 19:43:48

EgonOlsen (2178 views)
2018-06-10 19:43:44

EgonOlsen (1367 views)
2018-06-10 19:43:20

DesertCoockie (1984 views)
2018-05-13 18:23:11

nelsongames (1626 views)
2018-04-24 18:15:36

nelsongames (2274 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!