105 comments

[ 1.1 ms ] story [ 129 ms ] thread

  > .eyebrow, .label {
  >  font-size: 0.78rem;
  >  text-transform: uppercase;
  >  letter-spacing: 0.19em;
  >  font-weight: 750;
  >  color: var(--accent);


                  .--.
                  |/`-\
              __ _( '\'
          _.-'  |  __(,
        .' _.-'  \/   %;
       /\.'      /   ;%,
       \/ '.__.-'    '#;
       |     /        ;%,
        \   ||         '`
         \  ||
         |  ))
         |  ||
         |__||_
         | '.__)
          '._)
Just give us the prompt..
No, I don't want to see the prompt. Yes it has some llm tics, but it's clear that he went back and forth before arriving at this. Why would I be interested in the transcript?
Pangram says the first half is human and second half is gen AI.

Ran out of steam, I guess...

yes and? someone sharing the details of an extremely popular project is super cool. comments like this will not encourage more people to share more cool things.

I'd be ecstatic if more people used AI to share more cool things they've done. that'd be awesome. more of this blog post please.

But very little of the author shines through here, at least after the intro. I, too, would like to hear more about how someone built stuff, but this is not it.
Why didn't you check each sentence manually for signs of LLM use, and instead sloppily let Pangram do it for you?
well here's the thing - i did! i smelled the 50/50 and then gave it to Pangram. Neither my nose and Pangram are 100% accurate, but when they both get a hit I'm pretty confident.
Yes, I let the AI generate the diagrams from the code, a bit like tools such as "Doxygen" would in the olden days.

I was a bit pushed for time, and didn't feel inclined to try making the diagrams myself.

Still, I agree that they're a bit "slop adjacent". However, I thought they would be better than nothing for someone trying to get their bearings.

I'd say you're fully off the mark here. That page contains serious architectural insight on how to make a "designed" car feeling work within a "physically correct" collision engine. Getting the balance right is super hard and he explains how to do it. I'm confident no AI could do that architecture, so this is most likely hours of hard work with a thin layer of LLM gloss on top.
>One weekend in late August 1996, I wrote a 2D physics simulation which later became the basis of the vehicle system in the eventually popular game "Grand Theft Auto" aka "GTA".

I don't mean to be... judgemental, but if you had the talent to go something like this, why devolve on the remake? One could think that a person with your level of skill would be one of the main vanguard for hand coding. Again, I don't want to be too judgemental, as I am not a great programmer and use assisted tools when planning and designing personal apps, but I am just curious.

I've been a developer for not nearly as long as the author but long enough that at some point it felt like I was writing the same code and same abstractions over and over again and sometimes a new novel problem would reinvigorate my love of programming but today I'm happy to let an LLM write the tedious code while I give the more fun high level architectural direction and when reviewing the code sometimes I'll give it a nudge in a different direction. I suspect the author has written code like the 2d car physics many times over. Just my 2 cents.
It still feels great to play! I love the history too, it's actually a great example of why prototyping "toys" is so important in product development. It allows you to play with isolated concepts without baggage or the expectation to make things production grade. Just getting straight to the point.

Great story, programming and mechanics.

Thanks. I'm glad you got something out of it.
This is what taught me how to do handbrake turns.

And shortly after I learned how expensive tyres were, I stopped doing handbrake turns.

GTA didn't exist back then, so I had to learn them from the lore.

And shortly afterwards, in addition to all the different physics-in-action experience, I learned about how car insurance excess works.

I ruined someone's car park learning to do handbrake turns, about 5 years before GTA 1 came out. But (coincidentally) only a few miles from Dundee where GTA was developed! I went to university with some of the people who had done Lemmings levels.
I knew about tires prices and cable wear on non hydraulic handbrakes so I really only played with the scandinavian flick or the handbrake on snowy days.
no dynamics model (uses bicycle model) but i built a solver for parking

http://truckslop.joshu.dev/

This is pretty fun!
[delayed]
“One cone (Joshua)” is wild for the exploration it does before settling on a solution!
yeah that one really tortures it
That was a lot of fun to play with.

I think the fractal solver is bugged, but maybe I am just using it wrong. It says placing a cone in the red zone will block the vehicle, but either the colors are inverted or the backend is off, because everything is red except a few spots.

Otherwise very fun. I managed to park a truck the solver called impossible :)

Note: Using safari on an iPad of that matters.

can you post a screenshot? i haven't tested on ipad
Is it actually solving anything though? It always seems to get stuck with the semi half sticking out.
try different maps, editing the constraints, etc? it's sortof a "torture the optimizer" but it does solve many things
Cool project. Have you tried to implement articulating drawbar trailers[1]? The ones where the first axle of the trailer is fixed to the drawbar, making the front wheels turn when the drawbar moves. They seem to be much more common in Europe than in the US. In my experience, these are much harder to back up than fixed axle trailers.

[1]: https://www.pacton.nl/en/products/drawbar-trailer/drawbar-tr...

Feels like the original, just need some thing to run over.
It's an interesting project, although not a physics expert I am so curious what the original version looked like!
The original was very similar, but with minimum UI (no "Settings" panel), and it was just black on white line drawings, although I did add skid trails etc. after I'd got the core of it working.
Interesting that he namechecks Thrust from 1986, an absolutely amazing game for the BBC Model B, and I guess the first 'physics' game I ever encountered. The 'towing' physics were amazing.

https://youtu.be/Dt44PEIWBRg?is=CbVTRyDfo8Nt56fH

Thrust was by Jeremy C. Smith who went on to work on Exile with Peter Irvin

There was a demo of a remake in progress on the Archimedes which did the rounds back in the 90s which was also amazing https://www.youtube.com/watch?v=jssOIpGYH3E which was the first game I saw do real time anti aliased line rendering for the ship-ball connection.
Really nice. GTA 1 & 2 were really amazing. I had a lot of good times with them.
If you accelerate the Car, then switch the configuration from Car to Brick, the brick won't slow down. Not sure whether is it intended but it feels wrong.
There isn't much "air resistance" (or general velocity dampening) on these things, and the velocities carry over when you change the body's "shell".

So, it's sort of intended, but also not very significant one way or the other.

d doesn't turn right for me, but shift+d does. Arrow keys do work though.
Even that little simulation is really fun. I’d like to play a little 2D game with this mechanic.
Maybe I'll make one, if I get time, and am not distracted by other things.
I liked your idea. It was really cool.
I'm sorry, I really want to like and understand this, but the diagrams are worthless and mostly incomprehensible.

I would've liked to understand more about why it works the way it does, how it achieved the correct feel etc, not just regurgitate whatever the code does.

I would've liked to know more about how the author achieved what they did, not a blog post anyone with an llm could've written.

The diagrams seem to have been written (or generated?) while looking at the project source code, and use the sort of bass-ackwards approach to code documentation of giving a “post-hoc summation” that only makes sense when you’ve already read the code, rather than serving as an introduction to the code for someone who hasn’t read it yet.

(This happens a lot with LLM-generated code docs / diagrams / etc, when the docs are written in the same session as the code itself, but later; the LLM seems to see the docs as “following” the prior work in its linear context, and so mistakenly writes as if the reader of the docs will have also read whatever’s in the context before getting to the docs. That assumption of implied shared context makes a lot of sense for generating a long stream of text, or even generating chapters of a book, but doesn’t work out when generating a web/graph of separate bits of text. This is kind of a fundamental flaw in producing coding agents as fine-tunes of conversational base models, and it’s one that coding—agent harnesses have yet to really address.)

That being said, AFAICT, the diagrams are also basically irrelevant to the article in its capacity as a high-level overview of the project. You can just ignore them for the purpose of reading the article.

It’s when digging into the project source code that you should look at those diagrams, and then feel frustrated by how much they suck. :)

"One body, three behaviours"

Much of the text is generated as well.

Just the little bits of text glueing the (yes, machine generated) diagrams together as I recall, when I was indeed trying to finish the thing off in a bit of a hurry.

I wrote the rest of it "by hand" though.

When you give even an inch to an LLM like this, people will assume you did it all like that. And it’s not a bad assumption given what’s out there these days.
The first part read human written, then it degenerated into slop. Nice javascript demo though
What in particular would you like to know?

As I said in the summary article, the core is a "textbook" 2D rigid body simulation (the "Brick" layer), and the Car bit mostly a matter of deciding what forces are applied to the tyres.

In short, the tires "like" to go back and forward, but resist going sideways (relative to the direction they are pointing in).

The forces which are applied at the tyres are roughly equivalent to friction, but not quite (friction is stranger than people think, and is not actually very velocity dependent). In some ways my tyre forces actually behave more like a form of "viscous drag" actually. I knew this was a bit dodgy at the time, and it was a sort of conscious "hack" that was chosen to produce "playable" behaviour as simply as I could.

Hey Pat, thanks for the write-up. I cannot get the car to oversteer, but unless I'm misremembering you could definitely do that in GTA. Any thoughts on what would need to change in your sim to support this?
Hi. Just spotting this comment now.

It was probably just due to some parameter tweaks that were made during "tuning", especially when the game designers started making adjustments.

I'll maybe see if I can reproduce such changes eventually, but I'm going to be busy travelling from the next little while, so don't hold your breath! Sorry.

Yes, without really solid direction, agents will produce absolutely impenetrable diagrams. "The single biggest problem in communication is the illusion that it has taken place."
AI content.
Learn from the old master... with a big stinkin' LLM interposed!
Partial AI use, yes, on the diagrams -- somewhat as an experiment to see whether it was any good. I thought it was better than nothing.

But the core text was hand-written, and the code faithfully represents the logic of the hand-crafted original from 30 years ago.

The overuse of words such as ”deliberate” give it away.
I actually use that word quite a lot in normal writing, and find that my general tone is quite bot-similar.

I am nevertheless unworried by this. ;-)

#replicant

GTA I and II had really fun car physics. Just driving around and evading police was fun, in a way the later 3d games in the series didn't quite capture for me
For me it was a driving simulator with side quests. This code is the spine of GTA.
Losing control of the vehicle in birds-eye view felt closer to reaching my human limits than reaching the vehicle limits, I really missed that with the change to 3D. The whole city also truly felt like it was designed around the birds-eye view, like the group of Hare Krishna (GTA I) or Elvis impersonators (GTA II) behaving like virtual ants when rushing into them was always something magical and wasn't quite the same in 3D.
I also miss this a lot. I've been wanting a modern remake for so long. Hotline Miami wasn't even close.

All the GTA games before GTA3 felt like a mischievous schoolboy's notebook come to life. In fact, I'd be surprised if half the people growing up playing this in the 90s weren't sketching their own GTA2 maps when bored in class.

When mentioning foundational 2d driving models one simply can't omit Marco Monster (2003) [1].

Also Physics for Game Developers (2001) had a hilarious chapter dedicated to car racing simulation. Most of the chapter is dedicated building the scene in a minute detail - for instance pointing out that the center of gravity of the car will change during the course due to fuel consumption - only to simplify and cancel out most things at the end to leave the reader with just a handful of variables.

[1] https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games...

Pretty cool to click the link and find it has been bookmarked for a decade on my end :-)
GFA Basic !… So many memories are coming back to me.
> It began as a little wireframe demo written in GFA BASIC on my Atari ST home computer (and was later ported to C for use in the actual game).

The Atari ST is in the news today on HN! (there was a TFA about the Atari Falcon, which was a really big Atari ST).

To the creator, thank you. I spent many years almost 2 decades alter playing multiplayer gta2 with my good friend during late night sessions.

Thank you for a great little physics engine

Hello. I am the Pat Kerr in question.
Where can I look at the source?

I'd like to see the code that goes with the diagrams.

I'm into go karts and they turn on three wheels because they are a solid rear axle, and the front wheels have a lot of caster. Is live to try to model that.

Just use "view source" from inside Motion Lab.

I deliberately kept it as plain JavaScript with nonaggressive confiscation.

There are even some comments! ;-)

This feels incredible to play, even with the simple graphics. Wow. Top class
Thanks. I'm glad you liked it.