Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 28th Dec 2007 02:37
Hi,

I want to enable Dark Physics for a network game... How would this be done efficiently over the network, as I forsee many problems.

Cheers,
Bozzy

"I'm a firm believer that if a team scores one goal, then the other has to score two to win."
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 28th Dec 2007 04:16
you need to track the positon and rotation on one machine, and send the updates to the other machines. basically run all the physics on one machine and then update the others accordingly. as if you run the physics on more than one machine its never gonna match up.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 28th Dec 2007 11:52
Can I do this using a server setup... currently, our server is in C++

"I'm a firm believer that if a team scores one goal, then the other has to score two to win."
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Dec 2007 17:09
I've heard differently in other networking posts.

I don't have experience here (never made online multi-player but I plan to) - but I heard something about a combination of "techniques" to make it work.

1: One server trying to do physics for everyone - might be tough - depends on game. (Imagine a small little go cart track - 4 cars - ok - maybe ok - now imagine Far-cry'ish - 10 guys - different areas of map - and each blowing stuff up - could BOG down hard)

2: Packet latency is a constant problem. One technique it to anticipate each player's movement based on last position, rotation, speed... and try to keep that going until a "Correction" makes it to ya. This is how I think I heard halo does it.

3: Physics for explosions etc. Probably some creativity is needed here. First - processing physics NEAR your camera on yuor machine (even other players) makes some sense. So if something blows up - you both see it all "blast and fall, and push and whatever" but if another player (an result explosions, damage) happen far away from YOUR camera - you MIGHT want you're physics to not calc it, and then the player who did the damage sends a packet that it was done, and they systems sync up on what's going on with surrounding objects.

I don't know but its not as simple as one server if you want a lot of stuff happening.

Other strategies (in general) are to REALLY LIMIT what is effected by physics and what isn't... maybe even user settings - like "Fast PC, Med, Slow" etc... but also for LAN play.

I think this part of the game making process 1: needs to be tightly integrated into the game mechanics from the ground up.... and I also think everything you do in the creation of the game needs to fully be thought out as far as how it will could impact multiplayer/online anything, and make ways to deal with each in the fastest code execution method available being careful to not bog down your packets with needless data if at all possible.

Login to post a reply

Server time is: 2024-11-24 20:46:09
Your offset time is: 2024-11-24 20:46:09