Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asm.js/wasm support #71

Open
icefoxen opened this issue May 9, 2017 · 8 comments

Comments

@icefoxen
Copy link
Contributor

commented May 9, 2017

Should happen eventually!

@icefoxen

This comment has been minimized.

Copy link
Contributor Author

commented May 18, 2017

SDL windowing and events isn't quite a drop-in solution but does appear to work.

Audio is going to probably require adding a backend to cpal, see RustAudio/cpal#92

gfx-rs: kvark says that people have made gfx-rs work with WebGL but it's not well formalized.

@icefoxen

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2017

Blockers:

  • Resources and files
  • Audio
  • SDL GL context attributes: emscripten-core/emscripten#4425
  • gfx-rs support: When I try to run a hacked-up test program I get tons of the following errors: bad name in getProcAddress: glWhateverThing

@icefoxen icefoxen added *HARD* and removed *GOOD FIRST ISSUE* labels Jul 31, 2017

@kvark

This comment has been minimized.

Copy link

commented Jan 22, 2018

@icefoxen gfx-0.17 runs on WebGL, but a few tweaks are required in the environment. See (from gfx-rs/gfx#1681):

In Emscripten configuration, set USE_WEBGL2=1. I did it by just modifying "emscripten/src/settings.js" directly (from where it's installed).

@ozkriff ozkriff referenced this issue May 29, 2018

Closed

WASM #178

@icefoxen icefoxen added this to the 0.6 milestone Jul 3, 2018

@beatgammit

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2018

Since ggez is using winit now, the SDL bit is irrelevant, right? Aside from that, is the list above accurate?

@icefoxen

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2018

Yeah, but winit support for wasm32-unknown is still experimental last I checked. And the stable version of ggez still uses SDL2, so.

@icefoxen

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2019

Currently, here are the crates that need to support wasm:

  • slice_deque: gnzlbg/slice_deque#60 (though minimp3, which is easy to get rid of by disabling the mp3 feature in `rayon)
  • bzip2, used by zip, again easy to feature out
  • shared_library: used by glutin and by osmesa-sys which is used by glutin
  • winit: rust-windowing/winit#395
  • cpal via rodio builds but won't actually do anything: RustAudio/cpal#212
@kvark

This comment has been minimized.

Copy link

commented Feb 1, 2019

Worth noting this project that has a dedicated WebGL backend on GGEZ: http://github.com/not-fl3/good-web-game

@ozkriff

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2019

Note that good-web-game is not really GGEZ's backend, but a separate web-targeted engine with a similar API that @not-fl3 uses for his prototypes.

Zemeroth uses good-web-game for its web version as a quick-n-dirty immediate solution until a proper WASM support arrives to GGEZ (there're no plans of making good-web-game some kind of official GGEZ backend).

The currently implemented subset of GGEZ API is quite limited and while it may be used for something else that Zemeroth, it will probably require a lot of work to do (contributions are welcome ;) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.