2,227 reputation
413
bio website gabrielgambetta.com
location
age 33
visits member for 3 years, 10 months
seen Oct 12 at 16:30

Software Engineer at Google Zürich.

I write stuff in my website. The most popular here is the Fast-Paced Multiplayer series.

Former Founder, Director and CTO of Mystery Studio, a small independent game developer.


Jul
30
answered Networking gampeplay - Sending controller inputs vs. sending game actions
Jul
29
answered Effort of impementing interpolation in networked Asteroids
Jul
29
answered Realtime multi-player game design principles for Node.js
Jul
29
answered Interpolating positions in a multiplayer game
Jul
29
answered Multiplayer Network Game - Interpolation and Frame Rate
Jul
12
comment How does client-side prediction work?
Thanks for the suggestion and your kind words :)
May
6
awarded  Nice Answer
Mar
12
awarded  Nice Answer
Dec
19
awarded  Yearling
Dec
13
comment How do I create a curved line or filled circle or generally a circle using C++/SDL?
I approve this message. Start with something you understand (like what Ken suggests for circles, or y = Ax+B for straight line segments), and then learn the "real" algorithms (e.g. Bresenham)
Oct
21
comment Vector transform equation explanation
Exactly. In general, x*(a,b) + y*(c,d) == (xa + yc, xb + yd). With multiplications and additions you never mix the different components of the vectors.
Oct
21
answered Vector transform equation explanation
Oct
4
comment Depth interpolation for z-buffer, with scanline
Glad to hear that. I did, in fact, teach Computer Graphics in a previous life :)
Oct
4
comment Depth interpolation for z-buffer, with scanline
And finally, why. A plane (where the triangle is embedded) is Ax + By + Cz + D = 0. z is clearly linear function of (x, y). You project so x'=x/z and y'=y/z. From there, x=x'z and y=y'z. If you replace these in the original equation you get Ax'z + By'x + Cz + D = 0. Now z = -D / (Ax' + By' + C), where it's clear that z is not a linear function of (x', y'). But 1/z is therefore (Ax' + By' + C) / -D, which is a linear function of (x', y').
Oct
4
comment Depth interpolation for z-buffer, with scanline
Oh, and regarding "when": compute the 1/Z values before starting to rasterize the triangle (e.g. just before the vertical loop), so you get interpolated 1/Z at the left and right of the scanline. Interpolate these linearly (do NOT do 1/Z again - the interpolated values are already 1/Z!), and undo the transform just before checking the zbuffer.
Oct
4
answered Depth interpolation for z-buffer, with scanline
Sep
4
awarded  Nice Answer
Feb
7
awarded  Nice Answer
Jan
16
answered Where can I find information for programming a game to avoid network latency issues?
Jan
15
answered How does client-side prediction work?