Denshattack Interview: Rigging a Train to Kickflip

We’re big fans of the arcade sports genre and we love to see how the devs they tackle skateboards, BMX bikes, and snowboards. What we haven’t seen is locking the player into a multi-ton commuter railway vehicle and asking demanding from them to pull off a 720-degree spin? That’s a completely different level of physics-bending absurdity.

Denshattack takes the fluidity and the combo-chasing loop of classic extreme sports titles and applies it directly to high-speed trains. You’d think that this is a premise that immediately raises massive technical red flags. Game director David Jaumandreu and his team had to figure out how to make a rigid, linear and, most of all, huge vehicle express the dynamic flair of a skater without completely breaking the game engine. Yes, read that last sentence again, we’ll wait. Then watch the trailer and prepare to be amazed.

This interview would not have been possible without the wonderful people at JF Games. Many thanks João Costa!

Seeing all that simply begs the question: Taking skateboarding mechanics and applying them to a train sounds like a physics nightmare. How did you actually rig the train models so they can ollie and spin without the geometry completely breaking or looking like a glitch?

“Hahaha! It has been a complicated process indeed, with a lot of trial-and-error,” Jaumandreu explains. “In the end, we settled with a train formed by two parts: the body and the trucks. The body is rigged with some bones, so that we can apply smears and effects while doing tricks, in order to make it look dynamic and express the movement and intentions of the players. The trucks move independently and enable the train to do some special moves, such as wheelies or multi-track drifting.”

David Jaumandreu, Studio & Game Director at Undercoders

Hitboxes and High-Speed Combat

With the trains physically capable of flexing through a trick set, the studio had to ensure that dynamic movement didn’t compromise the competitive feel of the game. Denshattack features a heavily customizable garage where players can swap out their rides. Since varying shapes and sizes could easily ruin hitbox consistency, keeping narrow rail grinds fair for everyone required a clever approach to vehicle stats.

“We have different trains with slightly different shapes, but the main difference between these (aside from the esthetics) rely on their secondary abilities: some trains trick faster, others have better balance for grinding, some can achieve drift boost easier etc,” he notes. “The train shop not only lets you customize your ride, but also choose from a variety of train models that can work better for different styles of gameplay or challenges.”

Those specialized stats are immediately put to the test against the game’s massive bosses, which include towering mecha girls and moving castles. Programming a boss encounter for a character physically tethered to a rail risks devolving the fight into a glorified quick-time event. Instead, the team turned the train’s stunt mechanics into a combat sandbox.

“Designing bosses was actually a very interesting design challenge! When your main character is a train that constantly moves on rails there’s of course a lot of limitations, but if the train can jump, it can avoid attacks, if it can trick, it can also parry projectiles, if it can ground pound, it can drop onto enemies, if it can double drift, it can hit large bodies on the tracks… When you think about it, Denshattack’s moveset is quite big and that opened up a lot of opportunities to create boss encounters that really felt like a fight.

Preserving the Vibe

Throwing a train through parries and grinds at top speed is visually chaotic. If the viewport can’t keep up with the action, players get dizzy and frustrated. To keep the tricks readable, the backend camera logic had to be split into two distinct systems.

“The camera of Denshattack! is actually a combination between an adaptive one, that follows the train regularly, and hand-positioned ones, that override the previous in certain parts of the level. The adaptive camera is positioned behind the train and it’s programmed so that it adapts to the player’s speed, moves or jumps, in order to always maximize track visibility. The hand-positioned cameras are located along the levels and alter the default one temporarily, so the screen focuses on challenges that need special attention or zooms in and out if players need a wider field of vision.

Crashing in any arcade sports game is a cardinal sin—it completely shatters a player’s flow state. To prevent those inevitable wrecks from ruining the experience, the punishment for missing a jump had to be balanced carefully, ensuring players could instantly get back to chasing their high scores.

“We’ve tried to avoid frustration with crashes, as they can easily kill the flow of the game as mentioned,” Jaumandreu says. “When players crash, we immediately throw them again into the track at full speed, so that they’re back into the action with virtually no waiting time. Checkpoints are frequently placed, so that beats don’t need to be repeated over and over. Of course, crashing kills your current combo, so there’s a risk-benefit factor in chaining a lot of tricks with manuals, as you could lose a nice streak if you don’t cash it out and crash.

Nailing that respawn loop gave the studio the confidence to experiment, but not every wild idea survived the physics engine. Trashing a fun mechanic because it fundamentally breaks backward compatibility is a tough pill to swallow, but it’s a standard reality in indie game development.

“We actually scrapped tons of ideas and mechanics throughout development, haha! The ones that were usually more prone to be discarded were those which significantly altered the train’s physics and would break all the level metrics. For instance, when we programmed a sort of a double jump it felt really fun in the beginning, but it basically enabled you to derail and miss the tracks so easily that it was almost impossible to use in a controlled way and caused a lot of frustration. We also had to take into consideration that all of the mechanics introduced along the way had to be compatible with all of the previous circuits, so that was a limitation too.”

Building a high-speed, physics-heavy project is inherently punishing on a technical level, requiring a brutal filtering process for what actually makes it into the final build. For other indie developers looking to tackle a similar arcade experience, Jaumandreu points straight to the trenches of playtesting as the only real way to nail down a game’s scope.

“To make a lot of playtests with real players, observe how they play and iterate the character controller until it’s intuitive to use. This was essential for us to understand what was working and fun in our gameplay and what was too overwhelming or frustrating. When we finally were comfortable with our moveset, gameplay and game feel, we could map out a full scope of Denshattack! that was realistic, potentially engaging and feasible to produce.”

It turns out that forcing a train to do a kickflip is less about fighting the physics engine, and more about giving the player the exact right tools to weaponize their momentum. If you’re ready to test out some multi-track drifting of your own and drop in on a giant mecha, Denshattack is gearing up to let you loose on the rails. We look forward to seeing all the hilarious outcomes!


Discover more from Dev & Play Media

Subscribe to get the latest posts sent to your email.


Comments

Leave a comment

Discover more from Dev & Play Media

Subscribe now to keep reading and get access to the full archive.

Continue reading