Skip to content

Pedre Documentation

Welcome to the Pedre documentation! Pedre is a Python RPG framework built on Arcade with seamless Tiled map editor integration.

What is Pedre?

Pedre provides everything you need to build Zelda-like RPG games with:

  • Tiled Map Integration - Load .tmx maps with automatic layer detection
  • NPC System - Animated NPCs with dialog trees and pathfinding
  • Dialog System - Multi-page conversations with character names
  • Event-Driven Scripting - JSON-based cutscenes and interactive sequences
  • Inventory Management - Item collection and categorization
  • Portal System - Map transitions with conditional triggers
  • Save/Load System - Automatic game state persistence
  • Audio Management - Background music and sound effects
  • Camera System - Smooth camera following with optional bounds
  • Particle Effects - Visual feedback system for interactions

Installation

pip install pedre

Or with uv:

uv add pedre

Quick Start

from pedre import run_game

if __name__ == "__main__":
    run_game()

Configure your game settings with settings.py in your project root:

SCREEN_WIDTH=1280
SCREEN_HEIGHT=720
WINDOW_TITLE="My RPG"
INITIAL_MAP="my_map.tmx"

Framework Architecture

The framework uses SystemLoader to initialize systems and GameContext to coordinate them:

from pedre.systems.loader import SystemLoader

# Loader handles initialization and dependency injection
loader = SystemLoader()
loader.setup_all(context)

# Systems access each other via context
def update(self, delta_time):
    audio = self.context.get_system("audio")

Documentation Overview

  • Getting Started


    Build your first RPG game with step-by-step tutorials

    Get started

  • API Reference


    Framework architecture and Python API reference

    API docs

  • Systems


    Detailed documentation for all manager classes

    Explore systems

  • Scripting


    Create event-driven cutscenes and interactive sequences

    Write scripts

  • Tiled Integration


    Learn how to create maps in Tiled for your game

    Use Tiled

  • Configuration


    Configure framework settings and customize behavior

    Configure

  • Extending Pedre


    Add custom actions, events, conditions, and systems

    Extend

Resources

Credits

Built with: