Voltar ao ranking

aduros/wasm4

TypeScriptwasm4.org

Build retro games using WebAssembly for a fantasy console.

webassemblyfantasy-consolefantasy-computerretrogaming2d-game-enginegamedevgame-developmentwasmassemblyscripttypescriptrustgo
Crescimento de estrelas
Estrelas
1.5k
Forks
202
Crescimento semanal
Issues
97
5001k1.5k
ago. de 2021mar. de 2023nov. de 2024jul. de 2026
Artefatosnpmnpm install wasm4
README


WASM-4 Logo
WASM-4

Build retro games using WebAssembly for a fantasy console

WebsiteShowcaseDocsDiscussions

About

WASM-4 is a low-level fantasy game console for building small games with WebAssembly. Game cartridges (ROMs) are small, self-contained .wasm files that can be built with any programming language 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 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++, D, Go, Nelua, Nim, Odin, Rust, WAT, and Zig.

  • Portable: WASM-4 is designed to run on any device that can execute WebAssembly, even outside of the web! It includes a lightweight runtime written in C that runs even low-powered microcontrollers and obsolete hardware.

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

🚀 60 Second Quickstart

# Install the w4 command
npm install -g wasm4

# Create a project
w4 new --assemblyscript hello-world

# Setup toolchain
cd hello-world
npm install

# Build and run your game!
npm run build
w4 run build/cart.wasm

For more info and guides, check the full 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.
Repositórios relacionados
JetBrains/kotlin

The Kotlin Programming Language.

Kotlinkotlinprogramming-language
kotlinlang.org
53.2k6.4k
gkd-kit/gkd

基于无障碍,高级选择器,订阅规则的自定义屏幕点击安卓应用 | An Android APP with custom screen tapping based on Accessibility, Advanced Selectors, and Subscription Rules

KotlinGNU General Public License v3.0androidkotlin
gkd.li
40.3k1.9k
naptha/tesseract.js

Pure Javascript OCR for more than 100 Languages 📖🎉🖥

JavaScriptnpmApache License 2.0tesseractwebassembly
tesseract.projectnaptha.com
38.5k2.4k
raysan5/raylib

A simple and easy-to-use library to enjoy videogames programming

Czlib Licenseraylibc
raylib.com
34k3.2k
emscripten-core/emscripten

Emscripten: An LLVM-to-WebAssembly Compiler

C++Otherhacktoberfestemscripten
27.5k3.5k
tursodatabase/turso

A SQL database in Rust: SQLite-compatible, now also speaking Postgres (experimental). The LLVM of databases.

Rustcrates.ioMIT Licensedatabaseembedded-database
23.3k1.2k
slint-ui/slint

Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.

Rustcrates.ioOtherrustembedded-devices
slint.dev
23.3k933
leptos-rs/leptos

Build fast web applications with Rust.

Rustcrates.ioMIT Licensedomfine-grained
leptos.dev
21.1k878
wasmerio/wasmer

🚀 Fast, secure, lightweight containers based on WebAssembly

Rustcrates.ioMIT Licensewebassemblywasm
wasmer.io
20.9k988
JetBrains/compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.

KotlinApache License 2.0kotlinui
jetbrains.com/lp/compose-multiplatform
19.2k1.4k
bytecodealliance/wasmtime

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Rustcrates.ioApache License 2.0wasmjit
wasmtime.dev
18.4k1.8k
AssemblyScript/assemblyscript

A TypeScript-like language for WebAssembly.

WebAssemblyApache License 2.0typescriptwebassembly
assemblyscript.org
18k692