Developer Blog #2 - The Physics of Astronimo 🚀
Hello there and welcome to a crash course into the physics of Astronimo! I’m Jimmy, Lead Programmer on this absolutely bananas game and I shall be your guide today.
Remember, once your contraption is deployed it will feel the full effects of that pesky physical anomaly known as gravity. So let's hope your doctorate in mechanical engineering paid off!
[h3]Hot Rods and Cold Points[/h3]
Astronimo uses quite a lot of physics in the game for the fundamental gameplay and the whole system is a custom physics engine built around the concept of Points and Rods.
Absolutely everything in this game is made of them, even the things you don’t expect. Which we will get to later!
These Point and Rod objects in the game are actually very simple. Points have a position and velocity. Rods connect two Points together and attempt to keep them a certain distance apart.

When you are building contraptions in the Workshops, it’s quite easy to see this system in action. You just plop points down and it automatically creates rods for you. Connect enough of them together and hey presto, a contraption.

Adjusting the length of a rod makes them operate kind of like a hydraulic ram and that's exactly how our hydraulic component in the Workshop functions, under the hood we just expand and contract rods. Suspension rods in the game are also a very simple extension of this, we just constrain rods to impart less force, causing them to become all bouncy and springy.

One of the interesting things about this system is that rotation just arises naturally from the system. As the Points move around due to gravity and collide with the world, the various rods tug on each other and cause the contraptions to rotate. That’s pretty neat eh!
[h3]Rod Attachments[/h3]
To allow for more interesting contraptions, we let you attach a variety of different utility components to the rods. Seats for your characters to hop in. Various propulsion systems such as rockets, springs and motors. Also TNT and other unique items for you to get creative with.
These objects also give your contraptions some volume, enabling them to collide and impact with other vehicles. Perhaps more importantly, they provide space for your stickers too.
[h3]Planetary Physics[/h3]
It wouldn’t be worth adding “Astro” to the title if we didn’t get some orbital mechanics into the game! As you gain altitude from a planet your vehicles will begin to experience less atmospheric drag slowing them down. As you traverse further still the effects of gravity will fade away. If you carefully balance your vehicle speed between these two thresholds then you can actually put your contraptions in orbit.
There are also no limits on what we consider to be a spaceship, if you can fling it out the atmosphere fast enough then you are welcome to call it an exploratory vessel! I have watched in amusement as various members of the dev team attempted to build “railgun” machines to launch their fellow cosmonauts into deep space.

[h3]Vehicle Floppyness [/h3]
There is one more important system at play that helps keep vehicles from instantly becoming piles of spaghetti like machinery on the floor. Angle Welds!

When you connect two rods together, they are automatically “welded” together at that specific angle. The physics engine will try its hardest to keep those rods at that angle no matter what. When you place down a Hinge component, you are just telling the physics system to ignore welding those rods together.
During early development of the game, we actually didn’t have this system. Players had to either manually weld rods together or carefully construct their vehicles from triangles shapes so they did not just fall over upon deployment. It was comical at first to watch their machines immediately collapse, but for them it quickly became tiresome, so we ended up automating the system.
[h3]Wheels & Drivechains[/h3]
On the surface you can connect wheels to engines, engines to seats and have yourself a neat little car to tootle around the planet and explore. However, hidden within the building mechanics of the game there is a physics based drivechain system. Why? Honestly, I thought it was cool and nobody stopped me putting it into the game. When you draw connections between wheels and engines, you are really defining little axles with physical properties.
This means you can do amusing and odd things, such as stand on a wheel connected to another wheel and operate it as a sort of hamster wheel powered contraption. So cool!
[h3]Rod based Ubiquity[/h3]
Now I said everything was made from Points and Rods and it’s very true. The little ore pieces you pick up and cart around are really just little invisible rods and points with an ore component attached to them, they are literally just a little contraption. Same for those batteries scattered around the solar system. Even the character's hands are little points you can grab onto. Basically anything in this game driven by physics is just a little rod in the end.
At one point we even had bendy trees and foliage you could interact with driven by the system, however we decided to pull them from the game due to other technical difficulties.
[h3]Technical Jargon[/h3]
For the more geeky technical reader, this whole thing is really just a point-mass system driven by a Position-Based-Dynamics solver. Iterations are kept fairly low for performance, and we use a Jacobi style solver to hopefully prevent over-constrained systems from becoming unstable or biased. This results in a very “squishy” and compliant physics system. Fortunately, this matched the aesthetics of the game though, so we just rolled with it! There is some gnarly maths for some of the constraint gradients that deal with angle welds and embedding convex shapes into the rod constraints, but other than that it's really not all that complicated. It certainly is not anywhere close to physically accurate, but hey that was never the intention of the game.
[h3]Over and Out[/h3]
I hope you enjoyed this brief tour. I am certainly looking forward to seeing what horrendous, physics breaking contraptions you can come up with! Bring it on!
Astronimo will be arriving in Early Access later this year. Wishlist it now.
Join the Official Coatsink Discord
Follow Astronimo on Twitter

[h3]Hot Rods and Cold Points[/h3]
Astronimo uses quite a lot of physics in the game for the fundamental gameplay and the whole system is a custom physics engine built around the concept of Points and Rods.
Absolutely everything in this game is made of them, even the things you don’t expect. Which we will get to later!
These Point and Rod objects in the game are actually very simple. Points have a position and velocity. Rods connect two Points together and attempt to keep them a certain distance apart.

When you are building contraptions in the Workshops, it’s quite easy to see this system in action. You just plop points down and it automatically creates rods for you. Connect enough of them together and hey presto, a contraption.

Adjusting the length of a rod makes them operate kind of like a hydraulic ram and that's exactly how our hydraulic component in the Workshop functions, under the hood we just expand and contract rods. Suspension rods in the game are also a very simple extension of this, we just constrain rods to impart less force, causing them to become all bouncy and springy.

One of the interesting things about this system is that rotation just arises naturally from the system. As the Points move around due to gravity and collide with the world, the various rods tug on each other and cause the contraptions to rotate. That’s pretty neat eh!
[h3]Rod Attachments[/h3]
To allow for more interesting contraptions, we let you attach a variety of different utility components to the rods. Seats for your characters to hop in. Various propulsion systems such as rockets, springs and motors. Also TNT and other unique items for you to get creative with.

[h3]Planetary Physics[/h3]
It wouldn’t be worth adding “Astro” to the title if we didn’t get some orbital mechanics into the game! As you gain altitude from a planet your vehicles will begin to experience less atmospheric drag slowing them down. As you traverse further still the effects of gravity will fade away. If you carefully balance your vehicle speed between these two thresholds then you can actually put your contraptions in orbit.
There are also no limits on what we consider to be a spaceship, if you can fling it out the atmosphere fast enough then you are welcome to call it an exploratory vessel! I have watched in amusement as various members of the dev team attempted to build “railgun” machines to launch their fellow cosmonauts into deep space.

[h3]Vehicle Floppyness [/h3]
There is one more important system at play that helps keep vehicles from instantly becoming piles of spaghetti like machinery on the floor. Angle Welds!

When you connect two rods together, they are automatically “welded” together at that specific angle. The physics engine will try its hardest to keep those rods at that angle no matter what. When you place down a Hinge component, you are just telling the physics system to ignore welding those rods together.
During early development of the game, we actually didn’t have this system. Players had to either manually weld rods together or carefully construct their vehicles from triangles shapes so they did not just fall over upon deployment. It was comical at first to watch their machines immediately collapse, but for them it quickly became tiresome, so we ended up automating the system.
[h3]Wheels & Drivechains[/h3]
On the surface you can connect wheels to engines, engines to seats and have yourself a neat little car to tootle around the planet and explore. However, hidden within the building mechanics of the game there is a physics based drivechain system. Why? Honestly, I thought it was cool and nobody stopped me putting it into the game. When you draw connections between wheels and engines, you are really defining little axles with physical properties.

[h3]Rod based Ubiquity[/h3]
Now I said everything was made from Points and Rods and it’s very true. The little ore pieces you pick up and cart around are really just little invisible rods and points with an ore component attached to them, they are literally just a little contraption. Same for those batteries scattered around the solar system. Even the character's hands are little points you can grab onto. Basically anything in this game driven by physics is just a little rod in the end.
At one point we even had bendy trees and foliage you could interact with driven by the system, however we decided to pull them from the game due to other technical difficulties.
[h3]Technical Jargon[/h3]
For the more geeky technical reader, this whole thing is really just a point-mass system driven by a Position-Based-Dynamics solver. Iterations are kept fairly low for performance, and we use a Jacobi style solver to hopefully prevent over-constrained systems from becoming unstable or biased. This results in a very “squishy” and compliant physics system. Fortunately, this matched the aesthetics of the game though, so we just rolled with it! There is some gnarly maths for some of the constraint gradients that deal with angle welds and embedding convex shapes into the rod constraints, but other than that it's really not all that complicated. It certainly is not anywhere close to physically accurate, but hey that was never the intention of the game.
[h3]Over and Out[/h3]
I hope you enjoyed this brief tour. I am certainly looking forward to seeing what horrendous, physics breaking contraptions you can come up with! Bring it on!
Astronimo will be arriving in Early Access later this year. Wishlist it now.
Join the Official Coatsink Discord
Follow Astronimo on Twitter