In this blog-post I will describe the solutions we considered and tried in Space Engineers regarding artificial gravity, I will reveal the one we finally chose and explain how close to realism it is.
Warning: Space Engineers is still in development. Everything in the game is subject to change.
Why do we need gravity in Space Engineers?
Humans need gravity to avoid adverse health effects of weightlessness during long-term space travel and habitation. Natural movement such as running and jumping requires Earth-like gravity as well.
A game with no gravity (player moves only by jetpack) offers limited experience. Furthermore, the construction constraints that are imposed on players building space stations in a gravity-enabled environment are vastly different from a situation where gravity isn’t possible.
Scientifically correct solutions
These are the scientifically correct methods for producing artificial gravity. Unfortunately, none is suitable for our game.
- Rotation (centrifugal force) – generated by a large rotating ring (example: “2001: A Space Odyssey”). The gravity felt by the objects is simply the reaction force of the object on the hull reacting to the centripetal force of the hull on the object. This method wouldn’t work on static asteroids and it’s too impractical for our game. Although, this method may become available if we decide to implement the “rotating motor module”.
- Linear acceleration – when a spacecraft accelerates in a straight line, it is forcing objects inside the spacecraft in the opposite direction, thus providing g-force. Gravity would be present only during the acceleration and deceleration. This method is impractical as well and is not “player friendly”.
- Mass – this is in fact the natural gravity. To create Earth-like gravity, you would need an object of equal mass (not necessary size). Asteroids don’t have enough mass to generate noticeable gravity and can be discarded as a gravity source.
- Magnetism - similar effect to gravity has been created through diamagnetism. It requires magnets with extremely powerful magnetic fields; yet it required a magnet and system that weighed thousands of kilograms, was kept superconductive with expensive cryogenics, and required megawatts of power. With such extremely strong magnetic fields, safety for use by humans is unclear.
Solutions we tried and discarded
- Magnetic boots – those would allow an astronaut to attach himself to the ferrous floor or hull and walk. This must not be confused with artificial gravity, as the person would still perceive weightlessness. Running, jumping and advanced movement wouldn’t be possible. Boots wouldn’t work on an asteroid surface and the astronaut would get pulled down only if there’s a surface under his feet - if he steps out of a platform and the closest surface is meters below him, nothing would pull him down and he would just float in space. He wouldn’t fall.
Spherical gravitational field – a hypothetical gravity generator that would exert an attractive force on all objects in its proximity, equally in all directions. In other words, objects would fall towards the generator’s center. This is how it works on Earth – every object falls to Earth’s center. We tried this method and it’s not suitable for small surfaces found on mother ships. It would require a very large surface to neglect the radial nature of this type of gravitational field. Imagine this: you move on a flat surface and a gravity generator is somewhere below you. The gravity force pulls you to the generator’s center and this vector keeps changing as you move on that flat surface.
Artificial gravity in Space Engineers
We had to accept the fact that there are no feasible solutions for producing artificial gravity. Therefore, the direction we followed is shaped by the requirement of intuitive game-play and not by our drive for realism.
Gravity generators are modules that consume energy and produce unidirectional gravitational force – a vector that’s parallel to the generator’s main axis. Let’s put it this way – a gravity generator installed on a platform will pull down all objects above and below this platform.
A gravity generator has an effective radius of 150 meters. Gravity forces from multiple overlaying gravity generators aggregate.
Gravity generators don’t have mass proportional to their gravitational force, as this would require extremely powerful thrusters to move a ship if it had gravity generators installed.
The purpose of this screenshot is to show how gravity generators aggregate their force. There are five gravity generators; green lines demonstrate the direction of pull/fall. Notice the gravity indicator in the right-bottom corner: grey lines show all gravity vectors and the white line shows the final aggregated gravity.
The HUD indicator tells you that there’s no gravity source near you.
Actual limitations in Space Engineers
Gravity affects astronauts and small objects only.
Gravity doesn’t affect asteroids, small and large ships, static objects and astronauts who have jetpacks on.
We plan to reevaluate this model and enable gravity on more types of objects. Right now we have to stick with this. Also, in the future we should redo how gravity influences character animation (running and jumping in high gravity environment, running in multi-gravity environment with vectors changing each step, climbing on a ladder heads-down, etc.)
Since our implementation of gravity is not natural (we are breaking the laws of physics here), some obscure situations have emerged and we have to solve them carefully before we enable gravity on every type of object:
- Imagine a scene with two mother ships, each one having its own gravity generator. The problems occur once the gravity generator on the first ship starts pulling the second ship, and the gravity generator on the second ship starts pulling the first ship. The ships get in contact and one ship will push (not pull) the other. It’s funny that sci-fi movies don’t consider this effect; probably nobody ever tried to simulate it.
- Imagine operating a jetpack in gravity-enabled environment, especially if there’s no certain way to tell where’s up and down and there can be potentially multiple gravity fields
Imagine piloting a small ship in a field of multiple arbitrarily oriented gravity fields
Conclusion
It’s interesting that our universe is configured precisely the way it is. One slight deviation to the algorithms and constants that regulate it and things don’t work anymore.
Trying to replicate the reality – when developing a sandbox game – proved to be useful. No need to reinvent the wheel; nature already did its job.
---
Thanks for reading this!
Like us on Facebook https://www.facebook.com/SpaceEngineers, follow us on
Twitter https://twitter.com/SpaceEngineersG and you will be notified on all updates.
Warning: Space Engineers is still in development. Everything in the game is subject to change.
UPDATED: Forum thread for this blog-post: http://forums.keenswh.com/post/gravgens-6530078