Add CLAUDE.md guide and pixel game hub launcher#21
Add CLAUDE.md guide and pixel game hub launcher#21blackboxprogramming wants to merge 4 commits intomainfrom
Conversation
- BlackRoad Harvest: Stardew Valley-inspired farming sim with crops, seasons, shop, day/night cycle - BlackRoad Creatures: Pokemon-inspired RPG with 8 creatures, battles, type matchups, capture, leveling - BlackRoad Pets: Webkinz-inspired virtual pet world with 6 pets, 5 rooms, minigame, shop, decor - BlackRoad Runner: Mario-inspired platformer with 3 worlds, physics, enemies, power-ups, coins - Game hub launcher page linking all worlds - Comprehensive CLAUDE.md documenting repo structure, conventions, and workflows https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9
Creatures (Pokemon): Expanded to 50x40 overworld with 5 zones, healing center, Pokedex, 3 trainer battles, item shop, PP system, critical hits, smart AI, zone-specific encounter tables, and level-up animations. Harvest (Stardew): Added weather system (rain/storm/snow), 4 NPCs with relationship/gifting, fishing minigame with 4 fish types, animals (chickens/cows), crop quality system, particle effects, fireflies, and expanded 30x22 world. https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9
Pets (Webkinz): Added friendship/level system (1-10), pet naming, 3 minigames (Catch Treats with combos, Memory Match, Rhythm Tap), dress-up system with accessories, Adventure Room for exploration, 10+ achievements, enhanced pet AI with mood emotes, daily login bonus, wallpapers, and more shop items. Runner (Mario): Expanded to 5 worlds including Ice World and Castle/Boss. Added fire flower power-up with fireball shooting, piranha plants, flying goombas, bullet bills, boss fight, moving platforms, variable jump height, coyote time, sprint, checkpoints, pipe warps to bonus rooms, 3-layer parallax scrolling, and chain stomp score multipliers. https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9
|
|
||
| function showBanner(text) { | ||
| const banner = document.getElementById('level-banner'); | ||
| banner.innerHTML = text.replace('\n', '<br>'); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 days ago
To fix the problem, we should ensure that every newline character in text is converted to an HTML line break, not just the first one. The idiomatic way in JavaScript is to use a regular expression with the global flag: text.replace(/\n/g, '<br>'). This addresses the specific CodeQL concern about only the first occurrence being replaced.
The best minimal fix, without changing behavior otherwise, is to modify line 2039 in blackroad-pixel/games/mario/index.html so that text.replace('\n', '<br>') becomes text.replace(/\n/g, '<br>'). No additional imports or helper methods are needed, and the function’s external interface stays the same—only the handling of multiple newlines is improved. This change is fully contained within the showBanner function and does not affect other code.
| @@ -2036,7 +2036,7 @@ | ||
|
|
||
| function showBanner(text) { | ||
| const banner = document.getElementById('level-banner'); | ||
| banner.innerHTML = text.replace('\n', '<br>'); | ||
| banner.innerHTML = text.replace(/\n/g, '<br>'); | ||
| banner.style.display = 'block'; | ||
| setTimeout(() => { banner.style.display = 'none'; }, 3000); | ||
| } |
Summary
This PR establishes the foundational documentation and interactive UI for the BlackRoad OS Bridge repository. It introduces
CLAUDE.mdas the central AI assistant guide and creates a polished game hub launcher for the pixel worlds ecosystem.Key Changes
CLAUDE.md - Comprehensive 244-line guide for AI assistants covering:
blackroad-pixel/games/index.html - Interactive game hub featuring:
Implementation Details
Notes
https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9