web-sys
.Oxygengine is highly based on specs
crate used for its ECS framework.
You can get understanding of it by reading specs
book and tutorials here: https://specs.amethyst.rs/docs/tutorials/
node.js
with npm
tools installed (https://nodejs.org/)wasm-pack
toolset installed (https://rustwasm.github.io/wasm-pack/installer/)oxygengine-ignite
binary installed (cargo install oxygengine-ignite
)Create Oxygen Engine project with oxygengine-ignite
:
bash
cd /path/to/parent/
oxygengine-ignite new <project-name>
Which will create default web game project using web-composite-game
preset.
Then you have to go to your project directory and run npm install
to install all nodejs dependencies.
You can create projects with different presets:
- desktop-headless-game - typical server-like project without graphics.
- hybrid-script-game - it's a web-composite-game
with JavaScript scripting module to make prototyping with Oxygengine faster and easier. Please note that JS scripting compared to pure Rust version is slower so it's not a great idea to use it in a production-ready game with lots of entities and logic, it should only help to prototype a game systems that will be later rewritten in Rust for best optimization.
using:
bash
cd /path/to/parent/
oxygengine-ignite new <project-name> -p desktop-headless-game
You can also tell it where to create project:
bash
oxygengine-ignite new <project-name> -d /path/to/parent/
Updating to new engine version:
- reinstall oxygengine-ignite
:
bash
cargo install oxygengine-ignite --forced
OXY_UPDATE_PRESETS=1 oxygengine-ignite --help
- update oxygengine
version either in Cargo.toml
or by calling: cargo update
bash
npm start
/dist
folder):
with debug symbols:
bash
npm run build
optimized release mode:
bash
OXY_RELEASE=1 npm run build
bash
cargo build
Current milestone progress: https://github.com/PsichiX/Oxygengine/projects/1