Crates.io | oxygengine-script-web |
lib.rs | oxygengine-script-web |
version | 0.12.5 |
source | src |
created_at | 2020-01-15 22:53:55.354114 |
updated_at | 2020-09-13 06:38:20.993186 |
description | Web scripting module for Oxygen Engine |
homepage | https://github.com/PsichiX/oxygengine |
repository | https://github.com/PsichiX/oxygengine |
max_upload_size | |
id | 198892 |
size | 80,975 |
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
:
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:
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. NOTE: Because of engine not using NPM at all since version 0.12.0, this template is forced to use version 0.11.2 of the engine until new way of JavaScript scripting method will be developed.using:
cd /path/to/parent/
oxygengine-ignite new <project-name> -p desktop-headless-game
You can also tell it where to create project:
oxygengine-ignite new <project-name> -d /path/to/parent/
oxygengine-ignite
:
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).cargo install sccache
Cargo.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.
Launch live development with active code recompilation and assets baking in the background on change:
oxygengine-ignite live
additionally to allow it to start http server to serve your build files in the browser, run:
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:
oxygengine-ignite build
optimized release mode:
oxygengine-ignite build -p release
Build only the crate:
cargo build
Package application build with assets ready for distribution (package files will be put in /dist
folder):
oxygengine-ignite package
this command will run release build, assets pipeline and bundle package.
Current milestone progress: https://github.com/PsichiX/Oxygengine/projects/1