Era.ioAI · Claude 3.5
Game information
AI generation prompt
Core Game Loop and Mechanics
Moment-to-Moment Gameplay: Players control a circular warrior character in a top-down arena, moving freely with WASD (desktop) or virtual joystick (mobile). The core loop consists of:
- Collect XP Dots: Small XP orbs are scattered across the map. Moving over them collects them instantly, increasing your total XP
- Evolve Through Eras: As XP accumulates, players automatically evolve through distinct historical eras (7 total), each with unique visual appearance and weapons
- Automatic Combat: When within range of an enemy (AI or other players in future), your character automatically swings their era-appropriate weapon with a simple rotation animation
- Defeat Enemies: Defeating enemies drops 50% of their XP as collectible orbs
- Survive and Dominate: Avoid being defeated while climbing the evolution ladder to become the most advanced warrior
Progression System:
- XP thresholds trigger evolution to the next era
- Each evolution increases: character size (slightly), health pool, and attack damage
- Visual transformation shows clear progression through history
Win/Lose Conditions:
- No explicit "win" - this is an endless survival/progression game
- "Lose" occurs when health reaches zero - player respawns as a basic caveman with minimal XP
- Goal is to reach the highest era and maintain dominance
Engagement & Replayability:
- Risk/reward of engaging enemies vs. safely collecting dots
- Satisfying visual progression through eras
- Strategic decision: fight weaker enemies for safe XP or challenge stronger ones for bigger rewards
- Quick respawn keeps action flowing
Starting Scope
First Iteration Must Include:
- Top-down arena with textured ground and square border
- Player character (circular with weapon) starting as Caveman era
- 7 distinct evolution eras with unique visuals and weapons
- XP dot spawning system (20-30 dots on map at any time)
- Player movement (WASD + virtual joystick)
- 3-5 AI enemies with basic pathfinding (move toward nearest XP or player)
- Automatic attack system when in range
- Health bars above characters
- XP counter and current era display
- Death/respawn system with XP drop mechanics
- Evolution system with smooth transitions
Future Iterations Can Add:
- Multiplayer functionality
- Power-ups or temporary abilities
- Different weapon types per era with unique attack patterns
- Leaderboard system
- More complex AI behaviors
- Environmental obstacles
- Special "boss" enemies
Game Perspective
Top-Down View - Classic bird's eye perspective where players see their circular character from directly above. The camera follows the player character, keeping them centered on screen. The entire arena is visible with slight padding, allowing players to see approaching threats.
Game World and Level Design
Arena Layout:
- Single square arena: 2000x2000 game units
- Visible border: Solid walls rendered as thick dark lines/rectangles
- Ground texture: Grass base with scattered dirt patches and occasional stone areas for visual variety (can be rendered with Canvas or simple tiled background)
Spatial Design:
- Open arena with no obstacles (keep it simple for first iteration)
- XP dots spawn randomly across the entire arena
- Players and AI spawn at random positions away from each other
- When XP dots are collected, new ones spawn after 2-3 seconds to maintain 20-30 active dots
Scale:
- Player character: 40 units diameter (base size, grows slightly with evolution)
- XP dots: 8 units diameter
- Weapon length: 50-80 units depending on era
- Attack range: 100 units (weapon length + character radius)
Edit Mode Design
Editable Properties:
Evolution Settings:
- XP thresholds for each era (how much XP needed to evolve)
- Health multiplier per era
- Damage multiplier per era
- Character size growth per era
Game Balance:
- Number of AI enemies (1-10)
- AI aggression level (passive/balanced/aggressive)
- XP dot spawn rate
- XP dot value (how much XP each dot gives)
- XP drop percentage on death (default 50%)
Arena Settings:
- Arena size (1000-3000 units)
- XP dot count (10-50)
Visual Settings:
- Ground texture style (grass/dirt/stone ratio)
- Character color tints per era
Constraints:
- XP thresholds must be increasing (each era requires more than the last)
- Multipliers must be positive values between 0.5-5.0
- Arena size minimum 1000 units (prevent too cramped)
- At least 1 AI enemy, maximum 10 (performance)
Control Design
Desktop Controls:
- WASD or Arrow Keys: 8-directional movement
- Movement is continuous while keys are held
- Character moves at constant speed (200 units/second base, scales slightly with era)
- No attack button - combat is automatic when in range
Mobile Controls:
- Virtual Joystick: Appears where player touches on left half of screen
- Joystick provides analog movement (full 360-degree control)
- Joystick implementation:
- Base appears at touch position
- Knob follows finger within max radius (80 pixels)
- If finger exceeds max radius, base slides to keep knob at max radius under finger
- Dead zone: 10 pixels (no movement if within this radius)
- Output: normalized vector (-1 to 1 on X and Y axes)
- Right half of screen reserved for UI elements (no joystick interference)
Combat Mechanics:
- Automatic attack when enemy within range (100 units)
- Attack cooldown: 1 second between swings
- Weapon rotates 180 degrees over 0.3 seconds during attack animation
- Damage applied at peak of swing animation
- Visual feedback: slight character flash on hit
Input Handling:
- Prevent default browser behavior for WASD and arrow keys
- Clear all input states on window blur
- Track touch IDs separately to prevent interference
- Normalize all movement vectors for consistent speed
Art Style and Visual Theme
Overall Style: Minimalist Top-Down with Clear Era Distinction
The game uses a clean, readable art style optimized for top-down gameplay. Characters are simple circular bodies with era-appropriate weapons extending from them. The focus is on clear visual communication of evolution progress and combat state.
Character Design:
- Circular body (top-down view of character)
- Each era has distinct color scheme and weapon silhouette
- Weapon extends from character center, rotating during attacks
- Simple but distinct visual identity for each era
Color Palette:
- Caveman: Browns and tans (earth tones)
- Bronze Age: Bronze/copper colors with green accents
- Iron Age: Dark grays and silvers
- Medieval: Royal blues and steel grays
- Renaissance: Rich purples and golds
- Industrial: Dark metals with orange/red accents
- Futuristic: Bright cyan and neon colors with glowing effects
Environment:
- Ground: Textured grass (green base) with dirt patches (brown) and stone areas (gray)
- Simple, non-distracting background that makes characters and XP dots stand out
- Border: Thick dark outline clearly marking arena boundaries
Visual Effects:
- XP dots: Small glowing orbs with subtle pulse animation
- Health bars: Simple colored bars above characters (green to red gradient)
- Evolution effect: Brief flash/glow when evolving to new era
- Hit effect: Quick white flash on character when taking damage
- Death effect: Character fades out, XP orbs scatter from position
Asset vs. Code Rendering:
- Generated Assets: Character bodies for each era, weapons for each era, XP dot
- Code Rendering (Canvas/CSS): Ground texture (tiled pattern), health bars, border walls, UI elements, particle effects
Scale Consistency:
- All character assets should be circular, viewed from directly above
- Weapons should be clearly visible and distinct between eras
- Consistent lighting (soft top-down lighting, minimal shadows)
The Seven Eras
Era 1: Caveman (0-100 XP)
- Weapon: Wooden club
- Character: Brown/tan circular body with primitive markings
- Base stats (multiplier: 1.0x)
Era 2: Bronze Age (100-300 XP)
- Weapon: Bronze sword
- Character: Bronze-colored with simple armor patterns
- Stats multiplier: 1.3x
Era 3: Iron Age (300-600 XP)
- Weapon: Iron sword
- Character: Dark gray with iron armor details
- Stats multiplier: 1.6x
Era 4: Medieval (600-1000 XP)
- Weapon: Knight's longsword
- Character: Blue with heraldic patterns
- Stats multiplier: 2.0x
Era 5: Renaissance (1000-1500 XP)
- Weapon: Rapier
- Character: Purple with ornate decorations
- Stats multiplier: 2.5x
Era 6: Industrial (1500-2200 XP)
- Weapon: Mechanical saw blade
- Character: Dark metal with gears/cogs visible
- Stats multiplier: 3.0x
Era 7: Futuristic (2200+ XP)
- Weapon: Energy blade (glowing)
- Character: Cyan with glowing circuit patterns
- Stats multiplier: 4.0x
AI Behavior
Basic AI Logic:
- State Machine: Each AI has two states - "Collecting" and "Fighting"
- Collecting State:
- Move toward nearest XP dot
- If player/enemy within detection range (300 units), switch to Fighting
- Fighting State:
- Move toward nearest enemy
- Attack automatically when in range
- If no enemies within detection range, return to Collecting
Pathfinding:
- Simple direct movement toward target (no obstacle avoidance needed in open arena)
- Slight randomization in movement to prevent robotic feel
Difficulty Scaling:
- AI enemies spawn at random eras (weighted toward lower eras)
- AI collects XP and evolves just like the player
- AI respawns 5 seconds after death at Era 1