Hacker News new | past | comments | ask | show | jobs | submit login
WASM-4: Build retro games using WebAssembly for a fantasy console (wasm4.org)
151 points by peutetre 43 days ago | hide | past | favorite | 40 comments



Pleasantly surprised to see https://wasm4.org/play/untangle on here, remake of my original "Planarity" Flash game from 2005.


TIC-80 also has WASM support but is a more capable console IMO. Here for example is a rust template: https://github.com/nesbox/TIC-80/tree/main/templates/rust


One cool thing WASM-4 has over TIC-80 is built-in networked multiplayer with rollback: https://wasm4.org/docs/guides/multiplayer


TIC-80 is indeed a generally more capable console.

The main reasons I'd personally pick WASM-4 over TIC-80 would be touchscreen controller support, more complete documentation, and better performance on resource constrained devices. (WASM-4 can run on the ESP32 and Nintendo DS, while TIC-80 struggles on the significantly more powerful 3DS.)


Can TIC-80 for Retroarch run WASM "ROMs" directly or do they have to be precompiled?


WASM-4 is a lot of fun! The programming interface is really simple and a great way to learn about the basics of WebAssmembly. No high level language necessary, just write simple programs in WAT format. We used WASM-4 at work as a very early test that our WebAssembly toolchain was working end to end, before we were able to run larger programs in web browsers.

https://spritely.institute/news/hoot-wireworld-live-in-brows...


I wonder if anyone is working on a fantasy console with PS3-level graphics. A lot of games on Steam today have retro aesthetics and aren’t very demanding. A game runtime that works on Linux, macOS, and Windows would solve portability and digital preservation.


PS3 graphics aren't that different from modern day graphics, just lower fidelity and the hardware was a bit quirky but other than that they didn't have any particular aesthetic; I don't think the PS2 had either. The PS1 did though, the weird texture shimmering that was reproduced in for example the Bloodborne demake [0] and subsequent Bloodborne Kart, which had to be rebranded to Nightmare Kart for copyright reasons. But that one's made in Unreal Engine 4, with a forum thread [1] saying the effect can be reproduced across multiple engines like UE4, Unity and Godot, using a shader.

[0] https://b0tster.itch.io/bbpsx

[1] https://itch.io/t/1999076/what-game-engine-did-you-use


The web is already a game runtime that works on Linux, macOS, Windows, Android, and iOS* with decent graphics. I've ported a couple of games. Here's Quake 3 including multiplayer https://thelongestyard.link/ and Cave Story https://thelongestyard.link/cave-story/. There are full-fledged web-native games too such as https://gooberdash.winterpixel.io/ (2D Fall Guys) and https://krunker.io/ or https://venge.io/ (multiplayer FPS). And of course one of the most popular recent games has a web version: https://poncle.itch.io/vampire-survivors

* Even more platforms: Chrome OS, Meta Quest, Tesla cars, Xbox, smart fridges, etc. The web is unmatched in platform support and more importantly allows you to completely bypass the software distribution monopolies on all of them. Ship freely without anyone's permission!


> PS3-level graphics

> retro aesthetics

You are really making me feel old.

That said PS1/PS2 style is pretty popular and a fantasy console in that area would be indeed great.

I just hope you mistyped because PS3 is mostly modern graphics for me. Most of the games still look good if you upscale the textures a bit.


I'm making a wasm runtime called Taca that has approximately low-end modern capabilities that can run in either web or a separate native player. https://github.com/contextfreeinfo/taca (I also made the intro video for WASM-4.)


That looks very cool! I wonder if someone will make a VR player for those cartridges.


[flagged]


It's a reference to Pico-8.

https://www.lexaloffle.com/pico-8.php


Sure, but Pico-8 is a better name than Lua-8.


... only using '4' colors.

Still a lousy name. Seems I had seen the project before, but the name didn't stick, unlike tic80, pico8, etc


Could be worse, I called mine the KWAK-8.


Kwak in dutch means either the sound of a duck or a "sploodge/splat". Both are funny tbh


Do I understand correctly that KWAK-8 is designed such that porting applications from the fantasy console to actual hardware (or vice versa) would be relatively easy? That's pretty cool.


I like that one


Yeah it's a bit like naming a python library "python"


Python-4


You mean python2 [0] ?

[0] https://pypi.org/project/python2/


This fantasy console sure looks a lot like a Game Boy...


Maybe like what the Game Boy would have been if it had had a framebuffer. It's a little bit sad, actually, that WASM-4, like the Pico-8, is a framebuffer console - there's less cool tricks you can do with raster interrupts and the like.


Were you thinking of changing the 4-color palette for every scanline, like the Atari 8-bits and the Amiga could do? Impose arbitrary limitations so you can find clever ways to circumvent them - sounds like fun!


You can actually do this in PICO-8 to display up to 32 colors at once.

https://www.lexaloffle.com/bbs/?tid=38565


The limitations were anything but arbitrary!

The Game Boy has less memory than would be required for a full frame buffer, so its “just in time rendering” of sprites and tiles is one way to support its full display resolution and still leave some space for game state in the RAM.


> The Game Boy has less memory than would be required for a full frame buffer

This isn't quite true—you need 160 * 144 pixels at 2 bits-per-pixel. This weighs in at 5760 bytes. There are many other reasons why a framebuffer wasn't ideal for the hardware of the time, though.


Ah, sorry, I think I mixed that up with the opposite practical limitation then – IIRC you can't actually display a fullscreen bitmap on the original GameBoy without some hacks, as the full screen fits 360 tiles, but there's a limit of 256.

But in any case a frame buffer would use up almost the entire available VRAM of 8 KB and would have probably also been more expensive since it would have to be dual-port RAM (I believe the Game Boy's VRAM isn't).


I thought it was clear that arbitrary here refers to any modern reimagining of said limitations, which obviously don’t have to be identical constraints either.


Might be a nice way to get into WASM development, but 4 colors sounds very limiting. Ok, I know the original Game Boy made do with only 4 "colors" (but that was on a black and white display where you probably couldn't have told the difference if there would have been more "shades of gray"), and the Game Boy Color showed these games using a palette of 4 colors, but actually even that device could show 56 colors at the same time!


It's a little bit more complicated than that. The system is limited to displaying 4 colors at once, but the palette can change at any time. Check out what Phantom Shift does with a dynamic two color palette.

https://wasm4.org/play/phantom-shift/


The idea of the 4 colors and 160x160 screen is, from my pov, to focus on the gameplay more than the graphics. A lot of people get stopped from attempting to make games because their art skills suck, this removes that element from being an issue.


> A lot of people get stopped from attempting to make games because their art skills suck

As a developer with no art skills myself, I can sympathize with that. But I think that is already taken care of by the low-res display - making pixel art is (in my experience) a lot easier than higher-resolution art. I don't think having 8, 16 or 32 colors instead of just 4 really makes an impact on the art skills required for a game...


The play date doesn’t even have shades of grey and has plenty of good games, arguably because of similar constraints


OTOH, the PlayDate is a hardware device, so using a monochrome LCD makes sense for cost saving and power consumption reasons. But, even for a hardware device, once you decide you want to have a color screen, in this day and age there is no real (technical) reason anymore to limit the number of colors.


> so using a monochrome LCD makes sense for cost saving and power consumption reasons

The Sharp Memory LCD used in the Playdate is more expensive than a similarly sized IPS LCD. Whilst power consumption was probably a consideration, the main justification was to impose a deliberate game design constraint IMHO.


I agree, I think it’s more of a novelty reason, just a constraint for the sake of encouraging creativity / not just being another place for the same things we already have.


4 colors is still 4x as much as the Playdate or games like Return of the Obra Dinn has (or twice if you consider 'off' a color).


Heh, citing the Obra Dinn is cheating a bit. Most people aren't going to do this: https://forums.tigsource.com/index.php?topic=40832.msg136374...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: