Run generative games on your own GPU.
Unlike traditional games, that run on a deterministic game engine, generative games use an interactive video model to generate every frame of the game in real-time, reacting to your button presses.
Currently, the models are dispersed across Github and hard to find. Even when you find one, it takes technical knowledge and time to run them yourself. So we're bringing them together for you to play.
World Arcade is an open-source platform that makes it easy to play them locally, or stream from a server.
-
Browse open-source game models
Collecting together all the available games made open-source by Diamond and other world creators!
-
Play Games
Jump into Yume Nikki, CS:GO, Minecraft, Atari Arcade Games or Mario Kart 64.
-
Change Parameters
Adjust settings to allow higher FPS on lower-end GPUs (at the expense of game stability/quality).
- An NVIDIA GPU (ideally >8GB VRAM)
- OS: Windows (via exe, see Windows Setup) or Linux (via Docker, see Linux Setup)
The Minecraft games are only supported on Linux; you can use WSL on Windows to play them.
- Download dweam-windows.zip from the latest release.
- Unzip the file using 7Zip.
- Double-click dweam.exe, wait for the games to install, and start playing!
Install and run Docker,
Install Docker compose.
Install NVIDIA Container Toolkit.
git clone ssh://[email protected]/dweam-team/world-arcade
cd world-arcade
docker compose up --build
Once it's running, visit localhost:4321.
By default, the backend and frontend will only bind to localhost
.
Use a reverse proxy (like caddy or nginx) to forward the following ports:
- 8080 TCP
- 4321 TCP
Expose the following ports for WebRTC:
- 3478 TCP/UDP
- 5349 TCP/UDP
- 50000-50010 UDP
Each set of games is implemented as a standalone python package that:
- Implements a
Game
class that subclassesdweam.Game
. - Provides a
dweam.toml
file with the game's metadata.
See diamond-yumenikki or diamond-csgo for an example.
Subclass dweam.Game
, and implement the step
method.
# my_game/dweam_game.py
from dweam import Game
import pygame
class MyGame(Game):
def step(self) -> pygame.Surface:
"""
A step of your game loop, that runs in its own thread.
Use `self.keys_pressed`, `self.mouse_pressed` and `self.mouse_motion` to generate the next frame,
and return it as a pygame surface.
"""
...
def on_key_down(self, key: int) -> None:
"""
Optionally, implement logic via key presses directly
Other methods like `on_key_up`, `on_mouse_down`, `on_mouse_up` and `on_mouse_motion` are also available.
"""
...
Add a dweam.toml
file with the game's metadata.
# my_game/dweam.toml
type = "Awesome Games"
entrypoint = "my_game.dweam_game:MyGame"
repo_link = "https://github.com/awesome-games/my-game"
[games.my_game]
title = "My Game"
tags = ["First Person"]
description = "A game made by me"
[games.my_game.buttons]
"⬆️ Forward" = "W"
"⬇️ Back" = "S"
"⬅️ Left" = "A"
"➡️ Right" = "D"
"🆙 Jump" = "Space"
For now we're hardcoding the game packages in the entrypoint.py
file – please submit a pull request to add your game, in the form of a GitHub repo URL or python package.
Soon we'll make this a local configuration file ^w^"
Love any contributions from the community!
Open a GitHub issue or join our Discord server to chat.
Leave a star if you'd like to see this project grow! ❤️ ⭐️