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/
Make sure that you have latest oxygengine-ignite
binary installed (cargo install oxygengine-ignite
) - this binary is a set of vital tools that will govern managing most of your project.
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.
You can create projects with different presets:
- desktop-headless-game - typical server-like project without graphics.
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/
oxygengine-ignite
:
bash
cargo install oxygengine-ignite --forced
OXY_UPDATE_PRESETS=1 oxygengine-ignite --help
oxygengine
version either in Cargo.toml
or by calling: cargo update
/static/assets
directory into new project /assets
directory, preferably using new way of assets directory structure (so you won't have to modify pipeline.json file a lot).bash
cargo install sccache
Cargo.toml
:
toml
[package.metadata]
# path to the sccache binary
sccache_bin = "sccache.exe"
# path to the sccache cache directory
sccache_dir = "D:\\sccache"
From now on you will have to wait for full long engine build only once, for any other new game project you create, it will perform first compilation in matter of minute, not 20.
bash
oxygengine-ignite live
additionally to allow it to start http server to serve your build files in the browser, run:
bash
oxygengine-ignite live -- -p 8080
files will be served from: http://localhost:8080.Build binaries in debug or release mode (binaries will be put in /bin
folder):
with debug symbols:
bash
oxygengine-ignite build
optimized release mode:
bash
oxygengine-ignite build -p release
bash
cargo build
/dist
folder):
bash
oxygengine-ignite package
this command will run release build, assets pipeline and bundle package.Current milestone progress: https://github.com/PsichiX/Oxygengine/projects/1