Lethwei comes from Myanmar and differs from Muay Thai on one point you see straight away: the headbutt is allowed. With fists, elbows, knees, shins and the head a fighter has nine weapons. Four fighters fight in this game: Aung from Myanmar against Kenji from Japan among the men, May Thiri from Myanmar against Lena from the Netherlands among the women. Men only fight men, women only fight women. There are two arenas: among the temples of Bagan at sunset, and in the courtyard of a temple in the rain.
There are 21 techniques, each with its own wind-up, contact and recovery in frames. Which one you throw depends on direction plus button: forward with punch is a cross, back a hook, down an uppercut, forward twice quickly an overhand. In the clinch the knee and the headbutt become clinch strikes, and right after a block the headbutt is a counter. Blocking works high and low; dodging by leaning back, stepping back or slipping under a punch. Each fighter has a special, such as Aung's Iron Skull Counter: a guard that catches the next strike and answers it with a headbutt. A fighter who goes down is counted; three knock-downs in one round end the fight. Without a knock-out the judges decide, or it is a draw as in traditional Lethwei.
Every hit to the head lands on one spot of the face: brow, eye, nose, mouth or cheek. A black eye slowly swells shut, elbows and headbutts open the brow, blood runs down and stays on the floor. Those layers sit in the right place on every drawing, during a kick or a fall too, because the build script finds the head in each drawing. In the settings the blood can be reduced or turned off.
Each fighter is 32 drawings, made with an OpenAI image model from one reference sheet so the face, outfit and hand wraps stay the same. The arenas are built from six layers that move in parallax. In total 51 images, for about 11 dollars. A script removes the green screen, cuts out the figures, brings them to one scale and pins them at the hips, found by the colour of the shorts. That keeps the body in place whichever foot the fighter stands on. The motion between drawings comes from classic animation tricks: anticipation, stretched after-images, follow-through, breathing. A knock-out slows time, zooms in and darkens the world for a moment.
Built with Phaser 3 and TypeScript. The fight is a separate simulation that runs in fixed steps of 1/60 second. The computer opponent plays through the same controls as a person, sees the other fighter a few frames late and has three levels. With 20 matches per pair and level, each fighter wins between about 40 and 60 per cent on the two highest levels. All sound, from the Burmese drums to the rain and the headbutt, is synthesised live with the Web Audio API. Unit tests in Vitest check the fight, the computer and the image script; end-to-end tests run in Chromium, Firefox and WebKit. It plays on a computer with a keyboard or a gamepad.
There are 21 techniques, each with its own wind-up, contact and recovery in frames. Which one you throw depends on direction plus button: forward with punch is a cross, back a hook, down an uppercut, forward twice quickly an overhand. In the clinch the knee and the headbutt become clinch strikes, and right after a block the headbutt is a counter. Blocking works high and low; dodging by leaning back, stepping back or slipping under a punch. Each fighter has a special, such as Aung's Iron Skull Counter: a guard that catches the next strike and answers it with a headbutt. A fighter who goes down is counted; three knock-downs in one round end the fight. Without a knock-out the judges decide, or it is a draw as in traditional Lethwei.
Every hit to the head lands on one spot of the face: brow, eye, nose, mouth or cheek. A black eye slowly swells shut, elbows and headbutts open the brow, blood runs down and stays on the floor. Those layers sit in the right place on every drawing, during a kick or a fall too, because the build script finds the head in each drawing. In the settings the blood can be reduced or turned off.
Each fighter is 32 drawings, made with an OpenAI image model from one reference sheet so the face, outfit and hand wraps stay the same. The arenas are built from six layers that move in parallax. In total 51 images, for about 11 dollars. A script removes the green screen, cuts out the figures, brings them to one scale and pins them at the hips, found by the colour of the shorts. That keeps the body in place whichever foot the fighter stands on. The motion between drawings comes from classic animation tricks: anticipation, stretched after-images, follow-through, breathing. A knock-out slows time, zooms in and darkens the world for a moment.
Built with Phaser 3 and TypeScript. The fight is a separate simulation that runs in fixed steps of 1/60 second. The computer opponent plays through the same controls as a person, sees the other fighter a few frames late and has three levels. With 20 matches per pair and level, each fighter wins between about 40 and 60 per cent on the two highest levels. All sound, from the Burmese drums to the rain and the headbutt, is synthesised live with the Web Audio API. Unit tests in Vitest check the fight, the computer and the image script; end-to-end tests run in Chromium, Firefox and WebKit. It plays on a computer with a keyboard or a gamepad.
More work

Operation Iron Thunder
A WW2 tank game in the browser: a Sherman and its five-man crew in Normandy, July 1944. Climb out, fight, rest in the church. three.js.

Interactive 3D WebGL Experience
A 3D WebGL piece with animated chrome letters, a neon grid and warp-speed stars. Move your mouse to pan the camera.

The Art of Eight Limbs — Muay Thai, Muay Boran and Lethwei
An illustrated tribute to Muay Thai, Muay Boran and Lethwei: eight painted scenes, emblems in Thai and Burmese script, animals and sacred tattoos.
