Skip to content

Releases: MarcT1me/GravitySimulation2-JavaEdition

0.12.3

01 Apr 14:38

Choose a tag to compare

GravitySimulation2 - Java edition

powered by LibGDX

GS2ico128

Description

This is a small game written in java using the popular LibGDX library.
The game is a simulation of the movement of various objects in space. All calculations take place in a separate stream and according to the real formulas of classical mechanics.
The game has an interface with bitmap texts, which adds atmosphere. There is a background of stars (screenshot from the game Elite Dangerous, made by my friend)

Settings

The game has settings by category

  • Game - settings of various game components that are not included in other categories
  1. interfacesize - changes the sizes of different interface elements
  2. Buttons for enabling and disabling the FPS display of the TPS simulation window and the game version
  3. Various sliders for camera and mouse sensitivity settings
  • Window - window settings
  1. Switch the fullscreen
  2. Select the monitor. It changes dynamically, if you have more than one monitor, then when the full screen is turned on, you can capture the game behind a specific monitor.
  3. Window dimensions. It only works if fullscreen mode is turned off.
  4. Settings related to the number of frames,
  • VSync - includes the technology of the same name
    • target FPS - allows you to select a specific FPS. It is automatically limited to the frequency of the monitor when VSync is enabled, in other cases it has a range from 1 to 300 FPS. FPS can be delimited by putting the slider in the leftmost position.
  • Graphic - advanced graphics settings, works only in simulation
  1. Setting up the display of the speed of objects
  • show V vectors - V vector is a red line that visualizes the speed of an object and the direction in which it will move with the current data.
    • V vector scale - V vector can be scaled by changing its scale from 0.5 to 10 of its original length
    • show V modules - switches the display of the value of the velocity vector of the object
  1. Switching the display of the object's position values
  2. The direction line is a line pointing to an object, it starts a little further from the center of the screen and goes to the object. This line gives a 3D effect because when it is turned on, it seems that the object is standing on the counter.
    • display switching setting
  • line transparency
  1. trajectory - the trajectory of the object. This is a line that displays the object's past positions. The lighter part is responsible for the new positions, the more transparent for the old ones.
    • switching visibility
    • len - the number of points to be remembered. Attention! The higher the value, the more RAM will be used. It is better to reduce the values in advance if too many objects are involved in your simulation.
    • interval - is responsible for the time intervals between which points will be created. The higher the value, the more noticeable the interval will be.

Saves

The game implements the saving of scenes for simulation in halyards.

  • save - the file is the header for saving. The save name and time data are duplicated here (they are not implemented in the saves provided right after downloading)
  • camera - a file for storing data about the camera, (zoom PosX posY)
  • simulation - data about the simulation, its speed, maximum allowed speed (in powers of two) and TPS of the simulation
  • scene is a file with enumerations of data about scene objects
    The game has already implemented several scenarios:
  • Centauri - Alpha Centauri and Proxima Centauri system
  • duet - two massive stars close to each other
  • magic - two objects with the same difference, one with a positive mass and the other with a negative mass
  • simple - a small system consisting of a star and 2 objects with a mass of 10 kilograms
  • sol - the solar system (the earth has a moon)
  • test - a small unstable save of 3 large-mass objects

Node

The game still has not implemented error detection and information output (logging)
When loading a scene, the game forcibly extends the loading time by 1 second. For a release, it doesn't carry any semantic loads, just decoration (one second is not that long)
The game still does not have a save editor implemented.
There is no sound implemented in the game

Futures

  • error detection and logging
  • save editor
  • textured objects
  • adding lighting and improving graphics
  • realization of tidal forces
  • more types of objects (asteroids, comets)
  • It is possible to add rockets and simulate flight between planets. At the same time, improved physics for working with small objects (asteroids, rockets, comets)

Possible errors

  • eternal download - check the save files, they should not contain numbers without a fractional part (example of an incorrect number 0, corrected version 0.0)
  • the window does not respond - check the trajectory settings, or better yet, reset Graphics and configure again

Fixed errors that may return

  • canceling the download pause and enabling it after a second (due to a one-second delay when loading the save)
  • after the game is closed, the program continues to work - there is a problem with stopping the simulation flow. Use the interface and don't make any "sudden movements"