sphi/OpenStarscape
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%
| deploy | Drop outdated line from deploy readme | |
| protocol | Support textures | |
| server | Fix NaN issue in orbit calculation | |
| web | Improve web test framework | |
| .editorconfig | Update .editorconfig | |
| .gitignore | Replace jest with custom unit test framework | |
| launch.sh | Fix public directory | |
| license.txt | Move things around for single repo | |
| readme.md | Add bit to readme about how to run integration tests | |
| tasks.md | Update tasks.md | |
| test.sh | Display server test compile errors at bottom | |
| treefmt.toml | Add treefmt and formatting configs | |
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 tohttp://127.0.0.1:6060/test.htmland clickRun all
Format code
- Install treefmt (
cargo install treefmt) - Run
treefmtin the project root directory- You may need to add
PATH="$PATH:~/.cargo/bin/"to your.bashrcand restart your shell if runningtreefmtgivescommand not foundafter installing - If you don't want to use treefmt, you can run
cargo fmtandnpx prettier . --writemanually in theserverandwebdirectories respectively
- You may need to add
Build for production
- In the
webdirectory runyarn prod-build - In the
serverdirectory runcargo build --release - The frontend ends up in
web/publicand the server binary inserver/target/release/starscape-server
Project structure
webcontains the web frontend, written in Typescriptservercontains the game engine and server, written in Rustprotocolcontains documentation for the protocol the frontend and server use to talk to each otherdeploycontains 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