← Prompts

RTS

Read the current prompt
# FRONTIER WAR — 3D Sci-Fi Real-Time Strategy

Build a complete, playable **3D real-time strategy game** in a single HTML file, in the tradition of Warcraft and Command & Conquer, with an original science-fiction setting. The player commands an expedition competing with a rival force for control of a resource-rich frontier world.

Choose your own visual style, level of geometric detail, faction identity, and presentation. Make the world, units, and buildings distinctive and readable at both base-management and army-command scales. Render the battlefield in real-time 3D, with a movable angled camera, zoom, and rotation. Generate or embed the game's assets so the delivered artifact works within the authoring environment's dependency constraints.

The defining experience is **escalation**: begin with one headquarters and a few workers, explore an unknown map, establish an economy, expand into new territory, and command increasingly large combined-arms forces against an active opponent. All of these systems must work together in actual play.

## 1. A Complete Skirmish

- One substantial map, one human player, and one autonomous AI opponent. Both sides begin with a headquarters, a few workers, and enough resources to start developing.
- Aim for a satisfying first match of roughly 5–10 minutes, while allowing longer matches and much larger armies if neither side finishes the other quickly.
- Give the player a short, safe opening to establish production and scout before serious enemy pressure begins.
- Victory comes from destroying all enemy headquarters; defeat comes from losing all of your own. Additional headquarters can be built as expansions. Make these rules clear before play.
- Include a title/start screen with concise instructions, pause/resume, victory and defeat screens, and a restart that resets the whole match.

## 2. Exploration and Fog of War

- The map begins unexplored except around the player's starting forces. The enemy base's location is initially unknown; do not reveal it through the minimap, UI, targeting, or camera movement.
- Distinguish **unexplored**, **explored but currently out of sight**, and **currently visible** areas. Friendly units and buildings reveal nearby terrain as they move or are constructed.
- Explored terrain remains known, but enemy units disappear when they leave current vision. Previously seen enemy buildings may remain as last-known silhouettes, without revealing subsequent construction or destruction until revisited.
- Apply the same information rules to the battlefield and minimap. Moving the camera does not reveal terrain. Orders and automatic attacks must not acquire hidden enemies.
- Make scouting useful: routes, resource fields, enemy expansions, and approaching armies should be discoveries. The map needs enough space and alternative routes for opponents to encounter each other away from their starting bases.
- Give the AI its own vision and scouting behavior; it should discover targets rather than know every player position automatically.

## 3. Economy and Expandable Supply

- Use one primary harvestable resource, distributed among finite deposits across the map. Workers travel to deposits, gather, carry resources, and return them to a friendly headquarters or resource drop-off building.
- Units, buildings, and upgrades compete for this resource. Prices and build times must create meaningful choices between immediate defense, a stronger economy, expansion, and technology.
- Nearby deposits eventually deplete. Provide enough total resources for both sides to establish several bases and sustain large armies. Expanding should improve harvesting efficiency by placing drop-offs near distant deposits.
- Units consume supply; completed supply buildings increase capacity. Show **used / available supply** clearly. Supply is reusable capacity, not a resource spent permanently when a unit is trained.
- Support repeated supply expansion into the hundreds, with further growth toward thousands if the economy supports it. Avoid a small fixed population ceiling that ends the game's escalation.
- Reserve supply consistently for queued units and release reservations on cancellation. Supply shortages pause production with clear feedback. Losing supply infrastructure can block further production but must not delete existing units.
- Show resource totals, gathering feedback, construction progress, production queues, costs, prerequisites, and supply requirements. Unavailable actions explain why they are unavailable.

## 4. Building and Territorial Expansion

- Workers construct buildings at player-chosen locations, with a placement preview, valid/invalid feedback, resource deduction, and visible construction over time.
- Include the functional roles of headquarters/resource return, supply infrastructure, ground-unit production, air-unit production, research, and defensive emplacement. You may combine roles where it makes the design clearer.
- Buildings occupy space, take damage, and can be destroyed. Prevent overlapping placements and ensure construction does not trap units permanently.
- Allow additional headquarters and production facilities. Multiple production buildings operate independently, with queues and rally points, so investment translates into increasing army output.
- Shape the map with terrain obstacles, chokepoints, open fighting areas, and contested resource sites. Ground units navigate around obstacles; flying units can cross them.
- Territory matters through vision, safe harvesting, forward production, defensive positions, and travel time. The player should have reasons to defend expansions and raid the enemy's economy.

## 5. Unit Variety and Combat

- Include workers and at least **four complementary combat types**: a close-combat ground unit, a ranged ground unit, a heavy armored ground unit, and a flying combat unit. Invent their names, appearance, and specific roles.
- Use at least two damage types and two armor categories, with real damage modifiers that produce useful counters. Distinguish which weapons can target ground, air, or both; provide an accessible counter to aircraft.
- Make differences in speed, range, durability, damage, cost, supply, and production time tactically meaningful. No single unit should dominate every matchup.
- Units obey movement, attack, attack-move, stop, and hold-position commands. Automatic targeting respects sight, range, and valid target types. Attack-move engages encountered enemies and resumes movement when the fight ends.
- Combat has readable weapon effects, health feedback, impacts, and destruction. Close-combat units must reach their targets; ranged units fight at range; aircraft visibly operate above the ground.
- Groups navigate around buildings and terrain, spread into usable positions, and reach their destinations without collapsing into one overlapping point or becoming permanently stuck. Large battles must continue to move and resolve.
- Offer a small set of meaningful researched upgrades, with resource costs and research times, that improve capabilities and compete with spending on more units or bases.

## 6. Commanding an Army

- Left-click selects units or buildings; drag a rectangle to select groups. Shift modifies selection. Right-click issues contextual move, attack, gather, or resource-return orders.
- Support numbered control groups, selecting units of the same type, queued orders, and clear command buttons or hotkeys for attack-move, stop, and hold position.
- Use keyboard camera panning and/or edge scrolling, wheel zoom, and an accessible rotation control. Clicking the minimap moves the camera; issuing orders through it is also useful.
- Show selection indicators, order destinations, and a selection panel with unit counts, health, type information, and available actions. Mixed selections and very large groups must remain manageable.
- Provide a minimap with fog of war, friendly forces, visible enemies, known resources, and the current camera footprint.
- Production and research panels show progress and allow cancellation with a clear refund rule. Newly produced units follow rally orders.
- Keep HUD interaction separate from battlefield input so using a panel never accidentally issues an order or changes selection behind it.

## 7. A Developing Opponent

- The AI runs a real economy: harvests finite resources, builds supply and production, trains units, researches upgrades, and expands toward new deposits.
- It scouts, assembles forces, attacks, and defends threatened assets. Attacks should grow from early raids into larger combined-arms engagements as its economy develops.
- It uses the same costs, supply rules, construction times, movement, combat, and visibility rules as the player. Do not substitute free periodic army spawns for an economy.
- It should remain active throughout the match and pose a winnable challenge. The player can weaken it by killing workers, cutting supply, or destroying expansions and production.

## 8. Scale, Presentation, and Feedback

- Make growth visible: a sparse starting outpost becomes a network of bases, resource routes, production facilities, defenses, and large armies.
- Design for **hundreds of individually simulated active units**, with growth toward thousands as a stretch goal. Units must still gather, receive orders, move, and fight; decorative crowds or a displayed army count do not satisfy scale.
- Choose rendering and simulation techniques that preserve responsive controls as populations grow. You decide the appropriate visual detail and performance tradeoffs. Avoid a hidden small unit cap.
- Keep unit roles, faction ownership, flight versus ground movement, selection, and major threats readable at different zoom levels. Give buildings recognizable functional identities.
- Use audio and visual feedback for commands, production completion, supply shortages, combat, and attacks on the player's bases. If audio is included, generate it procedurally or embed it, and provide mute control.
- Include concise in-game help for controls, economy, supply, counters, and the victory condition. The player should be able to learn by playing.

## Priorities

1. **A complete, responsive RTS loop:** gather, build, produce, command, fight, win or lose.
2. **Escalation of scale:** expandable economy, supply, territory, and production that sustain hundreds of active units.
3. **Discovery and uncertainty:** meaningful scouting and consistent fog of war.
4. **Strategic choices:** spending tradeoffs, vulnerable expansions, varied units, and effective counters.
5. **Convincing 3D presentation:** choose an appropriate style and level of detail, and make the growing war readable and satisfying.