News for hackers. Stuff that matters.
Re:Show HN: WASM-4 is a virtual game console with a WebAssem... by aduros on Friday October 08, 2021 @08:42AM (#28798543)
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, 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.

Re:Show HN: WASM-4 is a virtual game console with a WebAssem... by nkssy on Saturday October 09, 2021 @03:15AM (#28807731)
I like it but still want multiplayer. Any ideas around abstractions to support that?

I'd fully expect to need a websocket server and interconnect etc. eg on physical hardware this might be a serial port.

Does the gamepad support also allow real gamepads or would this be injected directly into the memory map io locations?

Re:Show HN: WASM-4 is a virtual game console with a WebAssem... by aduros on Monday October 11, 2021 @03:59PM (#28832361)
Physical gamepads are supported by memory mapping, the game itself doesn't know if the player is using a keyboard, touchscreen, or real gamepad.

I think if multiplayer will ever be supported, it should be abstracted in the same way. We might create a runtime for libretro, which could enable adhoc netplay "for free".