GLM 5.2 vs. Opus

ritzaco2 pts0 comments

GLM-5.2 vs Claude Opus | Tech Stackups

Skip to main content<br>GLM-5.2 just came out, and it's another step forward for what open models can do. The internet promptly freaked out, and it's hard to tell what's real and what's hype.

So we ran it head-to-head against Claude Opus 4.8: same one-shot prompt, build a 3D platformer in raw WebGL from scratch. Here's our take after running the test and digging through the benchmarks and the buzz.

We're not switching our main off Opus. In our test Opus was faster and shipped a cleaner, more correct game, and it can check its own visual output, which the text-only GLM-5.2 can't. But GLM-5.2 earns a permanent spot in the arsenal: it's a genuinely capable model at a fraction of the price, and because it's open weights, it'll always be available. A closed model can be retired or restricted with little warning (Fable was a recent reminder); weights you can download can't be taken away.

You can play both games right now, or grab the source:

GLM-5.2's game: 3dgame-glm.d.ritzademo.com

Opus's game: 3dgame-opus.d.ritzademo.com

Source for both: github.com/jamesdanielwhitford/glm-5.2-vs-opus-platformers

What GLM-5.2 made, start to finish.What Opus made, start to finish.

Both are browser games written from scratch, with no game engine or 3D rendering library like Three.js. The 3D models are free CC0 assets from Kenney.

Here's how the two runs compared:

MetricGLM-5.2 (Pi/OpenRouter)Opus (Claude Code)Wall-clock build time1h 10m 40s33m 30s Output tokens131,000216,809Peak context window16% of 1M19% of 1MTool calls128153Cost$5.39 (real billed) ~$21.92 (estimate, list pricing)<br>GLM-5.2 cost a fraction as much. Opus finished in half the time and shipped a cleaner game.

On paper, the benchmarks put GLM-5.2 just behind the top closed models, and the online buzz is a mix of genuine signal and astroturf. We get into both below, after the game.

What is GLM-5.2​

GLM-5.2 is Z.ai's latest flagship model. It's open weights under an MIT license, so you can download it, run it yourself, or call it through Z.ai's API.

It's built for long-horizon tasks, the kind of long, multi-step coding-agent work that runs for hours. It ships with a 1M-token context window and two thinking effort levels, High and Max, that trade speed for capability.

note<br>GLM-5.2 is text-only, not multimodal. It can't read images, so workflows built around screenshots or diagrams still need a model like Claude Opus.

Z.ai positions it roughly between Claude Opus 4.7 and 4.8 at similar token usage. Here's their announcement, if you want to read more:

@Zai_org on X

Pricing and access​

Because it's open weights, GLM-5.2 is cheap. Through an API it costs a fraction of Opus, and you can run it yourself for free if you have the hardware.

Pricing, per 1M tokens (vendor docs):

InputCache readOutputClaude Opus 4.8$5$0.50$25GLM-5.2$1.4$0.26$4.4<br>On output tokens, GLM-5.2 is less than a fifth the price of Opus.

The weights are on Hugging Face and ModelScope under an MIT license, with no regional restrictions. You can serve it locally with frameworks like vLLM, SGLang, or Transformers.

Our vibe test: a 3D game from scratch​

To cut through the vibes, we gave Opus 4.8 and GLM-5.2 the same one-shot prompt: build a 3D platformer game from scratch, in raw WebGL, with no game engine or 3D library.

Why this task​

A model can zero-shot a good-looking landing page, and the community already discounts that as a test of much. A 3D platformer in raw WebGL can't be faked in one pretty file. It has real structure: a GLB model parser, matrix and vector math, GLSL shaders, skinned skeletal animation, a fixed-timestep loop, collision, a follow camera.

That structure tests both things people argue about at once. Holding a layered, multi-file build together over many steps is the agentic part, where GLM-5.2 is meant to be strong. Getting the engine internals right, the parts that look fine but quietly break, is the reasoning-and-taste part, where Opus is meant to pull ahead.

We bundled the 3D assets locally, so the test is the engine and the rendering, not whether the harness can fetch a model file. The art itself is a human-made asset pack, Kenney's CC0 Platformer Kit, and both agents were handed the identical files.

What each model had to build​

To finish, each model had to build:

A 3D engine and renderer in raw WebGL, no Three.js or any library.

A loader for the supplied 3D character and world models.

A character that runs and jumps around an arena, with gravity and collision.

A follow camera and keyboard controls.

The whole thing runnable in the browser with one command.

Both did most of it by hand (by tool? by claw?): a GLB binary parser, the matrix and quaternion math, a WebGL2 renderer with GLSL skinning shaders, and substepped AABB collision to keep the character from tunneling through platforms.

Both got the same prompt, the same assets, and one attempt with no hints. We ran Opus 4.8 with extended thinking on high, and...

opus game model build from claude

Related Articles