Gabriel Gambetta, a game developer, writes about multiplayer game networking, computer graphics and classic game remakes.
HN commenters cite his client-server architecture series as the reference on client-side prediction, and one found his emulator-backed remakes idea wild.
I'll preface this by saying that I don't want to be mean and just give you honest feedback. I haven't read either of your books and just looked at the amazon page you linked, look at the cover and read the blurb for The Golden Seed, and looked at https://gabrielgambetta.com/computer-graphics-from-scratch/, looked at the cover, skimmed the table of contents and read the paragraph under the title. This is of course entirely personal feedback based on how I feel about both of your books.
For "The Golden Seed", both the cover and the blurb seem "too much", like the kind of book you encounter by the dozen in a bookstore. It's also a fiction book, which appeals less to me because I can either ask people in my family for recommendations (there are a few big readers) and then have something to talk about, or read well-known books (for example, I've read The Three-Body Problem recently, after hearing about it 4 or 5 times here and really liked it).
On the other hand, Computer Graphics from Scratch attracts me more: its cover is in the same style as "Automate the Boring Stuff with Python", of which I've heard great things about; the "from scratch" appeals to me because I like the idea of building things from scratch; the table of contents has an entire part on raytracing, and the book seems oriented at beginners, which I like because I previously tried and failed to build a raytracer following the raytracer in one weekend project, and I think I could achieve it with this book. It's…
Your blog entry:
https://www.gabrielgambetta.com/remakes.html
is wild!
I love the idea. I used Claude Code / Sonnet 4.6 to get back to compile an old DOS game I wrote back around 1991 and for which I had lost the tooling (compiler / linker / notes / build files). It was on my todo list since years, decades even, but I never got to it. With a LLM it was easy: I didn't let the LLM do everything, I used it to find what needed fixing (like two macros I had used with names that were now clashing with "modern" compilers methods names etc.).
> I hacked together the art using my terrible Gimp skills and some Public Domain and Creative Commons assets from OpenGameArt
IMO AI models are better at generating pictures than at writing code, in that pictures do tolerate sloppy approximations. While code doesn't tolerate slop that much.
Why not use AI for the assets?
I would start with fundamental rendering algorithms first before anything.
- Write a software rasterizer
- Write a software ray tracer
You can do all that without exiting a programming language's standard library.
I wrote a simple ray tracer (primary rays only) in vanilla C89 in about 30 lines (if you don't count the PPM image library that I made):
https://github.com/d26900/JamaisVu/blob/main/tests.c
Lines 66 - 91.
Screenshot: https://raw.githubusercontent.com/d26900/JamaisVu/main/screenshot_tracer.png
Here are great resources:
- https://www.scratchapixel.com/
- https://www.gabrielgambetta.com/computer-graphics-from-scratch/00-introduction.html
- https://erkaman.github.io/posts/junior_graphics_programmer_interview.html?
- http://immersivemath.com/ila/index.html
Hey hum sorry to contact you here but I did not want to write to you on your acting address and I don't use Twitter. If I followed the math correctly I think there is a small mistake in the computation of diffused light at https://gabrielgambetta.com/computer-graphics-from-scratch/03-light.html#modeling-diffuse-reflection : In figure 3.5, the two triangles that are presented side by side are not the same.
It follows I think that it is the cos of the Beta angle that should be used. Please correct me if I am wrong.
Also let me thank you again for making it available as your method is very clear for a beginner and your explanations are good and straight to the point. I have sworn to myself I would buy the book by the time I finish implementing part 1 :)
My understanding is that the network relevancy radius is usually pretty large, so you're unlikely to notice a lot of edge cases. Also, by using events for relatively unimportant things (animation playing, effects, sounds, etc) and replicated state for the important stuff, then everything mostly works out correctly, since the server makes a strong effort to ensure eventual consistency of replicated state.
Where network replication matters a lot more though is on things like movement and shooting in competitive games. There is a great short series of blog posts by Gabriel Gambetta that covers different problems and solutions, but everything is a tradeoff https://www.gabrielgambetta.com/client-server-game-architecture.html
It's true that a CRDT is often not the right thing for a classic client/server application. But this doesn't mean we should just give up on ux and use locking.
There are approaches to multiplayer that are client/server native. By leveraging the authoritative server they can offer features that CRDTs can't, while preserving the great ux.
I'm partial to server reconciliation:
https://www.gabrielgambetta.com/client-side-prediction-server-reconciliation.html
My product, Reflect, implements server reconciliation as a service. You can learn more about how it works here:
https://rocicorp.dev/blog/ready-player-two