Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (688)
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 1980 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  
You cannot reply to this message, because it is very, very old.

Dwinin (73 views)
2015-11-07 13:29:08

Rems19 (81 views)
2015-10-31 01:36:56

Rems19 (79 views)
2015-10-31 01:32:37

williamwoles (107 views)
2015-10-23 10:42:59

williamwoles (93 views)
2015-10-23 10:42:45

Jervac_ (111 views)
2015-10-18 23:29:12

DarkCart (137 views)
2015-10-16 00:58:11

KaiHH (118 views)
2015-10-11 14:10:14

KaiHH (158 views)
2015-10-11 13:26:18

BurntPizza (173 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!