brandondyer64 / bevy_wasm Goto Github PK
View Code? Open in Web Editor NEWMod Bevy games with WASM
License: Apache License 2.0
Mod Bevy games with WASM
License: Apache License 2.0
Currently, ffi::get_time_since_startup()
returns the time since the MOD loaded, not the time since the GAME started.
This makes it virtually impossible to coordinate mods.
Shared resources should use TypeUUID
for discrimination instead of a string representation.
Allow mods to request the existence of other mods.
This may be out of the scope of bevy_wasm
as different games will have different needs
It might be a good idea to add support for using a trace!
macro inside of mods.
The bevy_wasm
code should be dual licensed as either MIT and Apache-2.0 (at your option). This is to be consistent with the licensing of Bevy.
Currently, loading .wasm
files is left to the user. All of the example files show using include_bytes!()
.
Ideally, these files should be treated the same as any other Bevy asset.
Just-in-time (JIT) compiling is not available or not allowed on some platforms. This can be a major blocker for many games.
JIT, through cranelift
, should either be optional or disabled entirely.
Allow loading mods from a url
Right now, all of the necessary bevy crates are imported individually.
bevy_app = "0.9"
bevy_ecs = "0.9"
bevy_log = "0.9"
Instead, this should be done through Bevy's features.
features = ["app", "ecs", "log"]
It should be possible to use bevy_wasm
in a game running in a browser.
Given that bevy_wasm_sys
defines its own ffi, wasm-bindgen
might not be necessary.
Currently, communication is handled through Bevy's EventReader
and EventWriter
. What I'd like is some kind of ModConnection
struct instead that maps directly to the ffi calls rather than overly abstracting them.
Current:
fn system(in: EventReader<In>, out: EventWriter<Out>)
Proposed:
fn system(conn: ModConnection<In, Out>)
Perhaps a standardized Protocol
type could be established that would hold these more obtuse types.
i.e.
fn system(conn: ModConnection<MyProtocol>)
Instead of using a custom Version
struct, use the one in semver
Currently, mods made using target wasm32-unknown-unknown
cannot call println!
. We could use wasm32-wasi
instead, but this drastically increases binary size.
Perhaps some kind of #![no_std]
support could be added, or a trick for making wasi
binaries smaller.
Do some more research on the differences between Wasmer and Wasmtime. They both have pros and cons.
With the intention of bevy_wasm
being used on low-end hardware, determine whether or not it should use Wasmer instead of Wasmtime.
Alternatively, give the developer the choice through feature flags.
Currently, mods are ticked in series. It should be relatively trivial to tick them in parallel.
See Query::par_for_each
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.