skyjade
  • Home
  • Games
  • Programs
  • About us
Image 1
Image 2
Image 3
Previous Next

GravitySim

GravitySim is an experimental game, that simulates the movement of the planets based on real life calculations. Place your own planets, build a solar system, or even a galaxy! There is no goal, no score, no victory, only endless possibilities and creativity.

The game was written in Python, using the Pygame module, that can be compiled into an EXE file, and can run on windows computers without any external installations. The free download will be available soon, until then the source code can be viewed on our GitHub page.

About the game

Maybe this is the game, which took the most time to develop. It required tons of mathematical help and programming skills to make this game. We got a lot of help from our teachers, but their knowledge wasn't the best for this project. Some functions - like focusing - doesn't work perfectly, but we are trying to find a solution for them. Currently, there are multiple versions available on GitHub, but it is recommended to download the newest one for the best experience.

How do I..?

After downloading the game, let's extract the .zip arhive, and run the "gravitysim.exe" file in the folder. The program will instantly show the simulation, welcoming the users with a three body problem simulation. You can move around with the arrow keys, and zoom using T and G keys. There are two pre-programmed configurations: three body problem, and an example solar system. The solar system can always be reset with the R key, or you can delete the planets by hovering over them with the mouse, and pressing the backspace or delete key. You can focus on a planet by hovering the mouse over it, then pressing the F key, or by switching between the planets using the comma and period keys. You can place a new planet by pressing the E key, or you can shoot a planet by pressing and holding the left mouse button, dragging the mouse, and releasing the button. You can modify the placement settings of the planets by clicking on the dropdown menu in the top right corner.

Controls

  • Arrow keys: camera movement/li>
  • T, G: Zoom
  • F: Focus (using mouse)
  • E: Place new planet
  • R: Reset solar system
  • Backspace or delete: Delete planet (using mouse)
  • D: Show planet paths
  • C: Clear path points
  • I: Show info panel, show info about a planet (using mouse)

How does it work?

The program simulates the gravitational forces between the planets, taking into account the mass and distance of the planets. The movement of the planets is based on Newton's law of gravitation, where the program calculates the gravitational force between the planets. The movement of the planets changes depending on their speed and position, which the program recalculates in every frame. The program allows the modification of the mass, diameter, and color of the planets, as well as the force of the shot. We tried to create a user-friendly interface that does not disturb the gameplay, while providing the user with information to understand the movement of the planets by displaying the information.

Code - gravity
Code of gravity calculation
Code of focusing
Code - focusing

Development and changelog

Version Release date Update details
0.1 2024.03.05 Conception, making of the engine
1.0 2024.03.13 Sandbox functions, settings menu, path drawing
1.1 2024.03.14 Camera movement, place planet with E, bugfixes
1.1.2 2024.03.26 three body problem, background stars, focusing, mass fine-tuning, new colors, bugfixes
1.2 2024.03.31 Fullscreen mode, responsive interface, faster camera movement (shift)

Updates on the way

1.2.2 2024.06 New functions, bugfixes
1.3 Second half of 2024 Menu page, ability to save and load
1.4 Beginning of 2025 More presets, ability to place them in game
1.5 First half of 2025 Spaceship mode, adjustable simulation speed

Worth a download?

We would be very happy if you try our game, especially if you give us feedback!


skyjade

© 2024 Skyjade