Project Structure

Repository Organization

The main repository contains several key directories:

textandors-trail/
├── AndorsTrail/           # Main game source code
│   ├── app/               # Android application module
│   ├── src/               # Java source files
│   └── res/               # Android resources
│       ├── drawable/      # Graphics and tilesets
│       ├── raw/           # Script files (.JSON)
│       ├── values/        # Configuration files
│       └── xml/           # Map files (.tmx)
├── AndorsTrailEdit/       # Legacy content editor (deprecated)
└── travis/                # CI/CD scripts

Key Directories

/AndorsTrail/res/

  • drawable/: Contains all game graphics, tilesets, and sprites

  • xml/: TMX map files created with Tiled

  • raw/: Script files (.ats format) for game logic

  • values/: Configuration arrays and resource definitions

  • layout/: Android UI layout files

Source Code Structure

  • Main Activity: Game entry point and Android lifecycle management

  • Game Engine: Core game logic, turn-based combat, map rendering

  • Content Loaders: JSON and TMX file parsers

  • UI Components: Inventory, dialogue, combat interfaces

Game Data Formats

JSON Structure

Andor's Trail uses JSON files for most game content, stored in the game's resource files.

Common JSON Fields

Items JSON Format

NPCs/Monsters JSON Format

Quest JSON Format

TMX Map Format

Maps use the Tiled TMX format with specific layer conventions:

Required Layers

  • Ground: Base terrain tiles

  • Objects: Interactive elements, decorations

  • Above: Elements that render above the player

  • Walkable: Collision detection (filled tiles are non-walkable)

Object Layers

  • Spawn Areas: Monster and NPC placement

  • Map Changes: Transitions between maps

  • Signs: Readable text objects

  • Key Areas: Special interaction zones

Last updated