GDC2011: Networking for Physics Programmers

by Glenn Fiedler on February 24, 2011

This year I’ll be presenting a new version of Networking for Physics Programmers as part of the physics tutorial day on Tuesday.

As for the material to be presented this year, it will differ significantly from prior years. I’m going for more advanced material this year so I’m not going to spend 5 minutes explaining UDP vs. TCP. We’ll be skipping that and going right to the interesting stuff which is:

1. How to develop your own custom network protocol in UDP. Reliability and acks, node / transport abstraction, how to structure your game protocol and serialize packets.

2. Overview of game networking models. Pure client/server, FPS networking model with client side prediction, deterministic lockstep, authority scheme. Examples of games using each technique. How each networking model works. Advantages and disadvantages. Understand the trade-offs so you can pick the best networking model for your situation.

3. Worked example: authority scheme for networked physics in a large streaming world. Same cube demo. Different networking strategy. This year I’ll be doing it dedicated client/server style instead of P2P and I’ll focus on all the practical details and tricks required to synchronize physics state in under 64kbit/sec such as: compression tricks for position, orientation and linear/angular velocity, how to prioritize object updates when you have too many objects to fit in one packet, using a reliability system and acks to avoid sending at rest objects over and over, lossy compression, quantization and other neat tricks.

Hope to see you Tuesday, March 1, in Room 3007, West Hall Moscone Center. I’ll be talking from 3:30PM- 4PM

Schedule details here.

UPDATE: Unfortunately the original material as presented above consistently took 2.5 hours during practice sessions. As a result, I’ve had to cut section 1 and 3. There is a lot of great info in section 2 and the feedback from practice sessions was consistently that it was the best section of the talk. If you’d like some information about #1 and #3 you can ask questions during Q&A, plus I’ll be available during GDC for impromptu meetings etc. where I can go over this info with a whiteboard or a notepad. DM me on twitter if you’d like to meet up: @gafferongames

{ 18 comments }

GDC 2010 Networked Physics Slides + Demo

by Glenn Fiedler on March 11, 2010

Big thanks to everybody who attended the physics tutorial today. You guys had some excellent and very thoughtful questions at the end of the talk. I really enjoyed answering them – thanks for being a great audience!

UPDATE: I just uploaded the final versions of the slides with lots of extra notes + instructions for reproducing the demo sections. If you downloaded the previous versions then you should take another look!

Here are the final keynote slides for “Networking for Physics Programmers” with presenter notes: http://bit.ly/ckf1Xu

Here are the final PDF slides with notes sans superfluous visual effects: http://bit.ly/9CFzWb

Here is the demo shown in the talk: MacOSX 64bit Binary + Source, Win32 Binary

Have fun!

{ 39 comments }

What every programmer needs to know about game networking

January 24, 2010

For some bizarre reason I felt inspired to spend my one day off from work during crunch writing an article chronicling the development of modern game protocols. From RTS peer-to-peer lock step, to client/server, right up to FPS games and client-side prediction. And I’m strangely enamored with the result, it flowed very well when writing [...]

Read the full article →

Pandemic Shut Down

November 22, 2009

Very sad news earlier this week: Pandemic Studios was shut down by EA. No point moping about although. What’s done is done. I choose to remember the good times not the bad: the friends I made and the colleagues I worked with at Pandemic and the shared experiences we went through. No matter how difficult [...]

Read the full article →

It's Cold in Montreal!

November 14, 2009

Spent most of my flight thinking through my slides and material and making adjustments, then watched through Harry Potter the Half Blood Prince, but we arrived before the movie finished! Now I must find out how it ends… Arrived Friday night around 9pm. Discovered this while in the customs line that my passport was no [...]

Read the full article →

Solving the Networked Physics Puzzle

October 16, 2009

Traditional networking techniques work well for simple linear motion, but start to break down when networking complex rigid-body physics simulations where objects can tumble, stack and interact with each other. This light-hearted and humorous tutorial takes a look at various options, techniques and pitfalls to watch out for when networking this sort of simulation, providing [...]

Read the full article →

Debugging Multiplayer Games

September 6, 2009

It seems that every few months I read a post-mortem or I hear about a case where a team had to cut multiplayer at the last minute, because it didn’t fit into the schedule, or they couldn’t get it working, or because they want to “focus on the singleplayer experience”. This is especially true of [...]

Read the full article →

Montreal International Game Summit 2009

May 22, 2009

Good news! I’ve been invited to speak at the Montreal International Game Summit 2009 I haven’t decided on a name for the talk yet, but it will focus on networked physics and combine material from my GDC 2009 tutorial, lecture and new material I’m going to develop over the next few months. The basic overview [...]

Read the full article →

Aussie Aussie Aussie – OI OI OI!

April 7, 2009

Incredible. Just Incredible! Heads are screwed on right down under. After years of bungling they’ve made the right call. Just perfect! Kevin Rudd has announced that the NBN tender process has been terminated, and that the government will go it alone on a new $43 billion broadband network. The new wholesale-only network will connect 90% [...]

Read the full article →

Networking for Physics Programmers

March 24, 2009

Here are the slides for my tutorial tomorrow The goal of the tutorial is to show people the basic ideas of how to network a physics simulation The key points are: Use UDP, not TCP Aim for 64kbit/sec – That’s 256 byte packets, 30 times per-second ** Handle out of order packets with a sequence [...]

Read the full article →