Add jetpack fuel pickup and slow base recharge to 30s

Jetpack charges now take 30s to passively recharge (up from 3s),
making fuel management a core gameplay loop. A new fuel canister
powerup (POWERUP_FUEL) restores exactly one charge on pickup.

The existing jetpack powerup remains as the rare full-refill + 15s
boost. Fuel pickups replace most procedural jetpack spawns at higher
spawn rates to compensate for the weaker per-pickup value. Fuel
canisters also appear in corridors and arenas.

Adds orange canister pixel art, editor icon, entity registry entry,
and places fuel pickups throughout moon01.
This commit is contained in:
Thomas
2026-03-01 18:06:32 +00:00
parent fdba6ef077
commit bb0b9ddce1
11 changed files with 135 additions and 27 deletions

View File

@@ -902,6 +902,48 @@ static const uint32_t powerup_gun2[16*16] = {
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
};
/* ── Fuel powerup sprite ───────────────────────────── */
/* Fuel canister — orange/amber napalm canister icon */
static const uint32_t powerup_fuel1[16*16] = {
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, GYD, GYD, GYD, T, T, T, T, T, T, T,
T, T, T, T, T, GYD, GYL, GYL, GYL, GYD, T, T, T, T, T, T,
T, T, T, T, T, ORD, ORG, ORG, ORG, ORD, T, T, T, T, T, T,
T, T, T, T, ORD, ORG, YLW, YLW, ORG, ORG, ORD, T, T, T, T, T,
T, T, T, T, ORD, ORG, YLW, YLW, ORG, ORG, ORD, T, T, T, T, T,
T, T, T, T, ORD, ORG, ORG, ORG, ORG, ORG, ORD, T, T, T, T, T,
T, T, T, T, ORD, ORG, YLD, YLD, YLD, ORG, ORD, T, T, T, T, T,
T, T, T, T, ORD, ORG, ORG, ORG, ORG, ORG, ORD, T, T, T, T, T,
T, T, T, T, ORD, ORG, YLW, YLW, ORG, ORG, ORD, T, T, T, T, T,
T, T, T, T, T, ORD, ORG, ORG, ORG, ORD, T, T, T, T, T, T,
T, T, T, T, T, T, ORD, ORD, ORD, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
};
/* Fuel canister frame 2 — brighter glow */
static const uint32_t powerup_fuel2[16*16] = {
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, GYL, GYL, GYL, T, T, T, T, T, T, T,
T, T, T, T, T, GYL, WHT, WHT, WHT, GYL, T, T, T, T, T, T,
T, T, T, T, T, ORG, YLW, YLW, YLW, ORG, T, T, T, T, T, T,
T, T, T, T, ORG, YLW, WHT, WHT, YLW, YLW, ORG, T, T, T, T, T,
T, T, T, T, ORG, YLW, WHT, WHT, YLW, YLW, ORG, T, T, T, T, T,
T, T, T, T, ORG, YLW, YLW, YLW, YLW, YLW, ORG, T, T, T, T, T,
T, T, T, T, ORG, YLW, ORG, ORG, ORG, YLW, ORG, T, T, T, T, T,
T, T, T, T, ORG, YLW, YLW, YLW, YLW, YLW, ORG, T, T, T, T, T,
T, T, T, T, ORG, YLW, WHT, WHT, YLW, YLW, ORG, T, T, T, T, T,
T, T, T, T, T, ORG, YLW, YLW, YLW, ORG, T, T, T, T, T, T,
T, T, T, T, T, T, ORG, ORG, ORG, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,
};
/* ── Asteroid sprite ────────────────────────────────── */
/* Asteroid-specific greys — cold, cratered moonrock */
@@ -1024,6 +1066,8 @@ static const SpriteDef s_sprite_defs[] = {
{6, 3, powerup_gun2},
{6, 4, asteroid1},
{6, 5, asteroid2},
{6, 6, powerup_fuel1},
{6, 7, powerup_fuel2},
};
#define SHEET_COLS 8
@@ -1210,6 +1254,12 @@ static AnimFrame s_powerup_drone_frames[] = {
FRAME(6, 5, 0.3f),
};
/* Fuel powerup */
static AnimFrame s_powerup_fuel_frames[] = {
FRAME(6, 6, 0.35f),
FRAME(7, 6, 0.35f),
};
/* Gun powerup */
static AnimFrame s_powerup_gun_frames[] = {
FRAME(2, 6, 0.4f),
@@ -1256,6 +1306,7 @@ AnimDef anim_force_field_off;
AnimDef anim_powerup_health;
AnimDef anim_powerup_jetpack;
AnimDef anim_powerup_fuel;
AnimDef anim_powerup_drone;
AnimDef anim_powerup_gun;
AnimDef anim_asteroid;
@@ -1290,6 +1341,7 @@ void sprites_init_anims(void) {
anim_powerup_health = (AnimDef){s_powerup_health_frames, 2, true, NULL};
anim_powerup_jetpack = (AnimDef){s_powerup_jetpack_frames, 2, true, NULL};
anim_powerup_fuel = (AnimDef){s_powerup_fuel_frames, 2, true, NULL};
anim_powerup_drone = (AnimDef){s_powerup_drone_frames, 2, true, NULL};
anim_powerup_gun = (AnimDef){s_powerup_gun_frames, 2, true, NULL};
anim_asteroid = (AnimDef){s_asteroid_frames, 2, true, NULL};