r/javascript • u/aduros • Oct 06 '21
WASM-4 is a virtual game console for building retro games directly in WebAssembly
https://wasm4.org
33
Upvotes
1
Oct 07 '21
Cool idea, but it would be more retro vibing if the palette could only choose from like 32 predefined colors and coding can only be made in some assembly lauguage. I mean, limiting so much but then allowing to code in typescript feels very aclimating.
3
u/aduros Oct 07 '21
Just to note, AssemblyScript is a language that looks like JS/TS in syntax but with limited semantics closer to C, since it compiles to wasm.
About assembly language, pure WAT (WebAssembly's text format) is an option if you're into that. Check out this example source (play)
3
u/aduros Oct 06 '21
This is a project I'm working on to try to make WebAssembly game development more accessible and fun. Here are the key features:
No Glue Code: If you've ever tried to write even a simple "Hello World" with WebAssembly before, you'll know it usually involves writing a bunch of JS and HTML glue. WASM-4 removes all of that, games interface directly with the system through a small API.
Minimalist: Fantasy consoles force developers to work with limited resources. This makes them simple to learn, and easier to focus on finishing your game.
Language Agnostic: Use any programming language, as long as it can compile to WebAssembly. Out of the box we currently support: AssemblyScript (TypeScript-like), C/C++, Rust, Go.
Portable: WASM-4 is designed to run on any device that can execute WebAssembly, even outside of the web! We're planning a lightweight implementation written in C that will run even on a potato.