Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Build retro games using WebAssembly for a fantasy console.

License

NotificationsYou must be signed in to change notification settings

aduros/wasm4

Repository files navigation


WASM-4 Logo
WASM-4

Build retro games using WebAssembly for a fantasy console

About

WASM-4 is a low-level fantasy game console for building small games with WebAssembly. Gamecartridges (ROMs) are small, self-contained.wasm files that can be built with any programminglanguage that compiles to WebAssembly.

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 ofJS and HTML glue. WASM-4 removes all of that, games interface directly withthe 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. Outof the box we currently support: AssemblyScript, C/C++, D, Go, Nelua, Nim, Odin, Rust, WAT, andZig.

  • Portable: WASM-4 is designed to run on any device that can execute WebAssembly, even outsideof the web! It includes a lightweight runtime written in C that runs evenlow-powered microcontrollersandobsolete hardware.

  • Netplay: Instant online multiplayer, featuring rollback netcode. All games that support localmultiplayer automatically support netplay. WASM-4 handles syncing controller inputs over theInternet.

🚀 60 Second Quickstart

# Install the w4 commandnpm install -g wasm4# Create a projectw4 new --assemblyscript hello-world# Setup toolchaincd hello-worldnpm install# Build and run your game!npm run buildw4 run build/cart.wasm

For more info and guides, check thefull documentation.

🎮 Hardware Specs

  • Display: 160x160 pixels, 4 customizable colors, updated at 60 Hz.
  • Memory: 64 KB linear RAM, memory-mapped I/O, save states.
  • Cartridge Size Limit: 64 KB.
  • Input: Keyboard, mouse, touchscreen, up to 4 gamepads.
  • Audio: 2 pulse wave channels, 1 triangle wave channel, 1 noise channel.
  • Disk Storage: 1024 bytes.

🙏 Contributing

Contributions are welcome! Here are just a few ways to help:

  • Build a game or experiment, we'll feature it on wasm4.org!
  • Improve our documentation or write a tutorial.
  • Submit a bug report or feature request on Github.
  • Answer questions on the discussions forum.
  • Implement support for a new tool or language.
  • Give the project a star on Github for visibility.

[8]ページ先頭

©2009-2025 Movatter.jp