# Concept ## Overview A single-player asymmetric game inspired by DOTA's wave/tower structure, combined with a Factorio-style factory builder. The player builds a factory on an asteroid to supply shipyards that produce autonomous combat ships. Those ships fight off endless enemy waves advancing from the right. The goal is to survive as long as possible. ## Setting & Visuals - Science-fiction setting on the boundary between an asteroid and space. - 2D (or 2.5D) top-down view similar to Factorio. - The game world has a fixed height and scrolls horizontally. - The asteroid surface occupies the left portion of the world; space extends to the right. - The number of buildable tiles on the asteroid is configurable. ## Game World Layout (left to right) 1. **Asteroid** — factory and shipyards are built here. 2. **Player defence stations** — a set of stations positioned in space at some distance from the asteroid edge. They automatically engage approaching enemies. They can be destroyed. 3. **Enemy defence stations** — a set of stations further to the right of the player's stations. The player can only scroll the view up to these stations. They are the push target. 4. **Enemy spawn area** — enemy waves originate from off-screen to the right. ## Factory - The player constructs factory buildings on the asteroid to produce materials and ship parts. - Buildings are placed in a queue and constructed one at a time; each building takes time to complete. - The crafting/production tree is defined in a config file so it can be extended later without code changes. - The factory is simpler than Factorio in depth but follows the same production-chain principle. ## Resources Two sources feed the same production tree: - **Mining** — the player's starting resource method. Ores are extracted from the asteroid and smelted into basic materials. - **Scrap** — collected by dedicated salvage ships from destroyed enemy ships. - Scrap can be smelted into the same basic materials as mined ores. - A dedicated **Reprocessing Plant** building can extract higher-level intermediate products from scrap (with randomised probabilities per product type), bypassing parts of the normal crafting chain. ## Ships & Shipyards - Shipyards are built at the edge of the asteroid. - When the player clicks a shipyard, they choose a blueprint from all currently unlocked blueprints. - The shipyard automatically produces one ship of the selected blueprint whenever all required materials are available in the shipyard. - Ships are fully autonomous: they travel to the right, engage enemy ships, and do not require player input. - If the player's ships are all destroyed, enemy ships advance unhindered toward the player's defence stations and then the asteroid. ## Enemy Waves - Waves spawn continuously over a period of several seconds, then there is a gap before the next wave begins spawning. - The previous wave may still be in transit or fighting during the gap — there is no hard "wave cleared" state. - The number and strength of enemies increases over time. ## Push Mechanic (Enemy Defence Stations) - The enemy owns a pair of defence stations positioned just beyond the scrollable area boundary. - The player is **not** forced to push — purely defensive play is valid. - If the player's fleet becomes strong enough that incoming waves are trivial, pushing to destroy enemy defence stations provides a new challenge: destroying them **doubles the enemy threat level** starting with the next wave, extends the scrollable area, and places a new pair of stations (twice as strong) at the new boundary. - Destroyed enemy defence stations drop loot: primarily **ship blueprints** that unlock new ship types at shipyards. ## Game Over Condition - There is a **Headquarters** building at the edge of the asteroid (the last line of defence). - If enemy ships breach the asteroid — all player ships and defence stations destroyed — they attack the HQ. - The game is lost when the HQ is destroyed. - Individual factory buildings are **not** targeted or destroyed by enemies. ## Progression & Goals - The primary goal is to survive as long as possible. - Elapsed time is always displayed. - New ship blueprints are unlocked by destroying enemy defence stations. ## Open Questions / TODO - How does the player unlock additional asteroid tiles for building?