Knight's Waltz — a top-down physics sword-dueling game (Three.js + Rapier, no game engine)

Hi all! I’d like to share a small browser game built with Three.js: Knight’s Waltz (武士圓舞曲) — a top-down duel where your sword swings because your body rotates, and damage is computed from the relative velocity at the blade’s contact point. No canned attack animations anywhere.

Play (free, no install, keyboard or touch):

Tech notes for the curious:

  • Three.js for rendering, Rapier (rapier2d-compat, WASM) for physics, TypeScript + Vite. No game engine on top.

  • The whole combat model is physics: swords have mass and inertia, blocking works because the shield collider physically catches the blow, and a stamina system limits sust

    ained spinning (otherwise the optimal strategy is being a beyblade).

  • Severable limbs came almost for free: KayKit’s CC0 character models ship with head/arms/body as separate meshes, so dismemberment is just re-parenting a mesh to a new rigid body and letting Rapier take over.

  • One mobile gotcha worth sharing: Safari’s Web Audio can’t decode OGG — background music had to be AAC/M4A while the SFX stayed OGG for everything else.

  • Fully bilingual (EN/繁中) with runtime language switching, cloud saves + a server-authoritative leaderboard on the official build.

Source is fully open (GPL-3.0): GitHub - saomin0317/knight-duel: 武士圓舞曲 Knight's Waltz — 俯視角物理甩劍決鬥(Three.js+Rapier+TS,無引擎)。Play: satsumacreative.tw/kw 或 saomin.itch.io/knightswaltz · GitHub

The origin story: it’s a reconstruction of a top-down samurai duel game I played on the Apple II ~40 years ago whose name I’ve never been able to find. Happy to answer anything about the physics tuning — the “sword feel” took far more iteration than the rendering ever did.

5 Likes

I played first level, I liked it

There are a lot of weapons and armour in high detailization, pretty design

I am doing port of wc3 for educational purpose
Sample of characters

I did loop 4/4 for automatization purpose, pick key frames and pick transition between frames

Rapier provides more flexibility,
i have only static frames here

@saomin_huang

Thanks for playing! Your WC3 port looks like a great learning project — checked out your character samples.
Yeah, physics vs. keyframes is a real tradeoff: Rapier gives me “free” animation (the sword arm is just a rigid body chain reacting to torque), but the cost is you can’t art-direct a pose — I spent most of my time tuning masses and damping until the swing felt right, where a keyframe animator would just… draw the right pose. For an educational port, your keyframe approach is probably the better teaching tool since every frame is explicit.

1 Like

There is different sample

@saomin_huang
Where to go after rapier and threejs?

Open offers?

To be honest: I’m not a programmer myself. I made this game together with Claude (the AI). Claude wrote the code — I did the game design, testing, and decisions.

I did not fully understand your question. What do you mean by “where to go after rapier and threejs” and “open offers”? Are you asking for advice? Looking for collaboration? Something else?

Please explain a bit more — and feel free to write in your native language if that’s easier, I can translate.

2 Likes

me too

Wait. What? You are using claude
Only dad translators are using claude

@saomin_huang

The Bilestoad!!! <3 LOVE THIS!!!

Was this the apple 2 game you remember, OP?

Thanks for liking it! But it doesn’t look like the game I remember. As far as I remember, it was just 1 vs. 1 dueling, and there weren’t any other maps like the ones in the screenshots you provided.

Yes, really :slightly_smiling_face: But not the chat version — I use Claude Code, the programming agent. It writes the code, runs it, and fixes bugs. My job is to play, test, and tell it what to change.

I wrote the full story of how this game was made in 2 days here: 3D isn't as hard as you think: shipping a 40-year-old gaming memory in two days — Satsuma Creative

What tools are you using for your WC3 port?