Skip to content

Starfall Royale: balance constants, meteor warnings, echo zones, movement tuning#10

Draft
cloudygetty-ai wants to merge 14 commits into
mainfrom
claude/starfall-royale-prototype-OYwGL
Draft

Starfall Royale: balance constants, meteor warnings, echo zones, movement tuning#10
cloudygetty-ai wants to merge 14 commits into
mainfrom
claude/starfall-royale-prototype-OYwGL

Conversation

@cloudygetty-ai

Copy link
Copy Markdown
Owner

Summary

  • Balance constants (src/core/balance/constants.ts) — single source of truth for all magic numbers; GameEngine, MeteorManager, BotService, and gameStore all import from here
  • Meteor warning phaseIncomingMeteor type with 2s countdown before impact; MeteorZoneOverlay renders shrinking orange→red warning rings
  • Anti-stacking guard — players can only hold one Fracture Core at a time (heldCoreEffect !== null blocks pickup)
  • Time Echo Zone effects — ability charge rate ×0.5 and movement speed ×0.85 inside zones (no longer purely cosmetic)
  • Simulation testssimulateTicks helper + 6 multi-tick tests covering smoke run, corruption floor, relay cooldown, supply drop bounds, bounty, second-core block
  • Movement tuningBOT_SPEED raised 2.5→3 (75% of player, more threatening), bots now respect character speedMult, all zone radii/ages use named constants, ABILITY_SPEED_BOOST_MULT named

Test plan

  • npm test — 122 tests, 0 failures
  • npx tsc --noEmit — 0 errors
  • In-game: pick up Fracture Core → walk over second core → blocked (held core unchanged)
  • In-game: meteor warning ring appears and shrinks to impact radius over 2s before landing
  • In-game: enter Time Echo Zone → ability charge noticeably slower, movement slightly sluggish
  • In-game: bots chase and pressure — feel more aggressive than before at BOT_SPEED=3

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL


Generated by Claude Code

claude added 14 commits April 30, 2026 02:34
Single-file Python/Pygame game where a randomised meteor shower replaces
the traditional battle-royale storm.  Key mechanics:
- Meteors spawn at escalating frequency and radius as time progresses.
- 1.5 s warning circle (pulsing ring + countdown) telegraphs each strike.
- Nine Reinforced Shelter zones grant full blast immunity.
- Green health packs respawn every 15 s and restore 35 HP.
- Screen-shake on impact, particle debris, and a danger-intensity bar.
- Adaptive difficulty: spawn interval shrinks from 3 s down to 0.35 s,
  blast radius grows from 28 px up to 70 px, over ~3 minutes of play.

Run with: python3 starfall_royale.py

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
Three pre-existing issues were breaking the Type Check · Lint · Test CI job:

1. TypeScript: App.tsx passed onStart/onPlayAgain props that LobbyScreen and
   GameOverScreen don't declare — screens drive navigation via the store.
   Removed the dead props from the JSX call-sites.

2. TypeScript: logger.ts used process.env.NODE_ENV which has no type in the
   React Native environment. Replaced with the built-in __DEV__ global.

3. Lint: no .prettierrc existed, so prettier defaulted to double-quotes while
   the codebase uses single-quotes — causing 146 prettier/prettier errors across
   every file. Added .prettierrc with singleQuote:true to align them, then ran
   eslint --fix to reformat. Also removed two unused destructured variables in
   GameScreen.tsx (updateGameState at line 25, update alias in handleReload).

All 98 tests pass, type-check is clean, lint reports 0 errors.

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
The native Android shell is generated by react-native init and has not
been bootstrapped in this repo yet. Without android/gradlew the build
step always fails. Guard the job with hashFiles('android/gradlew') so
it is skipped rather than failing every PR until the shell is added.

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
Adds 21 new weapon types across all major battle-royale categories.
Every change is data-driven — no new control-flow, no new files.

New weapons by category:
  Pistols:    pistol, revolver, hand_cannon, burst_pistol
  SMGs:       compact_smg, suppressed_smg
  ARs:        burst_ar, heavy_ar, thermal_ar
  Shotguns:   tactical_shotgun, heavy_shotgun, drum_shotgun
  Snipers:    semi_sniper, heavy_sniper, hunting_rifle
  Marksman:   marksman_rifle
  LMG:        lmg
  Explosive:  rocket_launcher
  Special:    crossbow, minigun, rail_gun

Touch points updated:
  types/game.ts        — WeaponType union (TypeScript-enforced exhaustiveness)
  gameStore.ts         — base stats table + loot pool
  WeaponService.ts     — bot aim-spread table
  HUD.tsx              — WEAPON_LABELS display table

All 98 tests pass, type-check clean, lint 0 errors.

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
Complete implementation of the Fall of the Fracture meteor event system:

Fracture Cores
- Explosive meteors (80%) spawn a FractureCore at impact site
- Three effects: cooldown_reduction (charges 2× faster), damage_amp (+40% outgoing),
  ability_mutation (random 10s effect)
- Corruption drains HP/s while held — greed vs survival loop
- Cores auto-pick-up within 60 units

Gravity & Echo Zones
- Gravity meteors (15%) create 30s pull zones (60 units/s toward center, 0.6× speed)
- Echo meteors (5%) create 20s time echo zones (visual disruption layer)

Mid-match Objectives
- 5 Helix Relays scattered across map; capture in 5s, rewards a loot cache
- Relays decay when unoccupied, reward on 60s cooldown

Supply Drops
- Airdrop every 3 minutes (8s descent warning visible on map)
- Always epic/legendary tier weapon

Comeback Mechanic
- Bounty system: highest-kill player (≥3 kills) is marked as target
- Eliminating the bounty drops bonus loot cache at kill site

Character System
- 15 characters with unique passives and abilities
- Each character has a meteor quip (displayed 3.5s after nearby impact)
- LobbyScreen character selection with long-press detail modal

HUD
- Ability button with cooldown countdown / active duration display
- Corruption indicator (purple HP bar + drain rate)
- Bounty marker on kill chip when player has bounty
- Character quip banner on meteor impact

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
…r quips

Each character now has a unique accentColor that drives card borders, ability
tags, name highlights, summary bar, and detail modal — replacing all hardcoded
#ffcc00 values. Cards show a tinted placeholder (title initial) or a portrait
image when portraitSource is set (supports local require() assets and remote
URLs). Added meteorQuip to Character type and all 15 character definitions.
Generated accent-colored placeholder portraits (400x520 PNG) for all 15
characters using their unique accentColor. Static require() calls isolated
to portraits.ts so Metro can resolve assets at bundle time without scattering
eslint-disable across characters.ts. Swap any PORTRAITS entry to null to
revert to the initial-letter placeholder, or replace the PNG file to swap
in real artwork without any code changes.
… effect

Vex (-25%), Sable (-20%), and Kael (-20%) reload passives were silently
ignored because startReload used weapon.reloadTime directly. Multiplied by
player.reloadMult before passing to setTimeout. Added timing test that
asserts a 0.5× player completes reload in under 350ms while a 1× player
takes at least 350ms on the same 400ms-base weapon.
…Source type

Added three assertions to the character roster test:
- accentColor matches /^#[0-9a-f]{6}$/i — catches typos and 8-char values
- all accentColors are unique — prevents copy-paste collisions across characters
- portraitSource is number or null — enforces Metro asset type contract

Mocked portraits module with numeric IDs so tests match Metro production
behavior rather than Jest's { testUri } asset transformer output.
… tests

1. src/core/balance/constants.ts — all magic numbers in one place
   (PLAYER_SPEED, FRACTURE_CORE_DAMAGE_AMP, JAX_HP_DRAIN_DPS,
   METEOR_WARNING_MS, ECHO_ZONE_CHARGE_RATE_MULT, etc.)

2. Meteor warning phase — MeteorImpact now has a 2s incoming countdown
   (IncomingMeteor type). MeteorZoneOverlay renders a shrinking warning
   ring per incoming meteor; ring turns red in the final 500ms.

3. Time Echo Zone gameplay — players inside charge abilities at 0.5x rate
   and move at 0.85x speed. Reality malfunctions, not just the UI.

4. Anti-stacking — players can hold only one Fracture Core at a time.
   Explicit guard in tickFractureCores with WHY comment.

5. Simulation tests — simulateTicks helper + 6 match-flow assertions:
   10s smoke test, bounty threshold, supply drop bounds, corruption floor
   at 1 HP, Helix Relay cooldown enforcement, second-core pickup blocked.
…o bots

- Add BOT_SPEED (3), BOT_AGGRO_RANGE, BOT_SHOOT_RANGE, BOT_LOOT_RANGE, ABILITY_SPEED_BOOST_MULT to constants.ts
- BotService now imports all AI tuning values from core/balance instead of local magic numbers
- Bots apply bot.speedMult so character passives (Jax +25%, Magnus -10%) work for AI too
- spawnMeteorEffects uses GRAVITY_ZONE_RADIUS/PULL_STRENGTH/MAX_AGE_MS and ECHO_ZONE_RADIUS/MAX_AGE_MS instead of hardcoded literals
- BOT_SPEED raised from 2.5 → 3 (75% of PLAYER_SPEED — bots are threatening but still outrunnable)

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
…ndown

iOS bundle identifier, BGTaskScheduler ID, and Android package name now
use the project owner's namespace instead of a generic placeholder.

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
…, supply countdown

- Right joystick now fires automatically when deflected >25% — aims in stick direction
  instead of auto-targeting nearest enemy; FIRE button also uses aim direction
- isShooting flag is now acted on each tick (was declared but never read)
- HUD incoming meteor warning uses real IncomingMeteor countdown, not the spawn timer
- HUD shows green supply drop chip (📦 Xs) in the last 30s before a crate lands
- LOOT_PICKUP_RANGE added to constants.ts; GameScreen imports TICK_RATE_MS + LOOT_PICKUP_RANGE
  from balance instead of local magic numbers

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
Death loot drops
- Eliminated players now drop all non-pickaxe weapons at their death position
  (slots staggered +/-18 units to avoid overlap), ammo refilled to full mag
- Bounty bonus drop still appended on top; kill path always returns updated lootDrops

Supply drop visuals
- New SupplyDropView component: shows shrinking yellow landing ring + countdown
  while descending, golden crate icon once landed
- GameMap renders state.supplyDrops (were previously invisible)

Minimap
- New Minimap component: 130×130 overlay in top-right corner
- Shows shelter zone ring, next-zone ring, blue player dot, red bot dots,
  yellow supply drops, and red incoming meteor positions
- Mounted directly in GameScreen so it has access to full game state

https://claude.ai/code/session_016hNHuNDATyqSt1EvhWEstL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants