381 points · by msk-lywenn · 4y ago · 109 comments
https://www.youtube.com/watch?v=oSmqbnhHp1c&t=55s
Starting at around 10m into the talk, Liebgold says their DC language for TLOU (to get what they most needed from a DSL even if using C++ instead of GOAL) was implemented in Racket.
For anyone not familiar with TLOU, it was a critically-acclaimed game, and my personal all-time favorite game for storytelling that somehow grabbed me. (I dislike all zombie franchises, but at a key point towards the end of the nonlinear narrative and playing in the game, I was surprised how much I really wanted to protect the kid. Which I'll partly attribute to a Lispy DSL that helped them execute immersive storytelling in a zombie stealth shooter.)
https://en.wikipedia.org/wiki/The_Last_of_Us#Critical_respon...
This is one of the Racket success stories. They seem to happen because someone already knows they want a Lisp, they end up picking Racket without needing anyone else's permission, and the people using it are capable of designing and building whatever missing pieces they need.
https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
https://all-things-andy-gavin.com/2011/03/12/making-crash-ba...
If someone hasn't seen it, his episode on Ars Technica's War Stories was awesome. He seems to be a hacker's hacker. It's a fascinating story because it's not really how I personally work (internally), so it's fun hearing someone describe just diving in like that.
https://www.youtube.com/watch?v=izxXGuVL21o
https://www.youtube.com/watch?v=pSHj5UKSylk
It was my understanding that Racket wasn't in use anymore at Naughty Dog. It would be cool if there was an update or someone who knows (I know Dan is no longer at Naughty Dog), because unfortunately the tale of Lisps in companies is normally that it eventually gets replaced or set aside (where new stuff is built in something else).
Wikipedia page on GOAL says exactly this happened.
"In all honesty, the biggest reason we're not using GOAL for next-gen development is because we're now part of Sony. I can only imagine Sony's shock when they purchased Naughty Dog a few years back, hoping to be able to leverage some of our technology across other Sony studios, and then realized that there was no way anyone else would be able to use any of our codebase."
https://guide.handmadehero.org/hmcon/2016/05/
My impression isn't that scheme is being passed out just because Sony doesn't like it, but also because the language has issues. On the other hand, it seems they're putting a lot of effort into getting the nice scheme features, like hot reloading, in their C++ environment.
Any sufficiently advanced Common Lisp or Scheme program will eventually be rewritten in C++, Java, Python, or JavaScript.
I'd change that: `s/sufficiently advanced/sufficiently profitable/g`
The state of advancement is no indicator that something needs to be maintained, while the state of profitability is a reliable indicator that something will be maintained.
Thank you to the authors for fulfilling a teenage dream. Please consider doing Last Of Us next —- I once downloaded it and tore it apart for any signs of lisp, but it was all compiled bytecode. That’s where I gave up, but it looks like you took it one millennium further by reverse engineering the bytecode from Jak and Dexter to make your own port that compiles to the same bytecode. If you have infinite time, you could theoretically do this for last of us too, and also last of us 2.
I've found that I like Fennel (and Janet as well, both created by the same author, though they have different maintainers) quite a bit. Turns out that having simple semantics and a very regular syntax makes for a language that makes writing basic code feel nice.
Edit: MzScheme
I distinctly remember EA pushing the Frostbite engine on bioware and thus ruining the franchises in production (MassEffect Andromeda/ Anthem).
Is this just another case of visible external costs (engine licensing) vs invisible internal costs (complete restructuring/retraining of existing pipelines/ engine rewrites)?
1. If you're pushing the platform, you need every part of the asset pipeline to be optimized for it, and probably lower level runtime optimizations too.
2. If you're doing something well within the constraints, your bottleneck is on implementing the specific types of assets that will make your game unique. As games get more featureful more and more micro-categories of assets show up - bits of UI text, custom behaviors, scene transitions, camera movements and so forth.
3. If you do 1, then 2 becomes more challenging because you made more optimizing assumptions, so the game production may fall off schedule due to lousy tooling making it hard to actually test anything in-game. If you focus on 2, you don't have as many reusable parts, and you're adding pressure to optimize near the end of the dev cycle, which can result in catastrophic bugs from changing assumptions in the asset-code mix, like "we tightened when we load in streaming assets. This broke a cutscene trigger because now it loads at the wrong time."
And then you add in an external tech group and you have another layer of communication to deal with, so the design or art teams can't just grab a coder and say "hey, this workflow sucks, give me a little support on this." Whether it's in the org or third-party, it's the same problem: you really need engine coders on staff to handle some things.
But the case can always be made: "if we have an internal engine group we can put all the smartest people in one place and have them develop the next-gen graphics." And once you have that group, it's politically necessary for the management to make its tech as widely deployed as possible, otherwise, why budget for them? The engine teams at large publishers who follow this kind of hard separation are known for having relatively cushy, high-profile gigs, while game teams are disposable bodies that churn out necessary but low-value features. Conflicts of interest and fiefdoms emerge from that. Some of them do enforce rotations and other protocols to lower the barriers.
Although the engine is mostly C++, the bits that aren’t are usually the most interesting. And the most impactful. So it would be neat to analyze, if for no reason other than archaeology.
If I'm reading this right, the original Jak and Daxter was written in a Lisp, too? If so, that's pretty cool and I wouldn't have guessed.
But GOAL didn't have a GC, so it might not really count as Lisp.
Edit: I was just randomly watching this video (https://www.youtube.com/watch?v=cHkk9isDfg4), and Dave Baggett came up. When I searched his name, it does look like he was a co-founder of ITA after leaving Naughty Dog.
Next step is to make a cookbook of classical Game AI techniques (monte carlo tree search, goal oriented action planning) in GOAL. Then it becomes a package anyone can use, like PhysX and RAD tools ;)
I swear I remember a YouTube video from naughty dog about lisp, and that it was about one of their later engines. But at this point I think I just hallucinate parens wherever I go, so maybe not.
Bet it was the most extensible dialogue system ever though.
I'll never understand why, compared to the other Naughty Dog franchises, it was basically dropped and forgotten. Or why Ratchet and Clank was favoured (comparitively bland and boring imo).
TL;DR for folks is that they left a lot of debug information in the build. The C code was compiled with no optimizations (and included debugging symbols), and GOAL uses a string-based table for global functions/variables/types, so they're starting with all those for free. Plus they don't think the GOAL compiler did too much tricky-to-undo optimization either.
[1] http://www.codersnotes.com/notes/disassembling-jak/ (my old article this is based off)
That and I've always wanted to check out the language after Andy Gavin (ND founder) talked it up on here [0]
I had no idea Andy Garvin was on hn, but makes sense :)! I had a vague memory that Super Mario 64 also used lisp and when I googled, I found him again [0].
You've likely seen this, but I recently watched and loved this extended interview with him about making Crash Bandicoot [1]. Really made me want to look more into making video games.
There are some indie games done in Lisp, including at least one small Visual Novel released on Steam and another currently in development (2d platformer called "Kandria").
Several games, both indie and not, used Lisp as development tool - this includes games like "What Remains" (hn link: https://news.ycombinator.com/item?id=20930986 ) as well as numerous tools used IIRC at Nintendo.
'Abuse' had a substantial lisp component.
I have seen a lot of claims of this but no real evidence? And I know Lisp quite well (having implemented my own versions of Lisp for fun). If Lisp truly is way more productive than other languages, why haven’t we seen lots of Lisp software out-competing software written in other languages? Surely a few Lisp guys could outcompete everybody else if Lisp is as super productive as claimed.
[0] - https://www.reddit.com/r/programming/comments/6e6zwn/i_had_n...
On a related note, back when I was engine programmer for a PS2/Wii/Xbox engine I remember my boss always coming and saying "How do we get it to draw more in the distance. Just like Jak and Daxter!". It was a high bar to reach.
And out of this we get a free implementation of GOAL, long thought lost!
Certain kinds of techies were particularly enamoured with Jak & Daxter because, at a time when console devs rarely spoke much about the tech behind their stuff, and at a time when games were almost universally programmed in C/C++ with bits of assembly language, the developers of Jak & Daxter openly discussed how they had written the bulk of the game logic in a custom Lisp dialect they called GOAL, which itself was built with Common Lisp. If you don't know what Lisp is or understand why that's cool, well - Lisp is a very interesting programming language that pioneered a lot of incredible ideas in computer science and that certain hackers develop a real connection to, including one of the biggest names behind this site/Y Combinator, but has always struggled a bit in the market. Seeing it used in a AAA game production like this was, for those hackers, really exciting; maybe because it might be the beginning of an industry-wide move towards Lisp (which never happened), or maybe just because a Lisp success story like this was vindicating.
This appears to be a (work-in-progress) source port of the game and the GOAL language, produced with a lot of reverse engineering work. So it's neat to finally get to see first-hand this GOAL Lisp stuff that we've heard about for years, and if the project reaches completion it'd also make for a great way to play the game on modern hardware or mod it.
https://www.youtube.com/watch?v=5zGok-jEWO4&list=PLWx9T30aAT...
But fully fleshed out debug UIs are cool and useful in the large. There's a guy who's been integrating a bunch of C++ stuff including Dear ImGui into a Lisp engine, see: https://twitter.com/borodust/status/1443647135765962763 and https://twitter.com/borodust/status/1446569651236921346
In this case they were debugging the render, to fix problems that result in game’s own graphics being unusable. So they added their own system on top, so that they can inspect the data being sent to the gpu, turn on wireframes, etc. It’s a delightful look at what all of computing is going to look like in a thousand years, with layer upon layer of tooling as new generations of engineers adapt older programs to work on new systems. Remember “A Deepness in the Sky”?
I hope to return to https://github.com/NixOS/nixpkgs/pull/72366 at some point, so all arches can be built similarly!
https://github.com/water111/jak-project/tree/master/decompil...
Will be watching with intense interest, Jak & Daxter was my childhood.
This is the kind of project I wish I had the technical chops for.
I think Crash 2 was about the sweet spot and what they should aim for. Once you got good, you could sort of flow through the levels smoothly.