sphi/OpenStarscape
2
1
Fork
You've already forked OpenStarscape
0
Multiplayer 3D space simulator https://openstarscape.com
  • Rust 63.2%
  • TypeScript 32.4%
  • Python 2.7%
  • Shell 0.9%
  • CSS 0.6%
  • Other 0.2%
2025年05月30日 18:07:00 -07:00
deploy Drop outdated line from deploy readme 2024年02月23日 15:44:28 -05:00
protocol Support textures 2024年02月24日 05:27:23 -05:00
server Fix NaN issue in orbit calculation 2025年05月12日 23:47:53 -07:00
web Improve web test framework 2025年05月30日 18:07:00 -07:00
.editorconfig Update .editorconfig 2023年09月18日 05:03:52 -07:00
.gitignore Replace jest with custom unit test framework 2024年02月16日 04:55:40 -08:00
launch.sh Fix public directory 2024年02月23日 01:42:59 -05:00
license.txt Move things around for single repo 2023年09月10日 03:13:32 +02:00
readme.md Add bit to readme about how to run integration tests 2025年05月13日 00:00:43 -07:00
tasks.md Update tasks.md 2023年09月13日 02:25:05 -04:00
test.sh Display server test compile errors at bottom 2024年02月23日 04:18:24 -05:00
treefmt.toml Add treefmt and formatting configs 2023年09月10日 20:33:13 +02:00

OpenStarscape

An open source multiplayer 3D space simulator

Build for development

  • Install Rust/Cargo
  • Install Yarn classic
  • Run ./launch.sh --open-browser=true
  • Once Yarn and Cargo have downloaded dependencies and compiled the projects, a browser tab should open to the running game
  • Press Control+C in the terminal to quit

Configuration

The OpenStarscape server can be configured with a toml file, command line arguments or environment variables. See ./launch.sh --help for details.

Run tests

  • Run ./test.sh
  • Run ./launch.sh, go to http://127.0.0.1:6060/test.html and click Run all

Format code

  • Install treefmt (cargo install treefmt)
  • Run treefmt in the project root directory
    • You may need to add PATH="$PATH:~/.cargo/bin/" to your .bashrc and restart your shell if running treefmt gives command not found after installing
    • If you don't want to use treefmt, you can run cargo fmt and npx prettier . --write manually in the server and web directories respectively

Build for production

  • In the web directory run yarn prod-build
  • In the server directory run cargo build --release
  • The frontend ends up in web/public and the server binary in server/target/release/starscape-server

Project structure

  • web contains the web frontend, written in Typescript
  • server contains the game engine and server, written in Rust
  • protocol contains documentation for the protocol the frontend and server use to talk to each other
  • deploy contains tools and configuration files for deploying OpenStarscape on a server

License

All source code code is MIT licensed, the protocol is licensed under CC BY-SA