Skip to main content

Blog Archive

Physics Update Enables Rocket Jumps, Jump Pads, and More

June 24, 2014

by CodeWriter


Archive

Update 6/26: We appreciate all of your passionate feedback regarding this update. We’ve already found fixes for character movement up/down stairs and around small and detailed clusters of parts. We’re also testing increased friction when your character is on the ground to ensure responsive gameplay. In regard to sword fighting, fixing the lunge move is up to developers. We’ve included a Wiki link at the end of this article that describes this simple fix. Encourage the makers of your favorite games to take this small step!

Today, we launched a couple minor updates to the ROBLOX physics engine that carry rather exciting implications. These updates give you more control over the deadliness of explosions in your games, and make your humanoid character more reactive to physical forces. Why implement these changes? They are part of a high-level experiment I began in order to encourage new and exciting types of gameplay. The result has altered the way ROBLOX physics work in a couple key ways and I’m here to tell the story of how we arrived at the final result, and what the effects are.

This new physics update will allow you to jump higher than ever before using the force of rockets!

This new physics update will allow you to jump higher than ever before using the force of rockets!

The directive

When I started development on this project, the directive was clear: rocket jumps. If you’re unfamiliar with the concept, fear not — it’s quite easy to explain. In many popular multiplayer games, players can use the force from a rocket blast to propel them great distances by shooting a rocket near their feet while jumping. Sometimes the explosion does minor damage to the person performing the jump, which is often an even trade for the ground players cover in the process. We figured that if we could implement a system where we could prevent explosions from always destroying the player, rocket jumps (and other types of movements) would have a home on ROBLOX.

Nerfing explosions

The starting point was implementing a DestroyJointRadiusPercent property accessible through ROBLOX Studio. This property lets you set the lethal percentage of the radius of the explosion. The core inner part of the explosion is still completely deadly (meaning that if you’re at the center of the explosion, you will still be knocked out), though the outer range of the explosion can now be used to apply force to the player. For example, if we have an explosion with the DestroyJointRadiusPercent set to 0.5 (50%) and the BlastRadius set to 100 studs, any player within 50 studs of the explosion will be destroyed. But any players that are between 50 and 100 studs away from the explosion will be pushed away from the blast instead of killed. This solved the first part of the problem, and we were really excited to see what would happen when we attempted the coveted jump.

Rocket jumping has been around for years, being utilized in competitive online FPS games like Quake and Team Fortress 2

Rocket jumping has been around for years, being utilized in competitive online FPS games like Quake and Team Fortress 2

Physics time

We were all cautiously optimistic that this concept would work based entirely off of our existing physics. But as any developer will tell you, humanoids are tricky. When we attempted rocket jumps with modified explosions, it worked on the Y-axis, but failed to move the character along the X and Z axes. In other words, the rocket blast sent our humanoid up, but not forward.

This became a very interesting problem to attempt to solve. What I discovered is that there is a drag on the X and Z axes that causes friction when applied to physical forces (like an explosion). The physics system we had in place was designed to react correctly vertically, but not horizontally. The solution was finding ways to reduce the drag — you’ll notice now that smaller physical forces will interact with your humanoids more reasonably and realistically.

What’s new

As stated in the beginning of this article, this small change carries some pretty massive implications. First off, obviously, you can now rocket jump. Load up Studio, and shoot a rocket with the appropriate joint radius and blast radius at the ground at the peak of your jump, and watch your humanoid propel up and out realistically. You can also change explosion properties so they don’t instantly de-link a car — shoot a modded rocket at the bottom of a car and watch it flip over, rather than being blown into pieces.

You can now use the power of explosions to send heavy objects flying through the air!

You can now use the power of explosions to send heavy objects flying through the air!

These new physics open the door to all sorts of potential gameplay elements. Jump pads, rocket jumping, massive fans and trampolines that jump at an angle — these are all things that are doable. Removing the friction also allowed me to toy with ROBLOX’s momentum system — there is a small preservation of momentum to ROBLOX humanoids that is no longer cancelled by the old drag, meaning if you jump off a fast-moving train, expect to continue to move in the direction of the train for a little while.

All of these new features stemmed from this test place, where I experimented and tested. Feel free to check it out — you’ll notice working jump pads and trampolines, as well as rocket jumping. I even built a rocket that flies into the air from the power of numerous explosions. (If you’re curious about real-life explosive powered rockets, Google “Project Orion“.) Dive into these test places and take them apart, then figure out how to use these new physics parameters in your game (or build an entirely new game around them).

This update may affect sword lunging in games that feature user-built weapons. We’ve documented a fix for this on our Wiki.