Repository navigation
Add Runner game: complete platformer with physics, obstacles, and HUD - #2
Merged
Merged
Conversation
…ugador: fisica y animacion) con pruebas QA Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDoHNiNLnABtsZ7Z5gjs93
…o web de assets - Obstaculos/GestorObstaculos: aparicion aleatoria (con semilla) por la derecha, destruccion al salir - Partida: puntuacion por distancia, velocidad creciente, GameOver y reinicio - Hud: puntos, mejor, velocidad y mensajes con Dibujante::Texto - CMake: runner nativo y web (index.html) con --preload-file assets@/assets; demo 'juego' solo nativo - CI: publica y verifica index.data (Test 3.4) - Jugador: caja de colision ajustada al area visible del sprite - Tests QA 3.1-3.3 (tests/test_partida.cpp) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDoHNiNLnABtsZ7Z5gjs93
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
Implements a complete horizontal runner game ("Runner") built on top of the BasicGameEngine motor. The game features a player character that must jump over obstacles while the world accelerates, with score tracking and game-over mechanics.
Key Changes
Texture System (R1): Added
Textura.*for BMP loading with SDL2 (no SDL_image dependency), supporting color-key transparency and alpha channels. Includes safe error handling withUltimoError()reporting.Player Physics & Animation (R2): Implemented
Jugador.*with:Obstacles & Collision (R3.1-R3.2): Created
Obstaculos.*with:GestorObstaculos: generates obstacles at random intervals, moves them left at constant velocity, destroys them when off-screenGame Logic (R3): Added
Partida.*to manage:HUD (R3.3): Implemented
Hud.*for rendering:Main Game Loop: Added
runner.cppintegrating all modules into the motor'sActualizar(dt)andPintar()hooks, with keyboard input handling (SPACE/UP for jump).Asset Generation: Included
tools/generar_avatar.pyto procedurally generate the 6-frame sprite sheet (no external image files needed).Build System: Updated
CMakeLists.txtto compile Runner for both native and Emscripten targets, with asset preloading for web.Comprehensive QA: Added two test suites:
tests/test_jugador.cpp: 4 tests covering texture loading, transparency, physics, and animationtests/test_partida.cpp: 3 tests for obstacle generation/destruction, collision accuracy, and HUD stabilityNotable Implementation Details
https://claude.ai/code/session_01XDoHNiNLnABtsZ7Z5gjs93