explaingit

tonystratum/pd-rs

Analysis updated 2026-05-18

1RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A Rust rewrite of the roguelike game Pixel Dungeon, built as a deterministic simulation with a separate graphics layer so runs are reproducible.

Mindmap

mindmap
  root((pd-rs))
    What it does
      Rust port of Pixel Dungeon
      Deterministic seeded runs
      Playable start to finish
    Tech stack
      Rust
      macroquad
      WebAssembly
    Use cases
      Play the roguelike
      Reproducible testing
      RL environment base
    Audience
      Rust developers
      Roguelike fans

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Play a fully winnable Rust port of Pixel Dungeon on desktop or in a browser

USE CASE 2

Reproduce the exact same dungeon run using a fixed random seed for testing

USE CASE 3

Study how a game separates pure simulation logic from a rendering frontend

USE CASE 4

Extend the project as a base for a reinforcement learning environment

What is it built with?

RustmacroquadWebAssembly

How does it compare?

tonystratum/pd-rsabc3dz/mixxxabyo-software/ferro-stash
Stars111
LanguageRustRustRust
Setup difficultymoderatemoderatemoderate
Complexity3/52/54/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a recent stable Rust toolchain, WebAssembly build needs the wasm32 target added separately.

In plain English

pd-rs is a rewrite of Pixel Dungeon, a classic roguelike dungeon game, done in the Rust programming language. The goal is to keep the same rules, formulas, and content as the original Java version while running the simulation on its own predictable random number generator. This means that if you use the same seed, you get the exact same run every time, which makes the game useful for automated testing, replays, and possibly training AI to play it in the future. The whole game is playable from start to finish, all five chapters, down through the dungeon to the final boss and the Amulet of Yendor. It is organized into three separate pieces of code: a core that holds all the game rules and never touches graphics or the screen, a rendering layer built with a graphics library called macroquad that draws what is happening and turns your keyboard, mouse, or touch input into game actions, and a small program that opens the window and runs everything together. This separation is meant to keep the actual game logic fast, memory efficient, and safe to copy or save at any point. You can play it on your own computer using Rust's cargo tool, or build it to run in a web browser using WebAssembly. Controls include arrow keys or WASD to move, clicking to travel or attack, number keys to use inventory items, and menu keys for things like the character sheet and pause menu. The readme is candid about its current state: the game is complete and can be won, but there are two known bugs around scroll targeting and tunnel corridor shapes, and a longer list of planned polish like animations, zooming, and a couple of missing items compared to the original game. The project uses the same GPLv3 license as the original Pixel Dungeon since it reuses its art and sound assets.

Copy-paste prompts

Prompt 1
Explain how the seeded RNG in pd-rs keeps runs deterministic
Prompt 2
Show me how to build and run pd-rs for WebAssembly in a browser
Prompt 3
Walk me through the three-crate structure of pd-core, pd-render, and pd-app
Prompt 4
What known bugs exist in pd-rs and how would I fix the scroll target picker

Frequently asked questions

What is pd-rs?

A Rust rewrite of the roguelike game Pixel Dungeon, built as a deterministic simulation with a separate graphics layer so runs are reproducible.

What language is pd-rs written in?

Mainly Rust. The stack also includes Rust, macroquad, WebAssembly.

How hard is pd-rs to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pd-rs for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.