wasm
doom-sokol
wasm | doom-sokol | |
---|---|---|
2 | 4 | |
51 | 46 | |
- | - | |
10.0 | 5.0 | |
almost 2 years ago | 5 days ago | |
Pascal | C | |
Apache License 2.0 | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wasm
-
WASM Instructions
Related:
A fast Pascal (Delphi) WebAssembly interpreter:
https://github.com/marat1961/wasm
WASM-4:
https://github.com/aduros/wasm4
Curated list of awesome things regarding WebAssembly (wasm) ecosystem:
https://github.com/mbasso/awesome-wasm
Also, it would be nice if there was a WASM (soft) CPU for QEMU, which (if it existed!) would go here:
https://github.com/qemu/qemu/tree/master/target
- Oz.Wasm – A fast Pascal (Delphi) WebAssembly interpreter
doom-sokol
-
Let's compile like it's 1992
Doom is actually quite easy to build because the source code is already structured to keep the platform-specific parts isolated (Doom was developed on NeXT workstations and then 'downported' to DOS.
For instance here's my WASM port of the Doom shareware version. This is a fork of doomgeneric, which itself is a fork of fbDoom - but midway through I noticed that all the abstractions added by fbDoom and doomgeneric are actually not very helpful for a WASM port that should run in browsers, and that I probably would have been better off forking the original source instead):
Github repo: https://github.com/floooh/doom-sokol
Hosted version: https://floooh.github.io/doom-sokol/
-
WASM Instructions
Here are a couple of real-world examples, these are all C/C++ code bases which run across Linux, macOS, Windows, iOS, Android and in browsers without porting:
Home computer emulators: https://floooh.github.io/tiny8bit/
CPU simulators for Z80 and 6502:
https://floooh.github.io/visualz80remix/
https://floooh.github.io/visual6502remix/
The shareware version of Doom:
https://floooh.github.io/doom-sokol/
Samples for the cross-platform libraries this stuff is built on top: https://floooh.github.io/sokol-html5/
WASM (and asm.js before it) turn the web into "just another platform" for cross-platform code bases written in any language that can compile to WASM, and that's pretty great.
-
Doomgeneric: Make Porting Doom Easier
I started my WASM DOOM port (https://floooh.github.io/doom-sokol/) from doomgeneric which was helpful at first, but since I had to 'slice' the various modal loops in Doom in order to make it work in a frame-callback app model it wasn't all that helpful in the end unfortunately.
My porting notes for anyone interested: https://github.com/floooh/doom-sokol#porting-notes
What are some alternatives?
wasm4 - Build retro games using WebAssembly for a fantasy console.
doomgeneric - Easily portable doom
jq-wasi - Command-line JSON processor compiled using wasi-sdk