#audio #web #backend #oxygen #game #web-sys

oxygengine-audio-backend-web

Audio Web backend module for Oxygen Engine

35 releases (10 breaking)

new 0.14.2 Sep 24, 2020
0.13.2 Sep 19, 2020
0.12.2 Jul 23, 2020
0.7.1 Mar 5, 2020
0.5.0 Dec 31, 2019

#66 in Audio

Download history 48/week @ 2020-06-06 19/week @ 2020-06-13 12/week @ 2020-06-20 55/week @ 2020-06-27 37/week @ 2020-07-04 90/week @ 2020-07-11 96/week @ 2020-07-18 30/week @ 2020-07-25 6/week @ 2020-08-01 57/week @ 2020-08-08 61/week @ 2020-08-15 10/week @ 2020-08-22 35/week @ 2020-08-29 111/week @ 2020-09-05 84/week @ 2020-09-12 79/week @ 2020-09-19

245 downloads per month
Used in oxygengine

Custom license

125KB
3.5K SLoC

logo

Oxygengine GitHub CI crates-io version GitHub tag

The hottest HTML5 + WASM game engine for games written in Rust with web-sys.

Table of contents

  1. Understanding ECS
  2. Installation
  3. Teaser
  4. Project Setup
  5. Building for development and production
  6. Roadmap

Understanding ECS

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/

Installation

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.

Teaser

Visual Novel

Project Setup

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:

  • desktop-headless-game - typical server-like project without graphics.

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/

Updating to new engine version:

  • reinstall oxygengine-ignite:
    cargo install oxygengine-ignite --forced
    OXY_UPDATE_PRESETS=1 oxygengine-ignite --help
    
  • update oxygengine version either in Cargo.toml or by calling: cargo update
  • upgrading from versions before 0.12.0 requires to create new project with latest ignite tool, then copy by hand your source files to the new project sources, as well as put assets from old project /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).

Speeding up compilation for new projects (best use case for gamejams and quick feature prototypes):

  • install SCCACHE, a tool for caching and sharing prebuilt dependencies between multiple game projects (https://github.com/mozilla/sccache):
    cargo install sccache
    
  • add these lines to the 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.

Building for development and production

  • 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.

    To produce a debug mode package you have to run:

    oxygengine-ignite package -d
    

Roadmap

Current milestone progress: https://github.com/PsichiX/Oxygengine/projects/1

Dependencies

~14MB
~265K SLoC