Commit Graph

71 Commits

Author SHA1 Message Date
767d821534 Pass credentials directly to buildah push via --creds
Some checks failed
CI / build (pull_request) Successful in 31s
Deploy / deploy (push) Failing after 1m12s
buildah login succeeds but push doesn't pick up the stored auth.
Skip login and pass --creds directly to each push command instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 12:17:55 +00:00
59b6728ce8 Add debug output to identify which buildah command hangs
Some checks failed
CI / build (pull_request) Successful in 31s
Deploy / deploy (push) Failing after 1m11s
Remove unnecessary registries.conf write (host already has it).
Add set -ex and echo markers between commands to pinpoint the hang.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:33:37 +00:00
4e3e17ced4 Use v2 TOML format for registries.conf
All checks were successful
CI / build (pull_request) Successful in 31s
Match the format already used on the runner host.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:31:54 +00:00
bb23f2e3a1 Add insecure registry config for buildah
All checks were successful
CI / build (pull_request) Successful in 31s
--tls-verify=false on login/push alone was not sufficient to prevent
the deploy from hanging. Register git.kimchi as an insecure registry
via registries.conf and add --tls-verify=false to buildah bud as well.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:31:01 +00:00
ec4bc9bb82 Add --tls-verify=false to buildah steps
Some checks failed
CI / build (pull_request) Successful in 49s
Deploy / deploy (push) Has been cancelled
2026-03-16 11:05:08 +00:00
tas
4a2d199904 Update .gitea/workflows/ci.yaml
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-03-16 10:59:04 +00:00
58bf89f2f2 Fix level-select dropdown loading into game instead of editor
Some checks failed
CI / build (pull_request) Failing after 0s
Deploy / deploy (push) Has been cancelled
When the editor is active, the JS shell level-select dropdown was
unconditionally switching to MODE_PLAY. Now it detects MODE_EDITOR
and calls editor_load() to load the selected level into the editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 10:50:51 +00:00
tas
4bef8f37b4 Update .gitea/workflows/deploy.yaml
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-03-15 17:50:59 +00:00
tas
096b0eb096 Update .gitea/workflows/ci.yaml
Some checks failed
Deploy / deploy (push) Failing after 0s
2026-03-15 17:50:35 +00:00
tas
89e0c483ad Update .gitea/workflows/ci.yaml
Some checks failed
Deploy / deploy (push) Failing after 1s
2026-03-15 17:35:50 +00:00
tas
7d0e134a56 Update .gitea/workflows/deploy.yaml
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-03-15 17:25:26 +00:00
tas
198f639289 Update .gitea/workflows/deploy.yaml 2026-03-15 17:25:11 +00:00
tas
f71d140af3 Install buildah in deploy workflow
Some checks failed
Deploy / deploy (push) Failing after 1m41s
2026-03-15 17:15:49 +00:00
tas
651ac7703f use buildah for build
Some checks failed
Deploy / deploy (push) Failing after 6s
2026-03-15 16:56:18 +00:00
587fd210a2 Fix #13: optimize deploy with multi-stage Containerfile
Some checks failed
CI / build (pull_request) Failing after 1m13s
Deploy / deploy (push) Failing after 55s
Move the WASM build into a multi-stage Containerfile so the emscripten
compilation happens inside the Docker build. This eliminates the separate
container action step, enables Docker layer caching for faster rebuilds,
and makes the Containerfile self-contained.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 14:47:56 +00:00
79e9d0e2ad Show current score in top-right corner of HUD
Some checks failed
Deploy / deploy (push) Failing after 58s
Display the player's current score using the font renderer,
right-aligned with an 8px margin from the top-right screen edge.

Closes #5

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:43:19 +00:00
81ebbd9eec Fix score formula to match design specification
Some checks failed
Deploy / deploy (push) Has been cancelled
The score computation used wrong weights and terms compared to DESIGN.md.
Updated to: enemies_killed*100 + levels_completed*500 - deaths*200 - time_elapsed

Closes #6

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:42:56 +00:00
90e3d5aec0 Add free downward jetpack on double-tap down mid-air
Some checks failed
Deploy / deploy (push) Has been cancelled
Double pressing the down arrow while airborne triggers a free downward
dash that doesn't consume jetpack charges. Uses a 0.3s window for the
double-tap detection, resets on landing.

Closes #9

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:42:31 +00:00
68856fb8c5 add deploy action
Some checks failed
Deploy / deploy (push) Failing after 3m54s
2026-03-14 19:54:21 +00:00
7605f0ca8c Add new level transition state machine 2026-03-14 16:29:10 +00:00
6d64c6426f Fix atmosphere wind particles appearing inside Mars station
mars02.lvl (Mars Base interior) incorrectly used PARALLAX_STYLE 5
(Mars surface), causing atmosphere dust particles to spawn indoors.
Changed to PARALLAX_STYLE 2 (Interior) to match the level's setting.

Closes #4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 15:53:23 +00:00
93ae351959 Add Gitea Actions CI workflow for pull request builds 2026-03-14 14:47:56 +00:00
root
c57ac68a04 Fix atmosphere particles clustering on left side of screen
When wind is zero or near-zero, dust particles were always spawning at
the left viewport edge (the "upwind" edge for wind >= 0). Without wind
force to carry them across, they accumulated on the left side. Now
particles spawn across the full viewport when wind is calm (< 5 px/s²),
with random drift directions for even distribution.

Closes #2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 14:14:52 +00:00
Thomas
5793af4896 Configure analytics URL and obfuscate API key
Set the Horchposten backend URL in the shell data attribute and replace
the plaintext key lookup with XOR-encoded byte arrays decoded at runtime,
so the API key never appears as a readable string in source, HTML, or the
compiled WASM binary.
2026-03-08 19:52:34 +00:00
tas
702dbd4f9a Merge pull request 'Add analytics integration with Horchposten backend' (#1) from feature/analytics-integration into main
Reviewed-on: #1
2026-03-08 19:42:58 +00:00
322dd184ab Fix review issues in analytics integration
1. Race condition: session_end now waits for an in-flight
   session_start promise before sending, so quick restarts
   don't drop the end call.

2. beforeunload: replaced sendBeacon (which can't set headers)
   with fetch(..., keepalive: true) so the X-API-Key header
   is included and the backend doesn't 401.

3. Stats double-counting: removed stats_record_damage_dealt
   and stats_record_kill from damage_entity (which was called
   for all damage including player deaths). Now only recorded
   at player-sourced call sites (projectile hits, stomps).

4. Removed const-cast: analytics_session_end now takes
   GameStats* (non-const) since stats_update_score mutates it.

5. beforeunload now uses stashed stats from the last C-side
   session_end call instead of hardcoded zeroes. Session ID is
   cleared synchronously before async fetch to prevent races.

6. Removed unused stdint.h include from stats.h.
2026-03-08 19:29:11 +00:00
root
a23ecaf4c1 Add analytics integration with Horchposten backend
Implements session-based analytics tracking that sends gameplay
stats to the Horchposten API. Adds stats.{c,h} for accumulating
per-session metrics (kills, deaths, shots, dashes, jumps, pickups,
damage, time) and analytics.{c,h} with EM_JS bridge for fetch()
calls to the backend. Client ID is persisted in localStorage.
Session start/end hooks are wired into all game lifecycle events
(level transitions, restart, quit, tab close via sendBeacon).
Analytics URL/key are configured via data attributes on the canvas
container. Non-WASM builds compile with no-op stubs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:11:39 +00:00
Thomas
4407932a2d Add Mars surface atmosphere particels 2026-03-05 19:21:41 +00:00
Thomas
635869f226 Update shell 2026-03-05 17:38:46 +00:00
Thomas
b54a53b9c8 Fix jetpack use resetting recharge 2026-03-05 17:24:20 +00:00
Thomas
27691a28dd Improve levlegen 2026-03-05 17:22:21 +00:00
Thomas
6b32199f25 Disable origin cache headers to prevent stale JS/WASM mismatch
static-web-server's default cache-control sends max-age=31536000 (1 year)
for .js files but only 1 day for .wasm. After redeployment, Cloudflare CDN
serves the cached old .js with a fresh .wasm, causing EM_ASM address table
mismatches and runtime crashes. Disable built-in cache headers at the origin
so Cloudflare respects new content on each deploy.

Also update AGENTS.md: add deploy commands, fix emsdk path, document the
Cloudflare cache-purge requirement, and correct stale MAX_ENTITY_SPAWNS
and MAX_EXIT_ZONES values.
2026-03-02 21:33:07 +00:00
Thomas
b3055f4bd3 Add TODO: elevator and teleporter level transition styles 2026-03-02 21:07:30 +00:00
Thomas
a97c9b5aaf Add TODO: skip spacecraft transition for non-surface levels 2026-03-02 21:06:47 +00:00
Thomas
46209b94bb Add TODO: Mars Surface ambient dust particles 2026-03-02 21:03:16 +00:00
Thomas
b5cdf1804f Add bouncer launch pad to design document 2026-03-02 21:02:07 +00:00
Thomas
492f13306d Add TODO: editor level select should also load into game 2026-03-02 20:58:03 +00:00
Thomas
af0a9904c2 Fix laser beam blocked by own tile, consolidate enemy-type checks
Beam raycast now skips the tile the turret is mounted on, so
wall-embedded laser turrets can shoot outward.

Extract entity_is_enemy() into engine/entity.c as single source
of truth for enemy-type checks. Replaces triplicated type lists
in level.c, drone.c, and projectile.c that caused the collision
bug when new enemy types were added.
2026-03-02 20:56:45 +00:00
Thomas
196b4f35b9 Fix missing collision for charger, spawner, and laser turret
All three new entity types were absent from the hardcoded enemy-type
checks in is_enemy() (contact damage + projectile hits), homing
projectile targeting, and drone targeting. Also adds proper death
particle colors for charger (orange) and spawner (purple).
2026-03-02 20:50:44 +00:00
Thomas
5f899f61c6 Add pixel art sprites for charger, spawner, and laser turret
Replace colored-rect placeholder rendering with proper 16x16
spritesheet art. Charger: orange armored rhino with horn, eyes,
walk cycle (row 7). Spawner: purple hive pod with glowing core
and tendrils (row 8). Laser turret: angular metallic housing
with red lens that brightens when firing (row 8). All three
retain colored-rect fallback when spritesheet is unavailable.
2026-03-02 20:45:21 +00:00
Thomas
7b1d39f522 Ignore local deploy script 2026-03-02 20:32:28 +00:00
Thomas
1ef84cd3b4 Add Mars Base generator, mars03 boss arena, and Mars campaign polish
Dedicated Mars Base generator with 6 segment types (entry, shaft, corridor,
turret hall, hive, arena), depth-scaled difficulty, and exit to boss arena
after 2 generated levels. Mars themes integrated into all 7 generic segment
generators. Full level chain: moon03 → mars01 → mars02 → mars_base (×2) →
mars03 → station.

Also: jetpack fuel pickup preserves recharge progress, depth counters reset
on game loop, NULL checks on entity spawns, charger charge timeout, bg
decoration in Mars Base generator.
2026-03-02 20:27:29 +00:00
Thomas
74cd70738d Fix empty target level on mars02 2026-03-02 19:50:29 +00:00
Thomas
d0853fb38d Add pause menu, laser turret, charger/spawner enemies, and Mars campaign
Implement four feature phases:

Phase 1 - Pause menu: extract bitmap font into shared engine/font
module, add MODE_PAUSED with Resume/Restart/Quit overlay.

Phase 2 - Laser turret hazard: ENT_LASER_TURRET with charge/fire/
cooldown state machine, per-pixel beam raycast, two variants (fixed
and tracking). Registered in entity registry with editor icons.

Phase 3 - Charger and Spawner enemies: charger ground patrol with
detect/telegraph/charge/stun cycle (2s charge timeout), spawner that
periodically creates grunts up to a global cap of 3.

Phase 4 - Mars campaign: two handcrafted levels (mars01 surface,
mars02 base), mars_tileset.png, PARALLAX_STYLE_MARS with salmon sky
and red mesas, THEME_MARS_SURFACE/THEME_MARS_BASE for the procedural
generator with per-theme gravity/tileset/parallax. Moon campaign now
chains moon03 -> mars01 -> mars02 -> victory.

Also fix review findings: deterministic seed on generated level
restart, NULL checks on calloc in spawn functions, charge timeout
to prevent infinite charge on flat terrain, and stop suppressing
stderr in Makefile web-serve target so real errors are visible.
2026-03-02 19:34:12 +00:00
Thomas
e5e91247fe Add proper Containerfile and update Makefile to include the web shell 2026-03-02 17:35:36 +00:00
Thomas
1961cd353b Fix on_ground flickering on one-way platform tiles
The platform collision check in resolve_tilemap_y required vel.y > 0
(strictly falling), so once landing zeroed vel.y the check would fail
next frame. Gravity would add a tiny downward velocity, the platform
would catch it again, and the cycle repeated — causing animation
jitter and repeated landing dust particles.

Change the condition to vel.y >= 0 so platforms resolve when resting.
Extend the ground-stick anti-flicker probe to also detect TILE_PLATFORM
tiles (was TILE_SOLID only), with a proximity guard to preserve
jump-through-from-below behavior.
2026-03-01 18:33:45 +00:00
Thomas
302bcc592d Rebind Space to jump, gate editor behind localStorage flag
Space is now the alternate jump key (was shoot). Web shell shows
game controls by default and hides editor UI unless
localStorage.show_editor is set to 'true'. The E key and ?edit URL
are blocked when the editor is not enabled.

Also fix Makefile to track web/shell.html as a WASM link dependency
so shell changes trigger a rebuild.
2026-03-01 18:24:21 +00:00
Thomas
3584aace75 Adjust spacecraft thruster particle origin up and right by 8px 2026-03-01 18:12:23 +00:00
Thomas
bb0b9ddce1 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.
2026-03-01 18:06:32 +00:00
Thomas
fdba6ef077 Add Earth sprite to moon parallax background
Render earth.png as a non-tiling feature sprite in the moon sky,
drawn between the far starfield and near crater terrain layers.

Introduce ParallaxFeature struct for single-instance background
sprites that scroll with the camera but never tile. Clean up the
feature reference in parallax_free to prevent stale pointers
between level transitions.
2026-03-01 17:49:14 +00:00