§4 — Gameplay
PvE dungeon combat, skill system, PvP challenges, ranked PvP, raids, idle rewards, and the XP/level progression system.
Dungeon System (GDD §9)
Dungeon Difficulties (6)
- Tutorial — training drone combat, no deaths
- Easy — Pirate Lair (lvl 1), Asteroid Mine (lvl 2)
- Medium — Alien Ruins (lvl 3)
- Hard — Corrupted Vault (lvl 5), Nebula Anomaly (lvl 7)
- Extreme — Void Rift (lvl 12, endgame)
- Legendary — Not yet assigned; reserved for raids
Dungeon Definitions (8)
pirate_lair, asteroid_mine, alien_ruins, corrupted_vault, nebula_anomaly, void_rift + 2 additional. Each has enemyPool, lootTable, energyCost, rewardMultiplier, and optional bossId.
Room Types
- Combat encounter — fight enemy template
- Loot room — guaranteed item drop
- Merchant — spend credits mid-run
- Boss — high HP, rare loot
Enemies (15 templates)
- Space Pirate, Pirate Captain, Mining Drone, Rock Creature
- Alien Guardian, Ancient Drone, Crystal Golem
- Corrupted AI, Security Drone, Virus Program
- Energy Being, Phase Shifter, Quantum Entity
- Training Drone, Defense Turret
Combat Log (GDD §9.5)
Every dungeon run appended to persistent combat log. Accessible via get_combat_log. Stored in PlayerData.
PvP Challenge System (GDD §9.4)
Flow
- Player A sends
pvp_challengeto online player B - Player B receives modal — Accept / Decline
- Challenge auto-expires after 30 seconds
- On accept — server runs battle simulation
- Winner receives credits + XP; result shown to both
Battle Simulation
Up to 20 rounds. Each round: attacker and defender both deal damage = ship.attack × (0.85–1.15). Ship HP and level scale both sides.
Rewards
xp_won = 50 + loser.level × 10
Client UI
- GSO_PvP module handles all modals
- Challenge button on Social tab
- Incoming challenge modal with countdown
- Victory / defeat result modal
Skill System (GDD §10)
Skill Categories
- Combat — damage, crit, defence, speed
- Crafting — speed, quality, yield
- Science — research speed, XP gain, alien tech
Data Files
15 skill JSON files across 3 subdirectories. Skills have level requirements and passive multiplier effects.
Skill Points
Earned by levelling up (stats.skillPoints). Spent via the Skills tab. Effects applied server-side.
Visual Tree
Skills tab renders a category-filtered tree. Active/locked states driven by get_skills response.
XP & Level Progression (GDD §3)
Level Formula
This is the simplified server formula. The config/xp-progression.js file contains an extended multi-curve formula used in early prototyping — the server now uses the GDD §3.2 version.
Max Level
Level cap: 50. XP continues to accumulate beyond cap but yields no new level-ups.
Level-Up Events
- Server emits
player_stat_updatewith new level - Client detects old vs new level →
showNotification() - XP bar fills in real-time on dashboard
XP Sources
- Dungeon completion (50–5,000 XP by difficulty)
- Quest completion (25–3,000 XP)
- Fleet mission return (scaled by type)
- PvP win (50 + loser_level × 10)
- Crafting (10 XP per craft default)
Idle & Offline System (GDD §19)
Offline Accumulation
When a player logs out, their resources continue accumulating based on building levels. On next login, IdleSystem.calculateOfflineRewards() computes elapsed time × production rates.
Online Idle Ticks
Background ticks every 60 seconds send resource_update to connected clients without requiring any player action.
Offline Cap
Offline accumulation is capped at 8 hours to prevent extreme catch-up. Cap can be extended by upgrading Storage Depot.
claimOfflineRewards
Client emits on login. Server computes, saves to DB, emits offlineRewardsClaimed with a breakdown shown in a modal.