Add WaveSpawnCalc tool node with interactive spawn curve preview #78

Merged
cammymoop merged 1 commit from feature/wave-spawn-calc-preview into master 2026-03-05 14:35:26 -06:00
Collaborator

Summary

  • Extracts spawn count formula from WaveSpawner into a new WaveSpawnCalc Node child
  • @tool script activates an in-editor preview when the node is the edited scene root: log-scaled Line2D curve over 2x the configured duration, vertical markers for the first N listed waves and for 1x/1.25x/1.5x/2x end time, and a VBox panel with big-number output (commas every 3 places + order-of-magnitude name in parens, handles values beyond 64-bit int range)
  • tools/wave_spawn_preview.tscn — open this scene in the editor to tweak parameters and see live feedback
  • WaveSpawner delegates to the WaveSpawnCalc child for get_wave_count(); test_scene_1.tscn updated with a WaveSpawnCalc child node

Test plan

  • gdlint passes on wave_spawn_calc.gd and wave_spawner.gd
  • Headless run exits cleanly (exit 0, no new errors vs baseline)
  • Open tools/wave_spawn_preview.tscn in editor, tweak exported params, verify curve and labels update live
## Summary - Extracts spawn count formula from WaveSpawner into a new `WaveSpawnCalc` Node child - `@tool` script activates an in-editor preview when the node is the edited scene root: log-scaled Line2D curve over 2x the configured duration, vertical markers for the first N listed waves and for 1x/1.25x/1.5x/2x end time, and a VBox panel with big-number output (commas every 3 places + order-of-magnitude name in parens, handles values beyond 64-bit int range) - `tools/wave_spawn_preview.tscn` — open this scene in the editor to tweak parameters and see live feedback - WaveSpawner delegates to the WaveSpawnCalc child for `get_wave_count()`; test_scene_1.tscn updated with a WaveSpawnCalc child node ## Test plan - [x] gdlint passes on wave_spawn_calc.gd and wave_spawner.gd - [x] Headless run exits cleanly (exit 0, no new errors vs baseline) - [ ] Open tools/wave_spawn_preview.tscn in editor, tweak exported params, verify curve and labels update live
Extracts the spawn count formula from WaveSpawner into a dedicated
WaveSpawnCalc node that doubles as a @tool editor preview scene.

- entities/wave_spawn_calc.gd: Node-derived @tool script with the
  spawn count formula (get_wave_count) plus exported preview params
  (wave_duration, total_duration, listed_waves). When opened as the
  edited scene root, builds a live preview: a log-scaled Line2D curve
  spanning 2x the configured duration, vertical markers for the first N
  waves and for 1x/1.25x/1.5x/2x end time, and a VBox listing wave
  counts with big-number formatting (commas every 3 places, order-of-
  magnitude name in parens). Handles numbers well beyond 64-bit int
  range using float.

- tools/wave_spawn_preview.tscn: Standalone scene to open in the editor
  for live parameter tweaking.

- entities/wave_spawner.gd: Removes starting_num/spawn_num_base/
  spawn_exponent and _get_wave_count(); delegates to a WaveSpawnCalc
  child node instead.

- environment/test_scene_1.tscn: Adds WaveSpawnCalc as a child of
  WaveSpawner with matching wave_duration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cammymoop merged commit 6a035bba96 into master 2026-03-05 14:35:26 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cammymoop/semi-vibed-game!78
No description provided.