12 ms·
OpenGOAL: Port of Jak and Daxter, written in GOAL, a custom Lisp by Naughty Dog
- jimbob45 5y agoI’m floored and amazed. I’ll certainly look into contributing but…how did the devs acquire a language spec for GOAL? My understanding was that that was the major blocker of these types of projects for years.
- corysama 5y agoOP also posted https://blog.jakspeedruns.com/opengoal-project-update-september-2020/ https://blog.jakspeedruns.com/opengoal-project-update-septem... a while back. It has a section on "How is this possible?"
- DylanBohlender 5y agoWhoa, that is crazy! 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.
- rgbrgb 5y agoJust curious... what makes you look at this and want to contribute? I'm interested in why people do these unlicensed emulation projects at all and it sounds like you have at least one answer as your motivation.
- jimbob45 5y agoAs far as I know, GOAL/GOOL remains the only time Lisp has ever successfully been used in a video game. Given Lisp's near-mythic status of productivity, it at least piques my interest to see how ND might have used it creatively in the codebase. That and I've always wanted to check out the language after Andy Gavin (ND founder) talked it up on here [0] [0]https://news.ycombinator.com/item?id=3152131 https://news.ycombinator.com/item?id=3152131
- bigbillheck 5y ago> As far as I know, GOAL/GOOL remains the only time Lisp has ever successfully been used in a video game. 'Abuse' had a substantial lisp component.
- rgbrgb 5y agoCool, thanks for sharing that. 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. [0]: https://news.ycombinator.com/item?id=2474833 https://news.ycombinator.com/item?id=2474833 [1]: https://www.youtube.com/watch?v=pSHj5UKSylk https://www.youtube.com/watch?v=pSHj5UKSylk
- Jach 5y agoYeah it's rather amazing what Lisp applications in the 90s contributed to. https://en.wikipedia.org/wiki/N-World https://en.wikipedia.org/wiki/N-World is the software mentioned in the comment, the modern equivalent being Blender. The Credits section of that page has some great classics like SM64, FF7, Banjo-Kazooie... It also had great tutorials and documentation: http://www.aaronjamesrogers.com/misc/nworld/N-World-Intro.html http://www.aaronjamesrogers.com/misc/nworld/N-World-Intro.ht... It's a shame that its successor Mirai https://en.wikipedia.org/wiki/Mirai_(software) https://en.wikipedia.org/wiki/Mirai_(software) just kind of vanished. Its main claim to fame is Gollum's face. Chronologically it's not that different from Blender, which also imploded around the same time in the early 2000s, but Blender was able to go open source and survive and have another 20 years of development to get where it's at today. I don't know that the world would look all that different if Mirai had been able to take a similar path, but at least there'd be a cool modern 3D modeling tool in Lisp.
- deterministic 5y agoI worked on Banjo Kazooie and the claim that N-World was used for it is incorrect. We used Maya for all modelling. They did a demo to the BK team once and it went really badly for them. What they demoed to us was so far from being competitive with Maya that it was almost laughable.
- ensan 5y agoThis is not an "unlicensed emulation project". In fact, it's not emulation at all.
- monocasa 5y agoIt looks like they don't have a full goal spec, but are relying on the copious debug and runtime type information, as well as the simplicity of the original goal compiler (and arguably the simplicity of lisp itself) to come up with something close that's semantically equivalent.
- kayamon 5y agoThere's a lot of snippets posted over the years on various forums. Nothing much, a few pages to get a hint of the syntax and the basics. Once you've picked apart the loader/runtime[1] the dynamic nature of the Lisp runtime system allows the system itself to hint a lot at how things originally went together. (e.g. type information is always present, state machines are explicit and easy to spot) [1] http://www.codersnotes.com/notes/disassembling-jak/ http://www.codersnotes.com/notes/disassembling-jak/ (my old article this is based off)
- deleted 5y ago[deleted]
- aap_ 5y agoThat's so cool. Just a few months ago I reversed a bit of the GOAL runtime in an effort to understand how it worked (aap/goal on github) but I didn't dream of seeing everything decompiled. great work
- bitwize 5y agoBetween this, SM64 PC, and OpenLara, old-school games are fertile ground for custom code mods and general hackery-dackery. Probably illegal (but for the OpenLara engine, maybe) but still so cool. And out of this we get a free implementation of GOAL, long thought lost!
- bigdubs 5y agoThe ars technica extended interview with Andy Gavin is a great watch (mentions lisp from his time at MIT) https://www.youtube.com/watch?v=pSHj5UKSylk https://www.youtube.com/watch?v=pSHj5UKSylk
- sillysaurusx 5y agoGOAL / games written in Lisp have been a lifelong obsession. I used to search for hours for any scrap of information about the language. I would have traded a lot for this repo when I was 19. 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.
- deleted 5y ago[deleted]
- dharmab 5y agoNaughty Dog transitioned away from GOAL after they were purchased by Sony. Uncharted and TLOU are mostly written in C++.
- msk-lywenn 5y agoAll the scripting in Uncharted and TLOU is still in lisp. Well, actually, it's scheme now. They use M-something... It's the core of Racket. Edit: MzScheme
- Ericson2314 5y agoMzScheme hasn't be a name for Racket for at a decade+. Maybe the earliest Uncharteds? Racket now uses https://en.wikipedia.org/wiki/Chez_Scheme https://en.wikipedia.org/wiki/Chez_Scheme which vaguely rhymes but there's no relation.
- sillysaurusx 5y agoUncharted! That’s the one. Didn’t they do a video long ago about uncharted + lisp? I seem to remember them talking about some interesting benefits they got out of it. 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.
- lispm 5y agoNote that the original GOAL compiler was written in Common Lisp (specifically Allegro CL). I wonder if the sources are still existing?
- neilv 5y agoRelated talk by Dan Liebgold from Naughty Dog, at RacketCon 2013: https://www.youtube.com/watch?v=oSmqbnhHp1c&t=55s 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_response 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.
- wodenokoto 5y agoTLOU is “The Last of Us”
- bmitc 5y agoIn the cause of Naughty Dog, it was Andy Gavin who introduced Lisp and GOAL and was one of the co-founders of Naughty Dog. He came from MIT and was a student of Rodney Brooks. https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-gool-part-9/ 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=izxXGuVL21o https://www.youtube.com/watch?v=pSHj5UKSylk 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).
- db48x 5y agoVery cool projects. I love how the original game had debug menus, and the newly–written renderer (which uses opengl) _also_ has debug menus (looks like it’s based on Dear ImGui, but I haven’t looked at the code yet). https://www.youtube.com/watch?v=5zGok-jEWO4&list=PLWx9T30aAT50cLnCTY1SAbt2TtWQzKfXX&index=2 https://www.youtube.com/watch?v=5zGok-jEWO4&list=PLWx9T30aAT...
- Jach 5y agoOne of the pleasures of using Lisp for a game is not necessarily needing to add such UIs, or anything else special, to achieve interactive changes; you just change the code and recompile while it's running and see the differences. Unhandled bad bug throws you into the debugger? Debugger doesn't unwind the stack, just pauses the thread. You can inspect stuff, there might be relevant pre-made resolutions you can choose from (restarts) and continue, or you can fix things up however and recompile, and resume at any point in the call stack. 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 https://twitter.com/borodust/status/1443647135765962763 and https://twitter.com/borodust/status/1446569651236921346 https://twitter.com/borodust/status/1446569651236921346
- db48x 5y agoYes, having a repl is a superpower. But soon enough you learn which things will find you the most bugs, so you start making a menu out of them. Teleporting to levels, spawning mobs, etc. 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”?
- alexdss 5y agoIf you look at https://youtu.be/6dJhyVqqq5Q?t=63 https://youtu.be/6dJhyVqqq5Q?t=63 you can see even the original debug menus have extra options!
- markus_zhang 5y agoA side note. I have been fascinated by NWN Toolset since its release. I wonder if we ever get a chance to look at the full pic of the scripting language. There are some reaearches online though.
- branperr 5y agoCan someone explain the significance of this to me? I'm not caught up on this topic.
- wk_end 5y agoJak & Daxter was a very good, technically impressive 3D platformer that came out in the early 2000s for the Playstation 2. It was developed by an American studio called Naughty Dog, who was famous for previously making the Crash Bandicoot games and has since gone on to make the acclaimed Uncharted and Last of Us games. 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.
- branperr 5y agoThanks! I loved playing this game growing up. I had heard later on that it was a technical achievement, but didn't realize they made their own dialect of Lisp.
- Ericson2314 5y agoNice to see this has an advertised Nix build! I hope to return to https://github.com/NixOS/nixpkgs/pull/72366 https://github.com/NixOS/nixpkgs/pull/72366 at some point, so all arches can be built similarly!
- Alekhine 5y agoIf we get Jak 2, I'll die happy.
- junon 5y agoThis. Jak 1 was okay but 2 was outstanding.
- deleted 5y ago[deleted]
- paines 5y agoI just saw that there is sales on PS Store. So if you own a PS4 grab the whole collection with all 4 Jak games. But yeah, an open source JAK would be unbelieavble.
- benlumen 5y agoI've read that the PS4 ports are bad and that the PS3 ones were the way to go. I haven't compared myself, though.
- causi 5y agoThis is great! I've wanted to play Jak 1 since I was a kid but its interlacing issues make it quite visually unpleasant to look at on a modern screen, even using emulation.
- DavidPiper 5y agoOh my, Rock Village is on fire! 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.
- dragonfax 5y agoAbuse was mostly written in Lisp. 2d side scrolling action game from the 90s that was unusual in being commercial with a brick and mortar release but also supporting Linux. It uses keyboard for direction mouse for aiming at the same time, which was also kind of unique at the time. The code is open source, complete with modernization, but you have to dig around for it nowdays. https://en.wikipedia.org/wiki/Abuse_(video_game) https://en.wikipedia.org/wiki/Abuse_(video_game)
- vkk8 5y agoAll the Jak games were amazing. I wonder why the genre has almost died now?
- mariusmg 5y agoI enjoyed both Crash 4 and Psychonauts 2 . Genre is not as popular as the PS2 days but is not dead yet.
- benlumen 5y agoI wasn't keen on Crash 4. I appreciate they were trying to do something different, but whacking up the difficulty and having to scrap the lives system to compensate just felt lazy and disappointing. Striking a reasonable difficulty balance is one of the main challenges in game design and to me, they failed it. 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.
- olswan 5y agoThis is really great to see!
- ur-whale 5y ago421c7bab81ac33663640dd3b0407356bb1c9eb5d
- maydup-nem 5y agoI see the github code breakdown is 70% CL and 30% C++. The comment below says the original GOAL compiler was written in CL. Is it the same goal here? What's the C++ part in this project?
- bierjunge 5y agoThe decompiler code is written in C++ [0], because you have to start with something. https://github.com/water111/jak-project/tree/master/decompiler https://github.com/water111/jak-project/tree/master/decompil...
- maydup-nem 5y agoMakes sense, thank you.
- rbut 5y agoI love projects like this. Well done to everyone involved. 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.
- veltas 5y agoRatchet and Clank port when
- benlumen 5y agoI absolutely loved Jak and Daxter and still run through it every few years. I think it was the peak of the 3D platforming era. Jak 2 with its fantasy take on GTA was excellent, too. 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).
- benlumen 5y agoMight be a daft question - will people eventually be able to write their own PS2 games using this engine?
- mindcrime 5y agoI had never heard of GOAL (as in https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp) before... briefly wondered what GOAL (as in https://en.wikipedia.org/wiki/GOAL_agent_programming_language https://en.wikipedia.org/wiki/GOAL_agent_programming_languag...) had to do with anything. Naming things is hard...