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.


Apr
5
comment OpenGL: missing GL_SPECULAR light on the texture
What do you mean by "missing"? Do you have a screenshot? Specular depends a lot on the geometry you're rendering. If it's very sparse you may not see the effect. Do you still have this problem if you render a sphere with a ton of faces? Finally, have you tried much higher specular exponents (AKA shininess)?
Mar
13
comment How can make an object orbit a sphere in a random direction?
Create two different, normal, random 3D vectors A and B. Compute C = AxB; C should be perpendicular to the plane defined by A and B. Now compute B' = AxC. A, B' and C should be orthonormal, so you can use them as the columns of a matrix and it will be a rotation matrix.
Feb
13
comment Poor text rendering quality with freetype
No, sorry; I sort of followed the documentation and it sort of worked. You may want to take a look at SDL_TTF, which wraps the FreeType library.
Jan
30
comment Does client side prediction sync with the server in the past?
@wolftousen FYI, your question inspired me to write a new Sample Code and Live Demo page, check it out!
Jan
30
comment What would be best practice of client comunication in a multiplayer game
And in case you're interested, I just added a Sample Code and Live Demo page to the articles: gabrielgambetta.com/fpm_live.html
Jan
28
comment Does client side prediction sync with the server in the past?
Thanks for your kind words, BTW :)
Jan
28
comment Does client side prediction sync with the server in the past?
The server would think I was going straight longer than the client did - no, why would it? The inputs you send have timestamps, so if you have been pressing the "right" key for 20ms since you sent the last input, you send "moving right for 20ms". The server never interpolates; it only gets real, actual inputs and applies them to the deterministic world. It's the client who does funky stuff. Maybe here's where your confusion comes from?
Jan
14
comment What is the purpose of indices in 3D rendering?
If you really want to understand what's going on, get some graph paper, draw the 3D vertices, and draw lines between the vertices specified by INDICES.
Dec
12
comment Storing a Quadtree
You can pass the current node's AABB to read_node() and compute the children's AABBs there, but unless you're short on space, why not just store them?
Dec
6
comment Changing the rendering resolution while maintaining the design layout
Really? What do you mean by "quality"? With the right scaling filters, I was surprised by how good the quality was when doing it like this. Are you using bilinear filtering?
Dec
5
comment Divide rectangular image into fixed number of random sized rectangles + 1 fixed size rectangle
You're welcome, happy to help :)
Nov
18
comment directional lightning
incident = lightPos, then. You compute incident which is the vector from the light to the point - the direction from which the light hits the point in the surface. By definition, every ray of a directional light has the same direction (hence the name), so the incident vector at any point in the surface is the light's direction.
Nov
17
comment Identity matrix. Confusion. What does it really do
You're welcome! As for this question, taking a stab in the dark... could it be similar to why car wheels look like they slow down and start rotating backwards? See en.wikipedia.org/wiki/Wagon-wheel_effect, en.wikipedia.org/wiki/Stroboscopic_effect and youtube.com/watch?v=rVSh-au_9aM
Nov
7
comment How does client-side prediction work?
That's an interesting question. Unfortunately, I don't have a definitive answer. I guess it depends on how critical the movements are for the game; do you just bump into someone else and nothing happens? In that case server probably doesn't care, it's seen as a prediction mistake (we've all seen it happen in choke points, right?). Do you kill the other player on contact? In that case getting it right is much more important and may be worth resimulating.Note that at some point you need to discard some packets as "too old", otherwise you'd be resimulating potentially from t=0 at any time.
Aug
11
comment Why is my client laggy despite 60 update packets a second?
Are you sure you're getting the update packets at 60 Hz? There can be any number of reasons why you're sending them at 60 Hz but getting them late or batched or whatever. I'd start by verifying that.
Jul
31
comment Client side prediction on FPS game
The new 4th article (gabrielgambetta.com/fpm4.html) in my series explains how to make gunfire "precise". Beyond that, as usual just "predict" on the client (show blood or whatever) and obey the server.
Jul
30
comment Networking gampeplay - Sending controller inputs vs. sending game actions
BTW, the client also doesn't have to send updates continuously! Even if you render and process inputs locally at 60fps, you can (and should) buffer your updates and send them at a lower rate; this saves bandwidth and the server only updates at 10fps, so... in any case you will be sending inputs with timestamps.
Jul
30
comment Networking gampeplay - Sending controller inputs vs. sending game actions
No, the server should know. The client doesn't just send "I pressed this key", it sends "I pressed this key at this milliseconds and released it at this milliseconds".
Jul
30
comment How does client-side prediction work?
@O.R.Mapper - I finally wrote the 4th article! gabrielgambetta.com/fpm4.html
Jul
30
comment Client side prediction on FPS game
I am gabrielgambetta and I approve this message ;) Did you find anything unclear?