How trashboxbobylev/experienced-pixel-dungeon-redone works
Purpose and module layout
Experienced Pixel Dungeon (Redone) is a Java roguelike/sandbox derived from Shattered Pixel Dungeon. Gradle composes shared game code in core, custom rendering/game framework code in SPD-classes, platform launchers in android, desktop, and ios, plus swappable news/update service implementations in services.
Startup and platform boundary
Platform-specific launchers initialize the shared game and provide platform services: android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidLauncher.java, desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java, and ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java. The core application root is core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java; persistent run/session coordination is centered on core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java.
Game loop, scenes, and presentation
The game is scene-driven atop the Noosa rendering framework. SPD-classes/src/main/java/com/watabou/noosa/Game.java manages the framework lifecycle; SPD-classes/src/main/java/com/watabou/noosa/Scene.java supplies scene composition. Core scenes transition among title, run, loading, and game UI, notably core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java, and core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java. Input arrives through SPD-classes/src/main/java/com/watabou/input/InputHandler.java; scenes convert it into game actions and visuals.
Turn simulation and game state
Turn-based control flows through the actor hierarchy: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java schedules actions, while core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java provides combat-capable characters. core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java represents the player; core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java is the AI-enemy base. Buffs and environmental blobs extend the simulation independently, e.g. actors/buffs/Buff.java and actors/blobs/Blob.java.
Dungeon generation and traversal
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java is the tile-grid world model, with themed and special subclasses such as levels/RegularLevel.java and levels/ArenaLevel.java. Procedural generation is staged through builders, painters, and room types: levels/builders/RegularBuilder.java, levels/painters/RegularPainter.java, and levels/rooms/Room.java. Generated terrain, transitions, traps, mobs, and loot become the state consumed by actors, pathing, visibility, and GameScene.
Content and rules extensions
Items are polymorphic gameplay actions rooted at core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java, generated through items/Generator.java, and held by actors/hero/Belongings.java. Weapons, potions, spells, artifacts, and custom additions encode their effects directly in their type hierarchies. Tactical geometry and visibility are shared rule boundaries in core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java and mechanics/ShadowCaster.java.
Rendering, assets, persistence, and services
Core maps state to tilemaps, sprites, UI controls, sound, and localized text; major boundaries include core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTilemap.java, sprites/CharSprite.java, and ui/Toolbar.java. GPU/OpenGL wrappers and texture caching reside in SPD-classes/src/main/java/com/watabou/glwrap/Program.java and gltextures/TextureCache.java. Assets—including messages, sprites, music, and sounds—ship under core/src/main/assets. Save-oriented serialization is supported by SPD-classes/src/main/java/com/watabou/utils/Bundle.java; game progress/rankings are managed by core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java and Rankings.java. Optional update/news abstractions are services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java and services/news/NewsService.java, with a GitHub update implementation under services/updates/githubUpdates.
Main entry points: ShatteredPixelDungeon.java Game Application · GameScene.java Core Scenes · Level.java Level World · DungeonTilemap.java Game Presentation
Components 22
Platform Launchers
Native entry points supply platform services.
- Android Launcher
android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidLauncher.java - Desktop Launcher
desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java - iOS Launcher
ios/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ios/IOSLauncher.java
Framework
Noosa lifecycle, input, and GPU rendering.
- Noosa Game
SPD-classes/src/main/java/com/watabou/noosa/Game.java - Noosa Scene
SPD-classes/src/main/java/com/watabou/noosa/Scene.java - Input Handler
SPD-classes/src/main/java/com/watabou/input/InputHandler.java - GPU & Textures
SPD-classes/src/main/java/com/watabou/glwrap/Program.java - Bundle Serialization
SPD-classes/src/main/java/com/watabou/utils/Bundle.java
Core Game
Shared scenes, simulation, world, content, and presentation.
- Game Application
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java - Core Scenes · Title, interlevel, and in-run scenes drive game flow.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java - Dungeon State
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java - Actor Scheduler · Schedules heroes, mobs, buffs, and blobs.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java - Characters · Hero and mob hierarchies resolve combat actions.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java - Level World · Regular and arena levels hold traversable dungeon state.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java - Level Generation · Builders, painters, and rooms construct levels.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/builders/RegularBuilder.java - Items & Inventory · Items are generated and held in hero belongings.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java - Tactical Mechanics · Ballistics and shadow casting provide shared geometry rules.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java - Game Presentation · Maps state into dungeon tiles, character sprites, and controls.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTilemap.java - Game Assets · Messages, sprites, music, and sounds.
core/src/main/assets - Progress & Rankings · Tracks serialized runs, progress, and rankings.
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java
Optional Services
Swappable news and update integrations.
- Update Service · GitHub-backed implementation can be selected.
services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java - News Service
services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/NewsService.java
Connections 22
- Android Launcher → Game Application: initializes
- Desktop Launcher → Game Application: initializes
- iOS Launcher → Game Application: initializes
- Game Application → Noosa Game: runs on
- Noosa Game → Noosa Scene: manages
- Input Handler → Core Scenes: actions
- Core Scenes → Dungeon State: coordinates
- Core Scenes → Actor Scheduler: advances turns
- Core Scenes → Game Presentation: renders state
- Dungeon State → Level World: holds current level
- Dungeon State → Progress & Rankings: loads and saves
- Level Generation → Level World: constructs
- Actor Scheduler → Characters: schedules
- Characters → Items & Inventory: uses
- Characters → Tactical Mechanics: uses
- Level World → Tactical Mechanics: supplies terrain
- Level World → Game Presentation: maps to tiles
- Game Presentation → GPU & Textures: draws through
- Game Presentation → Game Assets: loads
- Progress & Rankings → Bundle Serialization: serializes with
- Game Application → Update Service: uses optionally
- Game Application → News Service: uses optionally