Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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  
  An old question? Where to calculation collision?  (Read 1869 times)
0 Members and 1 Guest are viewing this topic.
Offline kevglass

« JGO Spiffy Duke »

Medals: 272
Projects: 25
Exp: 18 years

Coder, Trainee Pixel Artist, Game Reviewer

« Posted 2003-07-20 18:22:17 »

I'm working on a multiplayer asteroids style game, a demo is web startable from:

Currently each client maintains a picture of the arena they are playing in. Each client sends updates of their player N times a second (currently N = 10) to the server. The server then broadcasts the state of all the players to all the players M times a second (currently M = 10).

Although I'm going to add stuff about only sending updates based on changes but this currently seems to work fine for a small number of players just flying around.

I've just started implementing the ships shooting. My orignal idea was to let the status of the ships (e.g. is the fire button pressed) let each of the players know when shots should be produced. This would mean that although the shots wouldn't be perfectly synchonized, it would be [good enough (tm)].

Starting to think about collisions, where to perform the caculation and the assocaited health decrement?

I seem to have 3 options:

1) Maintain a full picture on the server. Every single shot that gets produced, is only produced on the server. All collision detection goes on there. This seems great from a consistancy point of view, but with the overhead of sending message for each shot (and possible maintaining movement?)

2) Each client produces shots for itself, only shots that hit the player on its host machine count. This means that only shots the player "sees" shots hit them actually do damage. Of course, nothing is consistant now. Also, how to handle non-player controled objects. [Also prone to cheats]

3) Some sort of halfway house, maybe players report what they see and server takes what most people "saw". Not quite sure about this, maybe some more refinement.

Currently my fave is number 2, since it fits with the way things currently work.

I'd really appreciate feedback/ideas/pointers..



Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #1 - Posted 2003-07-21 02:39:44 »

Other multiplayer games like Quake maintain shots (e.g. rockets) as separate objects on the server so the position of shots is updated by the server and broadcast to clients.  The server decides who gets hit.  

Don't get me started on how client side prediction (needed for smooth internet play) ruins the game --you dodge a shot as far as your view is concerned but you got hit from the server point of view. (This is a separate issue from general network lag.)

Online Abuse

JGO Ninja

Medals: 48

falling into the abyss of reality

« Reply #2 - Posted 2003-07-21 08:17:40 »

Don't get me started on how client side prediction (needed for smooth internet play) ruins the game --you dodge a shot as far as your view is concerned but you got hit from the server point of view. (This is a separate issue from general network lag.)

thats where time nudge comes in Cheesy

Client side prediction x ms into the future, effectively negating ping latency.
Doesn't help with instant hit weapons; and projectile weapons fire will appear to instantly travel the 1st x ms of their flight from the originators gun.
Still, helps Q3 hpbs enormously.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (36 views)
2016-04-18 14:18:53

KaiHH (36 views)
2016-04-18 08:35:41

KaiHH (67 views)
2016-04-15 12:43:58

theagentd (69 views)
2016-04-14 02:16:17

theagentd (76 views)
2016-04-14 02:15:43

IanParcs (92 views)
2016-04-12 03:51:16

IanParcs (37 views)
2016-04-12 03:50:03

IanParcs (33 views)
2016-04-12 03:49:54

IanParcs (30 views)
2016-04-12 03:49:52

IanParcs (39 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

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 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!