Twitter/X

Opus 5, given the first paragraph of The Lord of the Rings and a 1M-token budget…

Brief

Karpathy reports Opus 5, with a 1M-token budget (~$10), used ~2 hours to write ~5,500 lines of Three.js procedural code from the first paragraph of The Lord of the Rings, producing a "janky but fun" animated render. He argues this enables hyper-custom, on-demand worlds but exposes a key weakness: LLMs cannot natively perceive or efficiently audit video/gameplay, forcing slow screenshot-based checks and errors.

Why it matters

Opus 5, given the first paragraph of The Lord of the Rings and a 1M-token budget (~$10), ran for ~2 hours and generated ~5,500 lines of procedural Three.js code to render and animate the scene.

Key details

  • The output required the LLM to place and orchestrate polygon assets in (x,y,z) coordinates and animate them; result was "janky but fun," showing LLMs can cheaply produce highly custom, on‑demand interactive worlds (e.g., ephemeral GTA‑like experiences or spectator/NPC roles).
  • A major limitation: Opus 5 cannot efficiently audit its own work because it lacks native video/gameplay perception — it had to take slow screenshots, made mistakes, and revealed multimodal/gameplay auditing weaknesses.
Source evidence

We're starting to leave the territory where you'd test an LLM by e.g. "create an svg of pelican on a bicycle". As one idea to generalize it, I was interested what Opus 5 would do if I gave it the first paragraph of the Lord of the Rings, a 1M token budget (~$10) and asked for three js render of it. Opus went off for ~2 hours and wrote 5500 lines of code that (procedurally) rendered the story. It's kind of janky but fun. But it's a bit mindboggling that the LLM has to place and orchestrate various polygon assets in (x,y,z) coordinates and write code that animates it all, and that it even does anything at all.

I also like this kind of examples because no one in their right mind would ever spend the time to write something this custom but LLMs have all the stamina and patience in the world, so it's an example where we go from "no one would ever do this" to "sure, why not, it's ~free". There might be a lot more. But I'm excited about creating hyper custom worlds that you can imagine dropping players into, e.g. here to participate in the LoTR story as a spectator NPC, or one of the characters, or etc. Something like an ephemeral GTA of X on demand.

Last thought is that the domain of worlds/games exposes a weakness in LLMs: they can't easily audit their work because they aren't able to efficiently and natively perceive videos or play games within them. Here, Opus 5 had to very slowly and painstakingly take screenshots at different points, and it messed up a few times and created a bunch of jank. An example of raw capability (multimodal, gameplay) that I think is still quite lacking.

Video