Rework platformer into Castlevania-style castle labyrinth#13
Merged
Conversation
Complete overhaul of the platformer game mode: Game logic (breakpoint-platformer): - Enemy system: Skeleton (patrol), Bat (sine-wave), Knight (2HP patrol), Medusa (float + projectiles) with per-type AI tick functions - Melee combat: whip attack with hitbox, active frames, cooldown, damage, invincibility frames, death/respawn with time penalty - Course generation: 300x30 tile grid, 15 rooms with branching paths (upper=safer/longer, lower=more enemies/shorter), room templates (Corridor, Staircase, TowerClimb, CathedralHall, CryptDepths, etc.) - Rubber banding: leader gets +50% enemies, last place gets better items - 7 power-ups: HolyWater, Crucifix, SpeedBoots, DoubleJump, ArmorUp, Invincibility, WhipExtend with Mario Kart-style tiered selection - Race-only mode at 20Hz tick rate, "Castlevania Rush" name - Compact u8 Tile serialization to stay under 64KB protocol limit Client rendering (breakpoint-client): - Sprite/texture pipeline: new sprite.vert/frag shaders, texture atlas support with NEAREST filtering, Quad mesh, Sprite material type - Sprite atlas module with named regions, animation support, 41 sprites - Camera: tighter Z=-15 framing, 3-unit lead in race direction - Gothic theme: dark stone, blood-red spikes, gold finish - 5 new audio events: Attack, Hit, Death, EnemyKill, Checkpoint - HUD: HP hearts, death counter, active power-up, race position 674 tests passing, 0 clippy warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete overhaul of the platformer game mode: Game logic (breakpoint-platformer): - Enemy system: Skeleton (patrol), Bat (sine-wave), Knight (2HP patrol), Medusa (float + projectiles) with per-type AI tick functions - Melee combat: whip attack with hitbox, active frames, cooldown, damage, invincibility frames, death/respawn with time penalty - Course generation: 300x30 tile grid, 15 rooms with branching paths (upper=safer/longer, lower=more enemies/shorter), room templates (Corridor, Staircase, TowerClimb, CathedralHall, CryptDepths, etc.) - Rubber banding: leader gets +50% enemies, last place gets better items - 7 power-ups: HolyWater, Crucifix, SpeedBoots, DoubleJump, ArmorUp, Invincibility, WhipExtend with Mario Kart-style tiered selection - Race-only mode at 20Hz tick rate, "Castlevania Rush" name - Compact u8 Tile serialization to stay under 64KB protocol limit Client rendering (breakpoint-client): - Sprite/texture pipeline: new sprite.vert/frag shaders, texture atlas support with NEAREST filtering, Quad mesh, Sprite material type - Sprite atlas module with named regions, animation support, 41 sprites - Camera: tighter Z=-15 framing, 3-unit lead in race direction - Gothic theme: dark stone, blood-red spikes, gold finish - 5 new audio events: Attack, Hit, Death, EnemyKill, Checkpoint - HUD: HP hearts, death counter, active power-up, race position 674 tests passing, 0 clippy warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Load atlas texture at app startup via HtmlImageElement onload callback - Rewrite platformer_render.rs: all objects now use MeshType::Quad + MaterialType::Sprite instead of 3D Cuboid/Sphere meshes - Animated sprite selection per AnimState (player) and EnemyType - HP hearts rendered as sprite quads above each player - Per-tile sprite mapping, power-up sprite mapping, projectile sprites - Fix bridge.rs PlayerId type (u64, not u32) for WASM build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The quad was facing -Z but the camera is at Z=-15 looking toward Z=0 (+Z direction). This caused the sprite UVs to be mirrored horizontally, making the game appear right-to-left. Fix by winding the quad CCW when viewed from +Z so the front face is toward the camera. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Camera was at Z=-15 looking toward Z=0 (+Z direction), which in look_at_rh flips the X axis on screen, causing the entire game to render right-to-left with swapped controls. Moved camera to Z=+15 so it looks along -Z where +X = right on screen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete 10-phase graphics upgrade for the platformer: - 512x512 sprite atlas with 129 named sprites and animation tables - 3-layer parallax scrolling backgrounds with custom GLSL shaders - Multi-frame SpriteAnimation for all player/enemy/tile animations - Auto-tiling for stone bricks (neighbor-based edge detection) - Animated torches, checkpoints, finish gates - Particle system (256-cap ring buffer): dust, sparks, blood, fire, smoke, magic effects with per-type colored powerup bursts - Screen shake on damage/death, screen flash on hits/kills - Attack trail afterimages, speed boots green trail, invincibility glow - Death fade-out and respawn fade-in transitions - Tile culling (only render visible columns around camera) - Enemy death animations with fade-out Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…her, post-FX, particles, HUD Complete 10-phase visual upgrade for the platformer game mode: - Water shader with waves, caustics, and gameplay (movement slow + buoyancy) - Dynamic torch lighting (16-light array, flicker, dark atmosphere) - Whip arc shader and projectile trail effects with impact sparks - Squash/stretch animation (1024x512 atlas, per-player visual state) - Weather system (rain, fog) and foreground parallax layer - CRT + bloom + vignette post-processing via render-to-FBO pipeline - Enhanced particle system (512 cap, 6 new effects, continuous emission) - HUD: powerup timer bar, course minimap canvas, checkpoint toast - Theme-configurable torch ambient, water color, and post-FX intensities - Context loss resilience for post-process FBO Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the flat 300×30 horizontal strip with a 192×120 tile castle labyrinth (6×5 grid of 32×24 rooms, ~22 rooms per map). Rooms are connected via MST + extra edges for multiple routes, themed by distance from start (Entrance → Corridor → GreatHall/Library → Armory/Chapel/Crypt → Tower/Dungeon → ThroneRoom). Includes RLE tile compression, 2D checkpoint system, room-distance rubber-banding, camera/culling for vertical exploration, room-graph minimap, and sprite V-flip fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ting, parallax, post-FX, weather, HUD Phases 5-10 of the anime dark fantasy visual polish: - Phase 5: Slash arc + magic circle shaders, hit freeze on enemy kills - Phase 6: Multi-layer water with caustics, foam, depth absorption, Fresnel - Phase 7: 32 colored lights, per-room ambient color, god rays shader - Phase 8: 6-layer parallax with sway and crossfade support - Phase 9: Multi-pass post-processing: bloom, color grading, chromatic aberration, film grain - Phase 10: Weather system (rain/lightning/fog/ambient particles per room), procedural health bar, room name reveal toast New shaders: slash_arc, magic_circle, godrays, fog_layer, health_bar (10 files). Expanded sprite.frag to 32 colored lights, rewrote water.frag and postprocess.frag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix atlas dimensions (2048x1024→1024x512, 32x64→16x32 sprites) to match actual PNG on disk, fixing garbled/invisible sprites. Fix depth_mask leak from parallax rendering that silently disabled depth writes for all subsequent sprites. Add MBAACC (Melty Blood) visual techniques: - Binary alpha (step 0.5) for crisp pixel outlines - Dark pixel outlines on characters/enemies via existing shader - Explicit Z-layer painter's algorithm (8 depth layers) - Character shadows (squashed dark silhouettes) - BlendMode enum (Normal/Additive/Subtractive) on sprites - Palette texture infrastructure (deferred activation) - Per-material GL state restoration after every draw call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restyle the platformer to match GBA-era Castlevania (Circle of the Moon, Curse of Darkness) with dark ambient, high-contrast torch lighting, and authentic color processing. Color tuning across all rooms: darker ambient (~33% reduction), distinctly orange torch fire, higher contrast/lower saturation color grading, per-room tile tints (gray-mauve castle, teal-green underground, warm sandstone sacred, blue-gray fortress), darker parallax with purple tint, more atmospheric fog and dust particles. Shader authenticity: GBA 5-bit posterization (floor * 31.0), 3-point color ramp mapping (mauve shadows -> bronze midtones -> gold highlights blended 70% with original texture), dark plum pixel outlines matching Castlevania sprite style. Theme defaults: torch_ambient 0.06, bloom 0.55, vignette 0.7, scanline 0.15. VFX recolored: orange-gold slash arcs, ghostly green projectiles, orange fire speed trails. Graduated film grain for dark rooms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add visual-audit.spec.js Playwright test that captures 6 platformer screenshots with color histograms for automated visual analysis. Brighten the Castlevania GBA/DS restyle based on Gemini feedback: - torch_ambient 0.06→1.0, radius 6.5→14.0, intensity 1.2→1.8 - Room ambient colors raised to 0.45-0.90 range (was 0.05-0.20) - Tile tints boosted above 1.0 for sprite overdrive brightness - Color ramp shadow/mid lifted, posterize 31→16 for authentic GBA banding - Contrast neutralized (1.0), saturation raised to 1.05 (GBA LCD compensation) - Shadow grade tints lightened to 0.78-0.92 to preserve dark detail - Vignette 0.7→0.20, scanlines 0.15→0.05, CRT curvature 0.12→0.08 - Parallax alpha reduced for better tile/background contrast - Shader min light floor: max(light, u_ambient*0.4) - Fog color brightened to [0.12, 0.10, 0.18] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix player/enemy/VFX sprite atlas↔Rust frame count mismatches (phases 1-2) - Fix parallax background atlas reference and per-room tinting (phase 3) - Tune visual defaults: torch_ambient 0.15, posterize 48, ramp blend 0.35 (phase 4) - Increase scene capacity to 2048 and reset object IDs each frame (phase 5) - Add dynamic vertex batching with sprite_batch shaders for ~100x fewer draw calls (phase 6) - Add TileCache for O(1) static tile lookups instead of per-frame HashMap (phase 7) - Add camera sub-pixel snapping at 1/16 pixel grid for crisp pixel art (phase 8) - Reduce weather particle counts and widen rain sprites (phase 9) - Add per-room fog color propagation through shaders (phase 10) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename u_vp to u_mvp in sprite_batch.vert so the Rust uniform lookup actually finds it — tiles were invisible because the VP matrix was never uploaded to the batch shader - Disable parallax background layers that sampled character/tile sprites from the atlas instead of dedicated background content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
cargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepasses (1 pre-existing golf proptest failure)wasm-pack buildGenerated with Claude Code (https://claude.com/claude-code)