Jump to content

LUMINSim Documentation: Difference between revisions

From Aurora Robotics
No edit summary
No edit summary
Line 1: Line 1:
== LUMINSim Documentation ==
= LUMINSim Documentation =
This is an ongoing page as I document [[LUMINSim]]'s current systems. Feel free to add to it!
This is an ongoing page as I ([[User:Acmattson3|Andrew Mattson]]) document [[LUMINSim]]'s current systems. This page is a ''major'' work in progress; feel free to add to it!
 
Going forward, I hope to add:
 
* A list of the non-default classes/nodes this project declares.
* In-depth descriptions of the inner workings of each major system, including:
** Power
** Tools and tool swapping
** Terrain
** Multiplayer
** Each user-controlled scene (robots and astronaut)
** The UI (multiplayer menu, settings menu, keybind menu)
** Each (largely) independent scene and corresponding system(s) (brick maker, dirt spawner, tool spawner, etc.)


== Getting Started ==
== Getting Started ==
Line 12: Line 24:
** '''<code>export_presets.cfg</code>''' – Information for Godot on how to export the project into platform-native forms. Created automatically by the Godot export menu.
** '''<code>export_presets.cfg</code>''' – Information for Godot on how to export the project into platform-native forms. Created automatically by the Godot export menu.
** '''<code>game_manager.gd</code>''' – Handles the majority of the multiplayer logic, especially the sending of data between the clients and the server. See [[LUMINSim Documentation#Networking and Multiplayer|Networking and Multiplayer]].
** '''<code>game_manager.gd</code>''' – Handles the majority of the multiplayer logic, especially the sending of data between the clients and the server. See [[LUMINSim Documentation#Networking and Multiplayer|Networking and Multiplayer]].
** '''<code>project.godot</code>''' – The main project file. Contains general project configurations and properties. This is the primary reference point for the Godot Engine when developing this project.
** '''<code>demo/astra</code>''' – Files pertaining to the drivable [[LAMP v1|Astra]] robot. See [[LUMINSim Documentation#Astra Robot|Astra Robot]].
** '''<code>demo/astra</code>''' – Files pertaining to the drivable [[LAMP v1|Astra]] robot. See [[LUMINSim Documentation#Astra Robot|Astra Robot]].
** '''<code>demo/astronaut</code>''' – Files pertaining to the in-game, procedurally-animated astronaut character. See [[LUMINSim Documentation#Astronaut Character|Astronaut Character]].
** '''<code>demo/astronaut</code>''' – Files pertaining to the in-game, procedurally-animated astronaut character. See [[LUMINSim Documentation#Astronaut Character|Astronaut Character]].
Line 19: Line 32:
** '''<code>demo/excahauler</code>''' – Files pertaining to the drivable [[Excahauler]] robot. See [[LUMINSim Documentation#Excahauler Robot|Excahauler Robot]].
** '''<code>demo/excahauler</code>''' – Files pertaining to the drivable [[Excahauler]] robot. See [[LUMINSim Documentation#Excahauler Robot|Excahauler Robot]].
** '''<code>demo/graphics</code>''' – Contains many images for icons and textures, especially for the user interface. See [[LUMINSim Documentation#User Interface|User Interface]].
** '''<code>demo/graphics</code>''' – Contains many images for icons and textures, especially for the user interface. See [[LUMINSim Documentation#User Interface|User Interface]].
** '''<code>demo/landers</code>''' – Contains directories for different (currently, static models of) lunar landers.
** '''<code>demo/landers</code>''' – Contains directories for different lunar landers. Landers are currently just static models.
** '''<code>demo/excahauler</code>''' – Files pertaining to the drivable [[Excahauler]] robot. See [[LUMINSim Documentation#Excahauler Robot|Excahauler Robot]].
** '''<code>demo/excahauler</code>''' – Files pertaining to the drivable [[Excahauler]] robot. See [[LUMINSim Documentation#Excahauler Robot|Excahauler Robot]].
** '''<code>demo/levels</code>''' – Contains the main playable (i.e., non-UI) scenes and related files. See [[LUMINSim Documentation#Levels|Levels]].
** '''<code>demo/levels</code>''' – Contains the main playable (i.e., non-UI) scenes and related files. See [[LUMINSim Documentation#Levels|Levels]].
Line 26: Line 39:
** '''<code>demo/terrain</code>''' – Scenes and files pertaining to the ''dynamic'' (i.e., mineable) terrain. See [[LUMINSim Documentation#Terrain System (C++)|Terrain System (C++)]].
** '''<code>demo/terrain</code>''' – Scenes and files pertaining to the ''dynamic'' (i.e., mineable) terrain. See [[LUMINSim Documentation#Terrain System (C++)|Terrain System (C++)]].
** '''<code>demo/terrain_fixed</code>''' –  Scenes and files pertaining to the ''static'' (i.e., unchanging) terrain. See [[LUMINSim Documentation#Terrain System (C++)|Terrain System (C++)]].
** '''<code>demo/terrain_fixed</code>''' –  Scenes and files pertaining to the ''static'' (i.e., unchanging) terrain. See [[LUMINSim Documentation#Terrain System (C++)|Terrain System (C++)]].
** '''<code>demo/util</code>''' –  Scenes and files pertaining to UI. See [[LUMINSim Documentation#User Interface|User Interface]].
** '''<code>demo/util</code>''' –  Scenes and files pertaining to UI as well as other useful scripts. See [[LUMINSim Documentation#User Interface|User Interface]] and [[LUMINSim Documentation#Additional Utilities|Additional Utilities]].
In-depth repository structure documentation (brief descriptions on a per-scene basis) may be created here by anyone.


== Terrain System (C++) ==
== Terrain System (C++) ==
Line 32: Line 46:


=== Static Terrain ===
=== Static Terrain ===
<code>TerrainStatic256</code> loads heightmaps, creates render and collision geometry
<code>TerrainStatic256</code> loads heightmaps, creates render and collision geometry.


=== Dynamic Terrain ===
=== Dynamic Terrain ===
<code>TerrainSim</code> simulates excavation, landslides, and merging dirtballs back into the heightmap
<code>TerrainSim</code> simulates excavation, landslides, and merging dirtballs back into the heightmap.


== Terrain Tools ==
== Terrain Tools ==
Scripts such as <code>dirt_spawner.gd</code> and <code>dirtball.gd</code> spawn and merge mobile particles with the dynamic terrain
Scripts such as <code>dirt_spawner.gd</code> and <code>dirtball.gd</code> spawn and merge mobile particles with the dynamic terrain.


== Robot Systems ==
== Robot Systems ==


=== Astra Robot ===
=== Astra Robot ===
<code>astra_3d.gd</code> handles driving, energy usage, and tool attachments for the primary rover
The primary scene file is <code>astra_3d.tscn</code>. <code>astra_3d.gd</code> handles driving and energy usage, as well as tool attachment. Works with <code>astra_arm_3d.gd</code> and <code>astra_hopper_3d.gd</code> for arm/hopper actuation. See [[LUMINSim Documentation#Arm and Hopper|Arm and Hopper]].


=== Arm and Hopper ===
=== Arm and Hopper ===
Separate nodes for the arm and hopper implement joint movement and excavation logic
Separate nodes controlled by <code>astra_arm_3d.gd</code> and <code>astra_hopper_3d.gd</code> for the arm and hopper implement joint movement.


=== Astronaut Character ===
=== Astronaut Character ===
<code>astronaut_character_3d.gd</code> provides walking and camera control for a player avatar
<code>astronaut_character_3d.gd</code> provides walking and camera control for a procedurally (i.e., code-driven) animated astronaut player avatar.


=== Excavation Tools ===
=== Excavation Tools ===
Attachments such as the bucket, forks, and saw blade extend <code>ToolAttachment</code> for various tasks
Attachments such as the bucket, forks, and saw blade extend the node class <code>ToolAttachment</code> for various tasks.


=== Excahauler Robot ===
=== Excahauler Robot ===
WIP
WIP.


== Objects ==
== Objects ==
WIP
WIP.


== Static Objects ==
== Static Objects ==
Charge stations, solar panels, tool spawners, and other environment pieces provide energy or spawn tools
Charge stations, solar panels, tool spawners, and other environment pieces provide energy or spawn tools.


== Networking and Multiplayer ==
== Networking and Multiplayer ==
<code>GameManager.gd</code> manages synchronized player/object data and signals for network updates
<code>GameManager.gd</code> manages synchronized player/object data and signals for network updates.


<code>multiplayer_menu.gd</code> lets players host or join games, start sessions, and handle disconnects
<code>multiplayer_menu.gd</code> lets players host or join games, start sessions, and handle disconnects.


== User Interface ==
== User Interface ==
WIP
WIP.


== Cameras and Controls ==
== Cameras and Controls ==
<code>movable_camera_3d.gd</code> and <code>freecam.gd</code> implement user-controlled cameras, both first- and third‑person
<code>movable_camera_3d.gd</code> and <code>freecam.gd</code> implement user-controlled cameras, both first- and third‑person.


The user interface (<code>ui.gd</code>, <code>joystick.gd</code>, <code>keybinds_menu.gd</code>) provides HUD elements, customizable input bindings, and optional on-screen controls for mobile users
The user interface (<code>ui.gd</code>, <code>joystick.gd</code>, <code>keybinds_menu.gd</code>) provides HUD elements, customizable input bindings, and optional on-screen controls for mobile users.


== Levels ==
== Levels ==
Scenes in <code>demo/levels/</code> (e.g., <code>main3D.tscn</code> with script <code>main3D.gd</code>) instantiate players, objects, and the terrain simulator, driving the overall game loop
Scenes in <code>demo/levels/</code> (e.g., <code>main3D.tscn</code> with script <code>main3D.gd</code>) instantiate players, objects, and the terrain simulator, driving the overall game loop.


== Additional Utilities ==
== Additional Utilities ==
Miscellaneous scripts such as <code>fps_counter.gd</code> and <code>multiplayer_menu.gd</code> assist with debugging and session management
Miscellaneous scripts such as <code>fps_counter.gd</code> and <code>multiplayer_menu.gd</code> assist with debugging and multiplayer session management.
 
== Building the Extension ==
The <code>SConstruct</code> file compiles all <code>.cpp</code> sources into a shared library used by the Godot projec

Revision as of 14:53, 4 July 2025

LUMINSim Documentation

This is an ongoing page as I (Andrew Mattson) document LUMINSim's current systems. This page is a major work in progress; feel free to add to it!

Going forward, I hope to add:

  • A list of the non-default classes/nodes this project declares.
  • In-depth descriptions of the inner workings of each major system, including:
    • Power
    • Tools and tool swapping
    • Terrain
    • Multiplayer
    • Each user-controlled scene (robots and astronaut)
    • The UI (multiplayer menu, settings menu, keybind menu)
    • Each (largely) independent scene and corresponding system(s) (brick maker, dirt spawner, tool spawner, etc.)

Getting Started

To learn how to get started with development yourself, visit the repository's README and follow the steps there.

Repository Structure

  • src/ – C++ GDExtension code for terrain and registration. Likely to be deprecated. See Terrain System (C++).
  • demo/ – Godot project containing levels, assets, and GDScript systems.
    • export_presets.cfg – Information for Godot on how to export the project into platform-native forms. Created automatically by the Godot export menu.
    • game_manager.gd – Handles the majority of the multiplayer logic, especially the sending of data between the clients and the server. See Networking and Multiplayer.
    • project.godot – The main project file. Contains general project configurations and properties. This is the primary reference point for the Godot Engine when developing this project.
    • demo/astra – Files pertaining to the drivable Astra robot. See Astra Robot.
    • demo/astronaut – Files pertaining to the in-game, procedurally-animated astronaut character. See Astronaut Character.
    • demo/bin – Files pertaining to the compiled GDExtension binaries. Likely to be deprecated. See Terrain System (C++).
    • demo/components – Contains components or component-like scenes and related files. See Components.
    • demo/environment – Files for the skybox (i.e., the stars in the sky).
    • demo/excahauler – Files pertaining to the drivable Excahauler robot. See Excahauler Robot.
    • demo/graphics – Contains many images for icons and textures, especially for the user interface. See User Interface.
    • demo/landers – Contains directories for different lunar landers. Landers are currently just static models.
    • demo/excahauler – Files pertaining to the drivable Excahauler robot. See Excahauler Robot.
    • demo/levels – Contains the main playable (i.e., non-UI) scenes and related files. See Levels.
    • demo/objects – Contains non-static (i.e., movable RigidBody3D) objects. See Objects.
    • demo/static_objects – Contains static (i.e., unmovable StaticBody3D) objects and their related code. See Static Objects.
    • demo/terrain – Scenes and files pertaining to the dynamic (i.e., mineable) terrain. See Terrain System (C++).
    • demo/terrain_fixed – Scenes and files pertaining to the static (i.e., unchanging) terrain. See Terrain System (C++).
    • demo/util – Scenes and files pertaining to UI as well as other useful scripts. See User Interface and Additional Utilities.

In-depth repository structure documentation (brief descriptions on a per-scene basis) may be created here by anyone.

Terrain System (C++)

C++ based GDExtensions are likely to be replaced with a more developer-friendly system, likely one that downloads terrain from a separate server that handles all terrain logic.

Static Terrain

TerrainStatic256 loads heightmaps, creates render and collision geometry.

Dynamic Terrain

TerrainSim simulates excavation, landslides, and merging dirtballs back into the heightmap.

Terrain Tools

Scripts such as dirt_spawner.gd and dirtball.gd spawn and merge mobile particles with the dynamic terrain.

Robot Systems

Astra Robot

The primary scene file is astra_3d.tscn. astra_3d.gd handles driving and energy usage, as well as tool attachment. Works with astra_arm_3d.gd and astra_hopper_3d.gd for arm/hopper actuation. See Arm and Hopper.

Arm and Hopper

Separate nodes controlled by astra_arm_3d.gd and astra_hopper_3d.gd for the arm and hopper implement joint movement.

Astronaut Character

astronaut_character_3d.gd provides walking and camera control for a procedurally (i.e., code-driven) animated astronaut player avatar.

Excavation Tools

Attachments such as the bucket, forks, and saw blade extend the node class ToolAttachment for various tasks.

Excahauler Robot

WIP.

Objects

WIP.

Static Objects

Charge stations, solar panels, tool spawners, and other environment pieces provide energy or spawn tools.

Networking and Multiplayer

GameManager.gd manages synchronized player/object data and signals for network updates.

multiplayer_menu.gd lets players host or join games, start sessions, and handle disconnects.

User Interface

WIP.

Cameras and Controls

movable_camera_3d.gd and freecam.gd implement user-controlled cameras, both first- and third‑person.

The user interface (ui.gd, joystick.gd, keybinds_menu.gd) provides HUD elements, customizable input bindings, and optional on-screen controls for mobile users.

Levels

Scenes in demo/levels/ (e.g., main3D.tscn with script main3D.gd) instantiate players, objects, and the terrain simulator, driving the overall game loop.

Additional Utilities

Miscellaneous scripts such as fps_counter.gd and multiplayer_menu.gd assist with debugging and multiplayer session management.