How shadowss/travianz works
TravianZ is a PHP browser strategy game. Players enter through the public/game pages, use authenticated gameplay pages to manage villages and take part in combat and alliances, and see outcomes through game views; scheduled automation advances world state. The repository also documents hero trading/adventures, rankings, maps, statistics, and extensive administration. The graph preserves these product branches, but several are represented at directory level because their implementation was not excerpted. Solid edges cite visible imports or explicit README claims; dashed edges mark undocumented wiring.
Main entry points: Database.php Database access · Automation.php World automation · index.php Game entry · Session.php Player session
Components 26
Entry and access
- Game entry
index.php - Player session
GameEngine/Session.php - Request security
Security/Security.class.php - Game views
Templates/index.php
Game mechanics
- Village management
GameEngine/Village.php - Building system
GameEngine/Building.php - Units and training
GameEngine/Units.php - Battle resolution
GameEngine/Battle.php - Artifacts
GameEngine/Artifacts.php - Hero features
GameEngine/HeroItems.php - Hero adventures
GameEngine/HeroAdventure.php - Hero auction
GameEngine/HeroAuction.php - Game data tables
GameEngine/Data/buidata.php
Community and progression
- Alliance system
GameEngine/Alliance.php - Alliance bonuses
GameEngine/AllianceBonus.php - Messages and chat
GameEngine/Message.php - Rankings and statistics
GameEngine/Ranking.php
World operations
- World automation
GameEngine/Automation.php - Automated battles
GameEngine/Automation/AutomationBattleResolution.php - Admin panel
GameEngine/Admin/Mods/index.php
Persistence
- Database access
GameEngine/Database.php - Village queries
GameEngine/Database/DatabaseVillageQueries.php - Alliance queries
GameEngine/Database/DatabaseAllianceQueries.php - Troop queries
GameEngine/Database/DatabaseTroopQueries.php - MariaDB
Other components
- Player
Connections 29
- Player → Game entry: opens
- Game entry → Request security: loads
index.php - Game entry → Database access: loads
index.php - Game entry → Player session: starts gameplay
- Player → Player session: authenticates
- Player session → Database access: loads
GameEngine/Session.php - Player session → Game views: serves views
- Game views → Village management: presents
- Village management → Building system: manages
- Village management → Database access: reads and writes
- Building system → Game data tables: uses definitions
- Units and training → Game data tables: uses definitions
- Battle resolution → Hero features: applies bonuses
GameEngine/Battle.php - Battle resolution → Alliance bonuses: applies bonuses
GameEngine/Battle.php - World automation → Battle resolution: loads
GameEngine/Automation.php - World automation → Alliance bonuses: processes upgrades
GameEngine/Automation.php - World automation → Automated battles: delegates
GameEngine/Automation/AutomationBattleResolution.php - World automation → Database access: loads
GameEngine/Automation.php - Alliance system → Database access: creates permissions
GameEngine/Alliance.php - Alliance system → Messages and chat: sends notices
GameEngine/Alliance.php - Hero features → Hero adventures: supports
- Hero features → Hero auction: supports
- Admin panel → Database access: updates game data
- Database access → Village queries: delegates
GameEngine/Database.php - Database access → Alliance queries: delegates
GameEngine/Database.php - Database access → Troop queries: delegates
GameEngine/Database.php - Database access → MariaDB: queries
- Rankings and statistics → Game views: renders rankings
- Artifacts → World automation: advances world state
GameEngine/Automation.php