Commit Graph

4 Commits

Author SHA1 Message Date
Adolfo Reyna
53a2fb046b feat: add 6 lua games for basic1 console
- Pong: 2-player paddle and ball game with spin mechanics
- Flappy Bird: gravity physics, obstacle avoidance
- Breakout: paddle control, brick grid, collision detection
- Simon Says: sequence memory, animation timing
- Memory Match: pair matching, flip animations, grid layout
- Tetris: falling blocks, grid system, line clearing
- Asteroids: vector math, rotation, projectiles, enemy spawning

All games follow API conventions with state machines, touch input,
frame-based animation, and persistent game.vars state management.
2026-02-12 19:18:51 -05:00
Adolfo Reyna
47fc02f05c Fix frame update logic and emulator support
- Fix basic1.cpp loop to handle set_frame_updates(true) correctly with sleep
- Update emulator loop for concurrent input and frame updates
- Update emulator for SFML 3.0 compatibility
- Add INPUT.FRAME_TICK constant to Lua bindings
- Enable frame updates in snake.lua example
2026-02-10 23:27:31 -05:00
Adolfo Reyna
2a472fc29f Add frame tick system for continuous animation
- Added INPUT_FRAME_TICK event type to input_event.h
- Added wants_frame_updates() virtual method to Game base class
- Implemented frame tick logic in main loop (basic1.cpp and emulator/main.cpp)
- Added Lua bindings: game.set_frame_updates(bool) and INPUT.FRAME_TICK
- Updated LuaGame to support frame updates via registry flag
- Updated ball.lua to use continuous frame updates for smooth animation
- Both hardware and emulator now support continuous animation for physics/games
2026-02-07 13:20:10 -05:00
Adolfo Reyna
e6e4eca188 Add Lua 5.4 scripting integration for dynamic game loading
- Integrated Lua 5.4 engine (32-bit mode for embedded ARM)
- Created LuaGame wrapper class implementing Game interface
- Added C++ bindings exposing renderer, game state, and input to Lua
- Implemented SD card loader for automatic .lua game discovery
- Updated GameLauncher to support std::function for lambda captures
- Made Game class members public for Lua bindings access
- Added example Lua games: counter, snake, bouncing ball
- Included comprehensive API documentation

Games can now be written as .lua text files on SD card and loaded
without recompilation. Build size: 747KB UF2, Lua VM uses ~50-80KB RAM.
2026-02-07 11:56:03 -05:00