Skip to content
magmacrunchmedia edited this page Aug 24, 2026 · 4 revisions

texastoast

A small tkinter-based 2D RPG engine for Python, with optional I2C support for Raspberry Pi controller hardware.

pip install texastoast

texastoast gives you systems — a loop, a renderer, tile maps with collision, a camera, input, and UI widgets — and leaves the wiring to you. There is no base Game class to subclass and no scene graph to learn: you write an update(dt) and a render(), and call the pieces you need.

Start here

New in 0.5.0

Game structure: the game buildable without flag soup.

  • Scenes — pushing a pause scene freezes the world by construction; paused globals stop existing. No base class.
  • Entity groups — the update loop, tags, and painter's-order iteration; safe add/remove mid-pass.
  • Audio — a Mixer that degrades from pygame-ce down to silence, never crashing a frame. WAV guaranteed on every tier.
  • Player seats — join-by-press, hotplug, and reconnection that never reshuffles P1/P2.
  • Theming — one Theme object instead of scattered color literals; defaults pinned to the old values.

One break: Camera.follow() now requires dt (deprecated since 0.4.0). See the changelog.

The hardware dev kit (0.4.0)

You do not need a Magma Hub to build for one:

texastoast-bench --sim

A simulator running the real I2C stack, a test bench with live latency and error rates, background polling, and recording/replay for firmware regression tests.

Reference

Page Covers
Core Concepts Game, GameLoop, Config, delta time
Scenes and Game Structure SceneStack, EntityGroup, modality without flags
Tile Maps and Collision TileMap, Entity, AABB, the map JSON format
Rendering and Camera CanvasRenderer, Camera, SpriteSheet, the backend protocols
Input KeyboardInput, InputState, CompositeInput, record and replay
Players and Multi-Controller PlayerManager, seats, join, hotplug
UI Components DialogueBox, Menu, HUD, Theme
Audio Mixer, the backend tiers, testing with a fake
Magma Hub and I2C I2CBus, MagmaHub, the wire protocol, mock mode
Hardware Dev Kit Simulator, test bench, polling, recording
Tile Editor The map editor and what it writes

Project

The API reference in the README is the quick lookup; these pages are the explanations behind it.

Clone this wiki locally