[HN Gopher] WASM-4: Build retro games using WebAssembly for a fa...
       ___________________________________________________________________
        
       WASM-4: Build retro games using WebAssembly for a fantasy console
        
       Author : peutetre
       Score  : 144 points
       Date   : 2024-11-30 00:07 UTC (5 days ago)
        
 (HTM) web link (wasm4.org)
 (TXT) w3m dump (wasm4.org)
        
       | two_handfuls wrote:
       | That looks very cool! I wonder if someone will make a VR player
       | for those cartridges.
        
       | ayaros wrote:
       | This fantasy console sure looks a lot like a Game Boy...
        
         | indigo945 wrote:
         | 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.
        
           | rob74 wrote:
           | 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!
        
             | lxgr wrote:
             | 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.
        
               | epcoa wrote:
               | 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.
        
               | PittleyDunkin wrote:
               | > 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.
        
               | lxgr wrote:
               | 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).
        
             | jamesgeck0 wrote:
             | You can actually do this in PICO-8 to display up to 32
             | colors at once.
             | 
             | https://www.lexaloffle.com/bbs/?tid=38565
        
       | rob74 wrote:
       | 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!
        
         | rererereferred wrote:
         | 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.
        
           | lucasban wrote:
           | The play date doesn't even have shades of grey and has plenty
           | of good games, arguably because of similar constraints
        
             | rob74 wrote:
             | 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.
        
               | lucasban wrote:
               | 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.
        
           | rob74 wrote:
           | > _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...
        
         | Cthulhu_ wrote:
         | 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).
        
           | jerf wrote:
           | Heh, citing the Obra Dinn is cheating a bit. Most people
           | aren't going to do this: https://forums.tigsource.com/index.p
           | hp?topic=40832.msg136374...
        
       | meisterglanz wrote:
       | 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
        
         | panic wrote:
         | One cool thing WASM-4 has over TIC-80 is built-in networked
         | multiplayer with rollback:
         | https://wasm4.org/docs/guides/multiplayer
        
         | lxgr wrote:
         | Can TIC-80 for Retroarch run WASM "ROMs" directly or do they
         | have to be precompiled?
        
         | jamesgeck0 wrote:
         | 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.)
        
       | davexunit wrote:
       | 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...
        
       | tantalor wrote:
       | Pleasantly surprised to see https://wasm4.org/play/untangle on
       | here, remake of my original "Planarity" Flash game from 2005.
        
       | anshargal wrote:
       | 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.
        
         | cardanome wrote:
         | > 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.
        
         | Cthulhu_ wrote:
         | 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
        
         | modeless wrote:
         | 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!
        
       ___________________________________________________________________
       (page generated 2024-12-05 23:02 UTC)