Skip to content

Hermes & Atlas: a simulator and 3D renderer for Brisbane's public transport network. (UQ DECO3801)

License

Notifications You must be signed in to change notification settings

DECO3801-Segfault-Coredump/hermes

Repository files navigation

DECO3801 Hermes Traffic Simulator

from Team Segmentation fault (core dumped), Semester 2 2023

About

This is the simulation engine (Hermes) and the 3D renderer (Atlas) for our DECO3801 project. We are implementing project 031: Optimised Events – Digital Twins for Traffic Planning.

The Hermes simulator is written in Java and ingests both online and offline Translink GTFS data. The Atlas renderer is written in Kotlin and uses libGDX as the graphics framework. It ingests OpenStreetMap data and renders it efficiently into a 3D world. The combined Hermes+Atlas application runs on Windows, Mac and Linux, requiring Java 17.

For more information, see the docs directory. You will need to at least follow docs/atlas_map_pipeline.md to run the renderer.

Hermes authors:

  • Lachlan Ellis
  • Cathy Nguyen

Atlas authors:

  • Matt Young
  • Henry Batt

Frontend authors:

  • Connor Vilaysack wrote the data analytics frontend which is available here

Setting up the toolchain

First, you need to install the dependencies for Hermes and Atlas, which are:

Important: You now need to set up the OpenStreetMap Docker and import the Brisbane data. Please read docs/atlas_map_pipeline.md. The game will not run at all unless you follow the steps in this document.

Editing

Now, you can open the project in IntelliJ. You should also go to Settings (CTRL+ALT+S) -> Build, Execution & Deployment -> Build Tools -> Gradle, and change "Build and run using" from Gradle to IntelliJ IDEA.

Before writing code, please read docs/guidelines.md for some very loose code style guidelines. Please remember to add @author <Your Name> to each class you write or append your name to the list of authors.

Running

Run Lwjgl3Launcher in the "lwjgl3" subproject. Log files are available in ${HOME}/Documents/DECOSegfault/hermes.log. For example, on Linux for me, they are in /home/matt/Documents/DECOSegfault/hermes.log.

Key bindings for Atlas game window:

  • ESCAPE: Quit
  • ENTER: Toggle fullscreen
  • G: Show/hide debug info
  • ]: Force garbage collected caches to run a GC
  • P: Print camera pose
  • .: Increase Hermes speed
  • ,: Decrease Hermes speed
  • B: Teleport to random vehicle
  • ;: Take screenshot
  • WASD: Move forward, left, back, right
  • Mouse: Look
  • Left click: Select vehicle
  • Shift: Boost movement speed
  • CTRL: Move down
  • SPACE: Zoom up
  • R: Reset camera
  • T: Show/hide UI adjustments (vehicle boxes and crosshair)
  • F: Enable/disable camera following selected vehicle

Command line options:

To edit these options: Go to Run -> Edit configurations, go to Lwjgl3Launcher, click "Modify options", then check "Add VM options". In the field labeled "VM options", paste the arguments.

  • -Ddebug: Enable debug features (e.g. debug menu shown by default, skip launch prompts)
  • -Dnohermes: Disable loading Hermes to reduce launch times when working on Atlas graphics
  • -Dnolockmouse: Disables mouse input capturing, useful for breakpoint debugging
  • -Duvtexturing: Transitions to UVTexturingScreen after load to texture building UVs instead of normal Atlas

Additional notes

You can make a release build with ./gradlew lwjgl3:jar. This will write a runnable JAR file to lwjgl3/build/lib. This JAR file can be run anywhere with a JRE, and it includes all the app's assets.

It should also be possible to use JPackager to generate bundled native binaries for Windows, Mac and Linux, but I haven't got around to doing this yet. If it does become necessary ping @matt.

Theoretically you can also run the game using ./gradlew lwjgl3:run, however there is currently a macOS specific bug that prevents the game from correctly launching this way in release mode, which is the default. This is why we recommend running through IntelliJ. On Windows and Linux this is not an issue. If you're on Mac, you can try pass -Ddebug to the game to skip the launch prompts, which may unbreak it. In general though, it will be easiest to run in IntelliJ.

Licence

The code written by us during the semster is licenced under the Mozilla Public License v2.0. See LICENSE.txt. Note that this applies only to the code written by us, not any third party code, libraries or assets. Each file is written by one or more authors listed in the "@author" comments, who retain the copyright to that specific file.

Hermes and Atlas use open-source data and 3D models, which are available in atlas_data_raw. The following copyright applies to them:

Please note that some of these are non-commercial licences only, which may be incompatible with the MPL 2.0 when combined. If you want to make a fully legally valid end product, you will probably have to ship your own assets.

About

Hermes & Atlas: a simulator and 3D renderer for Brisbane's public transport network. (UQ DECO3801)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •