doom-sokol
wasm4
doom-sokol | wasm4 | |
---|---|---|
4 | 10 | |
46 | 1,072 | |
- | - | |
5.0 | 8.5 | |
8 days ago | 17 days ago | |
C | TypeScript | |
GNU General Public License v3.0 only | ISC License |
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.
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
wasm4
-
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
- Build retro games using WebAssembly for a fantasy console
-
Zig & Emscripten?
WASM4 seems to be a fantasy console with good docs that can run zig code in the browser, using the wasm target: https://github.com/aduros/wasm4/blob/main/cli/assets/templates/zig/build.zig
- WASM-4 Fantasy Console 2.0 tagged, with new languages Nim, Odin, & Zig
-
WASM-4 is a virtual game console for building retro games directly in WebAssembly
About assembly language, pure WAT (WebAssembly's text format) is an option if you're into that. Check out this example source (play)
Hi, could you please file a bug report? https://github.com/aduros/wasm4/issues
Posting here because there's a Rust template but no actual Rust games yet. Could be fun to see one.
-
WASM-4 is a virtual game console for building retro games in Rust and other WebAssembly languages
By the way, the memory corruption issue was also recently reported in Go (which uses similar linker flags to Rust) https://github.com/aduros/wasm4/issues/33
What are some alternatives?
doomgeneric - Easily portable doom
quadplay - The quadplay✜ fantasy console
wasmtime-go - Go WebAssembly runtime powered by Wasmtime
javascriptmusic - A.K.A. WebAssembly Music. Live coding music and synthesis in Javascript / AssemblyScript (WebAssembly)
PixelVision8 - Pixel Vision 8's core philosophy is to teach retro game development with streamlined workflows. PV8 is also a platform that standardizes 8-bit fantasy console limitations built on top of the open-source C# game engine based on MonoGame.
BootstrapBlazor - A set of enterprise-class UI components based on Bootstrap and Blazor
Octo - A Chip8 IDE
pdx-tools - View maps, graphs, and tables of your save and compete in a casual, evergreen leaderboard of EU4 achievement speed runs. Upload and share your save with the world.
loda-rust - Web editor for the LODA language. Also includes my experiments with Abstraction and Reasoning Corpus ARC.
textyle - Web tilemap editor for 2D games built using React JS, WebGL and Rust (WASM).
fantasy - A curated list of available fantasy consoles/computers.
asdom - Use DOM APIs in AssemblyScript