Memories of Developing a Certain Sumo Game
Hello. I'm Hirayama from the Technology Department.
At the end of last year, a Twitter account called "Serious Sumo Game (working title)" was posting gameplay videos of something sort of like sumo. I was involved in developing it, so I thought I'd talk about that.
It later became the basis of a different product too, and I'll touch on that at the end.
The source code and builds are public on GitHub, so feel free to take a look. The builds are on the releases page. Unfortunately the wrestler models, animations, sound effects and so on were purchased and can't be redistributed, so they've been removed from the source code. Without the sounds it's just silent, but it won't run without a human model, so I put in Unity-chan instead.

How the project came about
This project was originally for an in-house event. We regularly hold an event where "the project that wins a pitch battle gets 72 hours of work time for development," and a project pitched by Meguro won.
I once worked on a realistic sports game for home consoles, and ever since then I'd been thinking "I'd like to do sumo some day." Sumotori Dreams, a physics-simulation sumo game, had been a hit too, and I'd been thinking "I want to squander my technical skills on realistic graphics and simulations of flesh, salt, sweat and sand!"
Long after that, last fall, Meguro picked up some nonsense I'd been spouting in my own Slack channel, "I wanna make a realistic sumo game," and turned it into a project. In that sense you could say it was my idea, but what I'd had in mind was "an ordinary console game" with a development budget in the hundreds of millions of yen, so I never dreamed I'd end up building it in seventy-odd hours.
Design
The pitch said "realistic sumo game." But the kind of realism I'd originally imagined was way out of reach, and above all, this was an in-house event, so getting a laugh was what counted. It had to be finished in 72 hours and still make an impact. So first I had to redefine what "realistic" meant.
Graphics
First, on the visual side, if the models and textures lean realistic and the rendering is designed to be photorealistic, that's realistic enough. In that sense the URP (Universal Render Pipeline) I use day to day would do, since it's designed to be photorealistic, but I'm used to how it looks, so it lacks impact. So I decided to use HDRP (High Definition Render Pipeline), which I'd never used. The fact that it only runs on PC wasn't a problem, since we weren't releasing on phones or the Switch.
Next, making the models and textures ourselves was simply out of the question. The most we could do was find assets, drop them in, tweak the lighting parameters and call it done. When I tried it, we got GI (Global Illumination), motion blur, light scattering and so on without doing anything, and the result looked far more impressive than it had any right to.
That said, the wrestlers' textures weren't HDRP-compliant and were low resolution, so the art lead fixed them up quite a bit.
Behavior
The next problem is behavior, that is, movement. "Realism" in movement broadly comes in two kinds, and the approach differs between "realistic human movement" and "realistic interaction." The former becomes realistic by bringing it closer to how real people move, through motion capture or detailed acting. The latter is "physical realism," like "your flesh ripples when you get slapped, and bodies don't sink into each other," and you can achieve it with a sophisticated physics simulation.
Now, we had 72 hours. The former was hopeless from the start. There was no time to put together animations for slaps or throws. Sumo is full of interactive moves like throws and grabs to begin with, and making them realistic would take a huge number of animations. I couldn't imagine the Asset Store conveniently selling enough kinds of sumo animations, so we went with a policy of "basically no pre-made animations." The human body is built as a ragdoll (physically simulated bodies connected by joints), and all movement is left to physics.
When you make a game with pre-made animations, unnatural things tend to show up, like "recoiling the same way every time you take a slap to the face," but if everything is physics, that problem goes away. The reaction changes on its own every time depending on the angle and speed of the hit.
By the way, the "flesh, sweat, sand and salt" I'd been daydreaming about were all cut. As for the sand, though, I feel the art lead's obsession with the texture of the ring, plus an HDRP effect that scatters dust, more or less gets it across.
Implementation
So the basic approach was set, but there was a big unknown. Can a human body be controlled with physics? In other words, can you make a ragdoll stand, slap or throw just by applying forces to it?
Naturally I'd never done anything like that, and nobody with robotics experience happened to be sitting next to me. So I reframed the problem as "how far can I simplify things and still get movement that'll get a laugh in-house," and decided to add features one by one, starting with whatever seemed doable.
The first control design
The first design was this:
- The Rigidbody of the hips (pelvis) is controlled directly as kinematic.
- The hips' movement is restricted with constraints. XZ rotation is frozen and the Y position is fixed.
- Strikes are done by calling AddForce() on the Rigidbodies of both hands and both feet.
In other words, it hangs from a hook at the hips with its feet off the ground and its hands dangling, and it attacks by launching its feet and hands at the opponent.
I no longer know what part of this is sumo, but all I can do is insist "there are wrestlers in the ring, so this is sumo." There was no way I could make throws. Even I think kicks have no place here, but they were funny to watch, so I put them in anyway.
Controlling the neck
At this point it starts to feel like it could just about work as a game, but the problems are piling up.
First, the neck looks dead. It needs to face the opponent. With Quaternion.LookRotation() you can force it to face that way, but a ragdoll's joints have rotation limits, and it shouldn't be able to look straight behind itself. Rewriting the Quaternion directly ignores those limits. So you have to compute the angular velocity and pass it to Rigidbody.AddTorque().
I lacked experience with this at the time, so looking at it now the calculation is rather baffling, but basically the method is "find a rotation axis that turns the forward vector toward where you want it to face, multiply it by a suitable coefficient and use that as the torque".
The larger that "suitable coefficient," the harder the neck turns toward the opponent, and the smaller it is, the more relaxed it is, so you can tune it. I also use this method for turning the body toward the opponent.
The video is from before it worked.
I want to push
In the first design, the body's XZ position was kinematic, and therefore fixed. Push left on the controller and it moves left; push right and it moves right. But that way it doesn't budge when pushed or hit, and it passes right through the opponent anyway.
For collisions to move it, kinematic has to be turned off. In reality, friction between the feet and the ring is what lets you hold your ground, but here the hips are floating in the air and there's no foot friction at all, so with kinematic off it can be pushed as far as you like.
So I decided to keep applying a force with AddForce() that makes it hold its position to some extent.
I want to knock them out of the ring
If you keep the hips at a fixed height, naturally nobody ever falls over or falls off.
If you made it "win by draining the HP gauge" like an ordinary fighting game, it would work as a game as is, but an HP system feels wrong for sumo. So I thought about extending it so that falling over and falling off could happen.
First, I had to stop pinning the hips at a fixed height. That meant removing position Y from the hip Rigidbody's constraints and applying just the right AddForce() every frame to maintain the height. Then, once it's off the ring, you cut that force and let it fall.
To do that, I put colliders on the feet to detect contact with the ring, and applied AddForce() to the hips to maintain the height only while the feet are touching it. And for "how much to AddForce()", I applied PID control.
Explaining PID control in detail would take a whole article, so let's save that for another day if anyone wants it (truth be told, I first learned about it through the sumo game, so I don't understand it well enough to explain). Anyway, PID control lets you "find the force to apply so that something smoothly approaches a target value."
That said, tuning PID control takes a knack. This video is from right after I introduced it; the I term is too strong, and the wrestler launches high into the sky.
And so it became "a game of knocking each other out of the ring," one step closer to sumo. Also, by using the "is it on the ground?" information so that the force holding its position only applies while it's on the ground, I made wrestlers easier to knock out when pushed while airborne.
This video is from right after they started falling off.
I want to fall over, and knock them over
Now they could fall off the ring, but the hips' XZ rotation was frozen, so they couldn't fall over. A sumo game that can't show a memorable scene like "takes a slap to the jaw, blacks out and crumples" has a problem (though it had bigger problems than that).
So I set to work removing the rotation constraints on the hip Rigidbody. As with turning the neck toward the opponent, this means generating a torque that points the hip Rigidbody's Z+ vector in a particular direction.
Again, I lacked experience back then, and looking at it now the calculation is rather baffling, but at any rate I succeeded in generating such a torque and getting the body upright. It applies PID control to the difference between the target rotation and the current state to get the magnitude of the force, and rotates the body by applying forces in opposite directions with AddForceAtPosition() at two symmetric points. Note that this kind of rotation control won't work unless you raise Rigidbody.maxAngularVelocity fairly high, to something like 20 (it took me half a day to figure that out).
Showing damage
Next, I defined damage. Damage changes what proportion of the force computed by PID control actually gets applied. For example, at 0 damage it's 100% of the force and at 100 it's 0%, and damage recovers naturally to some extent. This lets you show the force weakening right after a hit, so the wrestler can't hold its posture or hip height and falls over or crumples, then returns to its original posture as it recovers. I also built in an accumulating portion that doesn't recover naturally, so the wrestler's strength gradually fades and puts it at a disadvantage. When it comes to "a fighting game with no HP gauge," Super Smash Bros. is the obvious example. I think it's a truly great idea.
Other odd jobs
With that, the core of the game was more or less done. The rest was odd jobs: spawning a point light on hits, adding camera control, showing the effects the art lead gave me, playing sound effects and making it playable with a PlayStation 4 controller, plus parameter tuning, and then we called it finished.
We showed it off in-house, and that Twitter account was created on December 24. Development started on December 1, so it ended up taking a surprisingly long three weeks and change, but we weren't dropping our regular work to focus on sumo, and I think the actual work came to ten days or so at most.
Besides the programming, there was the art lead's lighting setup, building the ring and fixing the body textures, Meguro's battle-start sequence, the UI designer making the UI elements and so on, so it's very doubtful the total for everyone involved fit in 72 hours, but that's how these things go. Spending extra time just means we were having that much fun.
By the way, since we were making it public, I added a button that turns on the player 2 AI, which had been a debug feature. So you can sort of play it on your own.
And on to Draw Saber
I thought the concept of "controlling ragdolls only with AddForce() and AddTorque(), with no pre-made animations" was pretty interesting. You don't need an animator, and you don't have to bother setting up animation transitions in detail. A very short program produces a wide variety of movement, and interactions like recoiling from a hit happen on their own. And above all, the unnatural movement makes people laugh.
With more polish it might look more natural, but making something stand and move with proper balance takes advanced techniques from fields like robotics, which are a long way off for me, at least for now. I'd been wondering whether I could make some product out of this "laughable movement."
At first I thought I'd just force a port to phones (URP) and release it as the kind of casual mobile game I usually make, but I wasn't sure sumo as a theme would land in a worldwide release, and the controls just didn't suit phones at all.
Punching and kicking with buttons while also moving manually: that control scheme is clearly meant for consoles. For casual play on a phone touch screen, I figured it had to be either letting the player control only movement or only attacks and automating the rest, or making a different game built around dragging, the control unique to phones. I also considered a beat 'em up like Final Fight with automated movement, but it didn't quite click.
About three months went by like that, and then one day Bushido Blade, which I used to love, and ParkMaster, for which I'd once cranked out stage after stage, suddenly clicked together, and the idea that came out of it was Draw Saber (Android, iOS).
If you want to control it by dragging somehow, the first thing that comes to mind is attacking by dragging the hands or feet toward the enemy. But having several things to control is too complicated. Give it a weapon, and there's naturally just one thing to control.
Also, with a long weapon, the drag can cover a wide area and the paths can vary a lot. And if you draw the weapon's path by dragging in real time, your finger gets in the way and makes it hard to see, so it's better to have things start moving after you've finished drawing the path, like ParkMaster. If the gameplay is "you see the enemy's path in advance and draw a line to counter it," you can carry over the core of ParkMaster's gameplay, "several things start moving at once and produce an unexpected result," just as it is.
Once it's a sword, you'll want to lop off hands, feet and heads, but doing that to people makes it a gory game that would be hard to get lots of people to play. So I made them mannequins. With mannequins, somewhat unnatural movement is forgivable, and it can even become part of the fun.
I originally pictured the weapon as a Japanese sword, but a Japanese sword doesn't cut unless the edge hits. And as you can probably tell from everything above, my experience with control isn't very advanced, so controlling it that precisely would be hard. So we went with a weapon that looks like it would cut no matter how it hits: a "beam sword." Adding a bloom effect makes it look flashy too, and using different colors for allies and enemies makes both sides' paths clear. On top of that, if it glows with bloom, the base material can just be Unlit, so there's no tuning to do.
That's roughly how sumo turned into Draw Saber. You never know how things in life will connect.
Why not develop in that kind of spirit at Kayac too?
Want a peek at the "interesting way of working" at the "Interesting Company"?
