Gravity Simulation

Gravity Simulation

4 devlogs
9h 56m
•  Ship certified
Created by Doodl0

A basic gravity sim in Godot. You can create and modify gravity objects in 2D, and also view a 3D sim. For now, I don't plan on making the 3D sim editable, as I feel it would be significantly more work.

In the 2D sim, you can use the UI to modify the properties of a gravity object, then right click to create it. You can also toggle boundaries around the edge of the camera, which will stop any objects going off screen.

You can press Escape anytime to quit or return to the menu.

Timeline

Ship 1

1 payout of shell 44.0 shells

Doodl0

17 days ago

Doodl0 Covers 4 devlogs and 9h 56m

Added a main menu to toggle between scenes, also allowing you to access the 3D gravity sim. Also added the ability to press escape in scenes to return to menu/quit.

I learn how to use Godot UI, and added UI to make 2D gravity objects to the main 2D scene. Also worked on added basic 3D gravity, although not editable yet and not set as the default scene, as I can't think of a way to make it editable yet simple. Also, since my last commit, I've tuned the gravity constant and mass numbers to make them more human readable and less long. TBH, I may have wasted quite a bit of time reworking the same parts of the code and UI over and over

Update attachment

Added mass and gravitational pull to objects. Gravity objects have to be children of the Gravity Objects node and right now the gravitational constant is accurate to real life, but I am considering changing it to lower mass numbers a bit

Did some research, and have set up basic velocity and collision system, with objects colliding with window edges that scale dynamically. Took me so long because I was unsure on how to implement the logic in Godot and which physics nodes to use, as the resources I am using are for a standalone app