Game3 planetary gravity demo with hud

(Daedalus_MDW) #1

game3 Demo. enough said.

keys: (or look in game3\
WASD/space/C: move/jump/crouch
middle mouse/ enter: use vehicle
shift-wheel: zoom camera
V: changes between views
R: toggle vehicle free rotate cam
esc: pause menu
pause(break): force quit

space/C: vtol or handbrake
WASD: steer/yaw/throttle
Arrows: pitch/roll
F: landing gear
Enter: exit

backspace: set vehicle upright
alt-pageup: if you fall through ground

uses game3 @ alpha test 2

get updates to game3 module here

computer too slow? edit the Graphics.cfg after it generates on first run
“HIGH”: full shaders
“MEDIUM”: no specular and 4x anisotropic
“LOW”: shadeless mode

UPBGE 0.2.4 Notice!
set the color space to “Linear” in the Render properties for correct colors.

Player movement relative to camera (a la Super Mario Galaxy) in UPBGE
An Intro to my Project - Game 3.0
BGE : Where are the collabrative projects ? Creation of a Wiki?
(Lostscience) #2

how would we set this up?is it supposed to just work?

(Daedalus_MDW) #3

it should just work. open the planetary_gravity_demo.blend and run the standalone player.

(Lostscience) #4

it worked.where is the vehicle I did not see it?

(Daedalus_MDW) #5

theres a few empty objects that you can find in the viewport. theres a space ship on the starting planet, and buggy on the other planets.

you can move any of the spawners to start in a new place.

1 Like
(Lostscience) #6

i used the spaceship to fly off the planet.And I found the buggy on another planet.

(Lostscience) #7

is ledge hanging implemented in this demo.what would be neat is if you could get into

ship and cross the sea on one of the planets.

(Daedalus_MDW) #8

boats are planned :sunglasses: :+1:

procedural ledge grab should work. just add a cube and put it somewhere.

(Lostscience) #9

planet gravity is not like spaceship gravity.could we have spaceship gravity before we have boats?

(Daedalus_MDW) #10

you mean directional? like sci fi gravity in space station? then yes, it would be simple add on.

(Lostscience) #11

yes I do.that way I could land the spaceship inside a spaceship.

(Lostscience) #12

I made a few buildings in the demo.i know they do not look like much but I was

trying to figure out how to place buildings on the planet.i sculpted the terrain too.
here is my zip file.
i was thinking of using a giant ring to boolean the terrain in certain areas.

(Blended_Blue) #13

Is it a true NxN Newtonian mass sim with real M and G constants plugged into the g=GM/r^2 equation?

I love real mass games as they can be so useful when planning orbital maneuvers!

Here’s a Python sim (sorta like a game) that I wrote ~two years ago for doing NxN massive body simulation on a desktop with OpenVR/SteamVR support!!. It’s not in Blender game but all code is Python3 compatible. I wrote the trigonometric Newtonian mass functions using pure vectorized matrix math for efficiency in the NxN mass and particle calculations. I have written various examples using pure python, numpy and Tensorflow.

I called it GravityVR and I made it available on my Github page for the scientific community. It may contain some useful bits such as the extras for some trigonometric and force related functions.

It seems accurate. Even at large timesteps there’s a clear helion precession that can be observed being generated from the tidal force of even Earth sized masses. and it’s very fast at computing the accelerations of a large number of bodies due to their mutual gravitational attractions.

The simple volumetric shaders are not especially brilliant, but they do look okay in stereo/VR:

It’s also very neat in VR (watching Jupiter tear Saturn’s rings to shreds after a close encounter in the “Saturn Vs. Jupiter” example). Also because everything is “to scale” it puts a very new perspective on just how small the Earth truly is compared to the size of it’s orbital diameter and the solar system :astonished:!!!

Maybe it may help?

(Daedalus_MDW) #14

no, the gravity is binary since that wasnt the purpose of the demo. if further then planet radius and sky height, stop gravity. tapering the gravity with an equation would prove slightly problematic with the comically small planets. just driving the buggy vehicle off a little hill would send you into orbit :laughing:

the feat being demonstrated is a complex game mechanics system that is fully adaptive to varying environments. the exact same code works on traditional planar maps.

in the PYTHON folder there is a which has the gravity function. is very simple and can be easily modified to be as sophisticated as desired.

a planned feature is atmosphere air drag variance, so space craft can travel much faster in space without slowing down (unless you have a scifi ship that ignores air drag).

(Lostscience) #15

could you make a npc cube that can follow the player around the planet in the demo?

(Nicholas_A) #16

You could do that yourself. Add a cube and put a steering actuator on it.

(Lostscience) #17

i tried the steering actuator it does not work.

(Daedalus_MDW) #18

it would require a sub class of CoreObject and use the alignToGravity() function to keep aligned to planet. then rayCast down along owner.worldPosition+owner.getAxisVect((0,0,-1)) to set the location of the object the surface of the planet.

sub class CorePlayer would be a bit tricky. a new ai variation would be needed. its on the to do list, but it could be a while before i consider messing with a proper npc solution.

1 Like
(Lostscience) #19

what are you working on now?

(CYNIC78) #20

What a wonderfull template! :upside_down_face: Deadalus you are best! Will wait for next updates! BTW what are you planning to add next?