Refine asteroids: faster, sparser, with horizontal drift

Increase base fall speed (120→200), acceleration (200→350), and respawn
delay (3→6s). Add random horizontal drift (±60 px/s) so asteroids fall
at angles. Widen initial stagger (0-3→0-8s). Reduce moon level from 24
asteroids to 8, spread evenly across the level.
This commit is contained in:
Thomas
2026-03-01 11:04:00 +00:00
parent 49ed2d6f7b
commit 94dbe83cfe
4 changed files with 24 additions and 32 deletions

View File

@@ -95,13 +95,16 @@ Entity *force_field_spawn(EntityManager *em, Vec2 pos);
#define ASTEROID_WIDTH 14
#define ASTEROID_HEIGHT 14
#define ASTEROID_FALL_SPEED 120.0f /* base fall speed (px/s) */
#define ASTEROID_FALL_SPEED 200.0f /* base fall speed (px/s) */
#define ASTEROID_ACCEL 350.0f /* fall acceleration (px/s^2) */
#define ASTEROID_DRIFT_MAX 60.0f /* max horizontal drift (px/s) */
#define ASTEROID_DAMAGE 1
#define ASTEROID_RESPAWN 3.0f /* seconds before respawning */
#define ASTEROID_RESPAWN 6.0f /* seconds before respawning */
typedef struct AsteroidData {
Vec2 spawn_pos; /* original position (for reset)*/
float fall_speed; /* current fall velocity */
float drift_x; /* horizontal velocity (px/s) */
float respawn_timer; /* countdown while inactive */
bool falling; /* true = falling, false = wait */
float trail_timer; /* particle trail interval */