Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Questions on Network Implementation on: 2012-11-13 04:21:48
So I am going to make a Live Action Networked Game (or at least a template for one) and would like some guidelines for how to implement it in theory.

Here's what I've gotten from the things I've read so far -

You have a server with an authoritative game state from some time in the past Si. At set intervals, for any period of time in which it has inputs from all of its clients, it will simulate the game state to a new authoritative state at time Sf, and then send this to all of its clients.

The clients will then revert their game states to Sf, discard all cached inputs before Sf, and then use the remaining ones to interpolate the game state up to time N, the actual current game time. To simulate the other client players, they will simply guess based on the last input given to them.

Whenever the clients update, they will continue to cache inputs for that period of time, and also send their inputs to the server.


So does that sound about right? Is there anything I can do to improve how a client guesses what the other clients are doing? Or just improve it in general?

Additionally, I am not sure whether or not I should use UDP or TCP. I know UDP is generally faster. However the server always needs to guarantee that it receives every client input, so I do not think UDP all by itself is reliable enough. Would it be worth it to implement some sort of reliability layer on top of UDP, or to just use TCP instead? And if so, what would be the best way to go about this? Is there a good library for Java that handles this kind of thing already?

Thanks in advance.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (64 views)
2014-04-16 07:08:23

BurntPizza (62 views)
2014-04-15 16:46:01

UprightPath (75 views)
2014-04-15 06:39:50

UprightPath (58 views)
2014-04-15 06:35:47

Porlus (76 views)
2014-04-15 04:48:38

tom_mai78101 (101 views)
2014-04-10 17:04:31

BurntPizza (161 views)
2014-04-09 12:06:04

tom_mai78101 (256 views)
2014-04-06 02:34:39

trollwarrior1 (209 views)
2014-04-05 01:06:45

CJLetsGame (216 views)
2014-04-01 15:16:10
List of Learning Resources
by SHC
2014-04-18 16:17:39

List of Learning Resources
by Longarmx
2014-04-08 16:14:44

Good Examples
by matheus23
2014-04-06 02:51:37

Good Examples
by Grunnt
2014-04-04 04:48:46

Good Examples
by Grunnt
2014-04-04 04:48:37

Good Examples
by matheus23
2014-04-02 07:40:51

Good Examples
by matheus23
2014-04-02 07:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-12 04:22:30
java-gaming.org 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‑gaming.org
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!