Robust Joints and Motors: Keys to Better Vehicles in ROBLOX

Advanced Physics - Robust MotorsAt ROBLOX Game Conference 2012, Kevin He dissected the steps he’s taken to refine ROBLOX’s water physics, hinges and motors so that vehicles – especially boats – perform more realistically. In this blog post, we’re recapping the key parts of the development process. You might be surprised at how much work goes into physically simulating real-world machines in a life-like fashion.

ROBLOX’s water, released in June, gives you the ability to create a boat that floats based on actual physical properties, rather than lines of Lua code. While the release of water marked a big step forward for ROBLOX, it has its limits; for example, if you want to create a propeller-powered boat, the propellers have to be on the side of the boat, as though they’re mimicking wheels on a car.

We’re working toward releasing a vehicle seat that gives players greater boat control, namely over rear-facing propellers that function based on real physical forces. It sounds simple, but it’s actually the culmination of two complex physics engine developments.

Water Physics and Buoyancy1. Advanced water physics

ROBLOX’s water accurately simulates buoyancy, so objects float (or not) and orient themselves based on the density of their material makeup. But the current water simulation doesn’t take into account the angle at which objects move through water and the resulting amount of water viscosity (or resistance).

The next water release will. As you can see in the videos below, objects will slide through the water on a trajectory that matches their angle, and at a speed that correlates with their size and shape. For example, a flat, angled part shoots through the water, while a wide object situated perpendicular to the surface will sink slowly. Compared to our original model, it’s more intuitive.

Parts move through water more accurately under our advanced water physics.

This is one key to working boat propellers. The fins of a boat propeller move through the water at an angle, not perpendicular to the surface.  Our advanced water physics simulate the force generated by the angled propeller fins spinning through the water, thereby pushing the boat forward.

2. Robust, stable hinges and motors

The force of a propeller is only as good as the propeller’s ability to stay rigid and strong under water. Rigidity and strength required that we make ROBLOX’s hinges and motors more robust.

The hinge, for a boat motor, is the axis around which the propeller fins spin. If the hinge is not rigid – or has a “weak constraint” – the fins will wobble and the force the propeller generates will go in multiple directions, which is not efficient for generating speed and maintaining a steady direction. If the motor is not strong – the result of insufficient joint stiffness – it will not be able to generate enough torque to rotate in water.

You can see our progress in the following video. Notice that the new joints are rigid (less wobbling and bouncing) and the new motors are strong (parts rotate rhythmically and with little wobbling).

More rigid joints wobble less and make for better motors.

Our goal is to make all joints in ROBLOX as rigid as they can be. However, we can’t make the physics engine arbitrarily stiff because it may over-correct simulation errors and eventually destroy mechanisms. Instead, we are introducing new optimizations to reformulate the joint constraints and make them more accurate. We’re also implementing a new formula to automatically pick the optimal stiffness constant for a given mechanism and a dynamic “physics-simulation step size” to add simulation detail to parts of the world that are particularly challenging to stabilize.

This video demonstrates robust hinges and motors on a battleship, speed boat and monster truck.

A vehicle seat for boats

ROBLOX players take control of cars by sitting in the “vehicle seat,” a special part that gives them control over the vehicle’s wheels. Currently, game creators are inserting vehicle seats on boats, which allows players to control side-mounted propellers. It works, but it doesn’t allow creators to build realistic boats.

We are developing the next generation of vehicle seat that, when installed on a boat, automatically detects back-mounted propellers and lets users control them using the keyboard.  The new vehicle seat will be implemented in Lua, exposing to scripters the underlying logic that wires the wheels and propellers together. Not only will it support boats, but also be more customizable than the current vehicle seat.

Demonstration of the vehicle seat controlling two rear-facing propellers (and their power).

This next-generation vehicle seat wouldn’t work without robust hinges and motors. And they wouldn’t work without advanced water physics. So, while the new vehicle seat is relatively simple, we had to focus a lot of effort on further developing our physics engine to give it purpose.

We’re also working on additional joint types, which we will cover in the future:

  • Revolute joint/motor
  • Rope joint
  • Rod joint
  • Spring joint
  • Ball/socket joint

As abstract as those joints may seem today, they’ll open up a world of possibilities for ROBLOX game developers in the future. Stay tuned for more.

423 thoughts on “Robust Joints and Motors: Keys to Better Vehicles in ROBLOX

  1. Thanks for making the game easier for us, this could of been done before if someone just scripted it, it probably already has but now it will be already premade so other players won’t have to do all that.

  2. This should be th top priority if you ask me. Things like wind are unimportant compared to stronger hinges and a newer boat engine. Ive made 2 aquatic vehicles since water came out, but theyre too slow, and when theyre fast, the hinges are weak and the turbines start flying around from all the torque thats REQUIRED.

    • I think they should really be working on fixing lag and and exploit issues.

  3. I think it should be smlller propellars and hav more like a metal look or a mesh

  4. Well I like the propellers and the spring joints! But the rest is, okay. But wait don’t make a new seat but just combine it with the original vehicle seat so we can make amphibious vehicles!

  5. I love what you did, or are going to do with the physics. I do not really decorate my place other than with the standard, old blocks. But I do play around with the other stuff. This looks good, I’ll try it when it’s out!

  6. I would like this , but not now… Please push this for later and work on making ROBLOX non-exploitable. Please…

  7. Add wind so its slower to walk into wind, faster to walk away from it, light materials blow around, etc. Also, then add a cloth or canvas material and we could make ships that sail by the wind, or add waves so it sails by the waves.

  8. I suppose this is so that roblox can’t be sued by Mojang for copying all their ideas.

    • They couldn’t in the first place; Mojang/Minecraft came out after ROBLOX. They both had different ambitions. ROBLOX, Build a User Friendly Gaming Platform. Mojang/Minecraft, Build a game that isn’t too complex or under developed. ROBLOX is just expanding what the players get to use on/add to their games. Mojang/Minecraft wanted a simple game; Placing blocks and thriving. ROBLOX, just so happens to also involve the placement of blocks. They are crossing paths, but by no means are copying one other. ROBLOX is building a world, Mojang/Minecraft is creating a living environment. Two totally different game ideas, two totally different games. Also I play both Minecraft and ROBLOX. They are both very fun in their different genres.

      • True, and minecraft has never had these kinds of physics and with roblox I don’t have to install mods to do more, I prefer roblox because multiplayer in minecraft is ridiculous to get onto.

  9. I CANT WAIT FOR THIS

    OMG I CANT WAIT SO STOP MAKING ME WAITING lol

  10. awsome but im not much of a builder on roblox i dont know how to do everthing on roblox studio

  11. This is amazing.ROBLOX has been so astounding that I had no idea that these kind of things we’re coming.I thought ROBLOX was simple.This is filled with amazing inginuity, and physics that could even further our understanding in reality.Imagine learing about the most effecient kinds of motors.This could effect even boats in the real world.
    ROBLOX. Cutos.

  12. Groovy, marv, fabulous,

    Now where’s that in-game clothing add-on you guys were talking about?

    Kthanks.

  13. Where can i pick a boat motor? is it in roblox models or what if anyone knows please pm me

  14. This seems great, but what if we dont want our boats in the texture water? This will be useless to me if I cant just name a brick ‘Water’ so the boat can move in it.

  15. Wow I am currently making cars and showing how to make them in YT but now, when the ‘new’ comes out I will be making boats as my top priority here on ROBLOX.

  16. really i wish that some of the vehicles were controlled like real cars instead of being steered with tank like movements

  17. Well, I usually don’t build with material’d bricks because they produce lag, (And I think they’re just ugly), so I use plastic materials only. I only wish I could edit the weight of any brick.

  18. I love the water but it takes so long to make a river can you make a mod that you can make as much water as you want do it in roblox studio not build open mode

  19. Even though I did kind of suggest to improve the hinges/motors, I’d still like some sort of hinge sensitivity that allows for the classic bounciness which makes some vehicles work better.

  20. I cant wait!!!!! This gave me the idea to create an amphibious veichle.

  21. wow these look pretty cool, cant wait til roblox finally updates everything so that roblox becomes realistic and perfect ;D

    • Hi this is spidermanlegostyle; Why would you want ROBLOX to be realistic and change the main body? The block body is what makes ROBLOX famous. I don’t think ROBLOX should look real.

  22. Hey, how about you devs make a functioning atmosphere and space? So, you could have realistic space and flight games.

  23. Add this IMMEDENTLY or atleast the rigid and strong hinges/motors

    this will allow great new possibilities in buiding machines fix alot of stuff and current machines

  24. Maybe on this update we can control the spped of how fast the propellers go?

  25. Wow! This update really is cool! Next update could use some other things like water spreading and retracting, and a splash effect.

  26. Great! I love how you did to the motors, now I can continue my Apocalypse Nest Project

  27. I would build an epic place, But i don’t want it to be STOLEN BY EXPLOITERS!!! WHY DON’T YOU FIX IT SO EXPLOITERS CAN’T STEAL GAMES!

  28. anyway why do ppl type everything in the chat box ???? answer: because there a stupid idiot :S some ppl be saying were they live and what is there real address. and i’m not that person i just say how much ugly or nice they look and how there a noob or how there so not a noob.

  29. Not to hate or anything but the physics for vehicles in the roblox TV ad were made up like much of the ad. I am glad now that there will be vehicles with physics like the ones in the TV ad.

  30. Mind if you guys add an Alternating Hinges option for the vehicle seat?
    You know… The first side will rotate clockwise and the other side counter clockwise.

    It’s gonna be useful for some reason. E.g. Vehicle seat powered Elevators, Walkers, etc.etc.

    The ball socket joints and etc. Are gonna be useful for walkers and advanced physics…
    Sweetness… Thanks Roblox.

  31. This is a fine way to recreate vehicles to ROBLOX! Well done! Although, I would like to comment, how about an oxygen meter when you dive underwater? Thank you.

  32. For ROBLOXIANS in building, I think you should add great plane is moving better, like a better engine, probably like the propellar takes time to start.

  33. Seriously ROBLOX? Your not gonna make awesome tires that will actually pop and roadspikes for more uberness? And also please enable user custom-made mesh feature. (IDRC if it costs a lot.)

  34. Wow, alot of upcoming updates. The new boat seat seems like it litteraly drives like a tank, with a diferencial and all that. :P Amazing.

  35. ROBLOX is getting better and better because of of advance technology! keep up the great work ROBLOX.This game will be better.

    P.S. Would it be a good idea to update the ROBLOX mouse pointer?