Radioactive-Software Radioactive-Software
Forum to discuss Radioactive-Software Products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gang War - Multiplayer Physics Test Video

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Radioactive-Software
View previous topic :: View next topic  
Author Message
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Fri Jan 12, 2007 1:54 am    Post subject: Gang War - Multiplayer Physics Test Video Reply with quote

Hey guys,

I've just implemented some new networking code ... I made a video of a quick test session I had earlier today...and comments would be appreciated Very Happy

This footage is raw sorry about that Smile. Here is the download link (24MB) - GangWar_NetPhysics.mpg

Here is a preview image -


The game now supports full multiplayer physics, vehicle->vehicle collisions, object physics, actor physics, etc. Each city consists of ~500 vehicles, and ~800 actors, and 1000s of street side objects. Obviously there were some issues that had to be overcome to keep everything running smoothly.

Before this code was implemented, I was doing some things client side for simplicity purposes...now everything is done server side in multiplayer. Only the clients input/keypresses are sent across the network. The server then sends back only the bare minimum to render the scene.

The obvious downfalls of the delay between user input and the visible result, can be combated by doing client side input prediction. In this video, and for the time being, all client side input prediction (not interpolation) is disabled.

In this particular test, I have a ~50 ping to the server, and there are only 2 clients connected (out of a possible 6). Ignore the visuals / sound / GUI at the moment, and focus on the netgraph, and the vehicle physics.

Another interesting point to keep in mind when watching the video...currently I don't send ANY wheel information from server->client. The vehicle's wheel positions are inferred client side by a raycast and a few calculations. Also the 'wheel roll' value is determined client side by the vehicle's longitudinal acceleration. Server side / offline though each wheel is represented as a true rigid body, connected to the chasis by a set of springs.

I've also implemented a netgraph which is used to debug the network. Each client frame all received packets are added to a list, and rendered as a single vertical line. Different packets are color coded, for instance vehicle data is red, and actor data is green, with uploaded input / misc. packets being white in color. The last 150 frames are stored in the netgraph.

Here is what the netgraph looks like -


Some notes about the video -
- Bandwidth usage in the video ranged from 1.0KB/Sec to 3.0KB/Sec downstream, and < 0.6KB/Sec up...which should be good enough for 56k users. Though in some situations, large gang battles for instance, with 50 members in each gang...the 56k user would get saturated. As a result I think I'm going to require a broadband connection for the game.
- Game was limited to 25 FPS by the video recording process.
- The delta value for positions/rotations was lowered to 0.00001 for this video, which will result in more bandwidth usage, but better reuslts. Raising the value to 0.001 will cut the bandwidth in half, but make things look more jittery. The delta values just require a certain change before the element will be sent to the client again.

Some more notes about the multiplayer physics -
- All physics code is executed server side @ 150FPS using the Newton.
- RakNet is used for the networking library.
- Client sends input changes to server 30 times a second.
- Server sends back image of game state ~20 times a second.
- 3x3 Newton rotation matrices are converted to quaternions before being sent across the network.

Whats next on the chopping block?
- Stress testing (both client #s and active object #s)
- Lag compensation ( > 150ms pings)
- Client side input prediction ( > 150ms pings)
- Networked streetside object physics
- Sync some things, like engine sound / RPM, particle effects, and collision sounds.

Anyways, comments on all this would be appreciated.

- Dan
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
SpeedDemon
Guest





PostPosted: Fri Jan 12, 2007 1:49 pm    Post subject: Reply with quote

Hey looks awesome. Good to see some progress with the game. Can't wait for the release! Very Happy
Back to top
Marco
Jehovah's Witness


Joined: 21 Nov 2005
Posts: 33

PostPosted: Mon Jan 15, 2007 6:44 am    Post subject: Reply with quote

The parking garage and Diamonds stripclub look very good and make fine additions to the "sin city" Smile
Maybe a bodybuilding / fitness club would be cool as well, maybe it can be used to deal with anabolics / steroids...

I will have a look at the video later today and give some feedback.

Keep up the excellent work.

Marco
Back to top
View user's profile Send private message
Marco
Jehovah's Witness


Joined: 21 Nov 2005
Posts: 33

PostPosted: Mon Jan 15, 2007 2:13 pm    Post subject: Reply with quote

I watched the video over 20 times Wink
The car movements seem to be fluent as well as the camera view switching.
Though I cannot tell how the handling of the car is from the video, if it's realistic or not.

Missing or not yet implemented yet:
- rear view in side mirrors.
- no driver(s) present
- brake/reverse lights on player car, I see the brake lights on the yellow van though.
- speedometer/rev
- dents/wreckage to player car (I see the damage bar, can you fix the car somehow ?)
- other cars are easily pushed around
- car shadows, the car seems to hover a bit
- skid marks
- smoking tires
- sounds
- the minimap looks tiny, difficult to see which road you are driving or need taking (zoom in/out while driving slow/fast ?).
- collectibles seem to be picked up but I don't see them.

As usual just a few things I noticed, you weren't too specific about what comments you needed Smile
Back to top
View user's profile Send private message
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Mon Jan 15, 2007 4:52 pm    Post subject: Reply with quote

Yea all that stuff is implemented, in single player I just have to switch it over to multiplayer (for a second time). I've already re-done the mini map since then to allow the user to zoom in, vehicles + actors show up on the mini map now.

All the other effects just needed to be transfered over to multiplayer Smile

Also there is a damage system, it's nothing special (car model changes at 50%, starts smoking at 75%, etc.)

I'll have another video in a few days.

Basically all that stuff is in the game, it just wasn't visible in this video Very Happy I guess I should have specified that I was jsut looking for comments on the smoothness of the vehicle. Thanks for the comments.

- Dan
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
kwantum
Newbie


Joined: 15 Oct 2005
Posts: 6

PostPosted: Wed Jan 17, 2007 10:52 pm    Post subject: Reply with quote

Hi Dan.

I watched the video. I made a comparison with a real Corvette. I think you're very close, but you might want to continue making adjustments. The ground looks sort of 'slippery'.

Check out the guy, at the end of the video, burning rubber with the black Corvette. video
Back to top
View user's profile Send private message Visit poster's website
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Fri Jan 19, 2007 8:18 pm    Post subject: Reply with quote

Hey....yea, smoke and tire squeeling sounds add a lot to giving you a sense of speed/traction. I'm working on transfering that over to multiplayer now, as well as a few other little things.

Good video link too, I love cars, 'specially the vettes.

I'll have a much better video once I get a better shadowing algorithm back into the game, and some other things.

- Dan
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
Vectrex
Newbie


Joined: 19 Feb 2007
Posts: 1

PostPosted: Mon Feb 19, 2007 8:12 am    Post subject: Reply with quote

dgreen wrote:
Also there is a damage system, it's nothing special (car model changes at 50%, starts smoking at 75%, etc.) - Dan

A fairly easy and still cool damage 'model' is to have 2 meshes/textures for not damaged and completely screwed. Then use a vertex shader to morph between the 2, but only at the spot where the collision occurs. You can also use a pixel shader to do the same with the damaged texture by blending at the point of impact. This way the meshes can only deform where you want them too. The only problem might be to swap the collision mesh for when it's REALLY damaged Smile
_________________
www.kartsim.com
Back to top
View user's profile Send private message
Guest






PostPosted: Wed May 07, 2008 9:56 pm    Post subject: Reply with quote

Hi everyone


I'm using NewtonGameDynamic with Genesis3D for my demo.

I hava implemented a vehicle using vehicleJoint of NGD.
I have problems for setup the realistic values in my vehicle.
I see that the chevrolet corvett is very realistic.

The questions are:

Would you be able to share the configuration of the corvett?
Mass, springDamping, springShot, etc.

Of where I can be obtained real value of other vehicles?.

How to calculate springDamper and springShot realistic ?

Advance thank you

KIKO
Back to top
billeh
Billeh Bob


Joined: 06 Aug 2007
Posts: 327
Location: devon, uk

PostPosted: Thu May 08, 2008 10:43 am    Post subject: Reply with quote

Boo
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Radioactive-Software All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group