Commit Graph

2 Commits

Author SHA1 Message Date
Adolfo 4e4e815995 feat(LuaGame): fullscreen 320x480, no toolbar, on-demand refresh for solitaire
- Manifest: HideStatusBar flag, version 0.2.0
- app_on_show: remove toolbar, get display resolution via lv_display_get_horizontal_resolution, allocate 320x480 framebuffer in PSRAM
- Dynamic game_w/h, fb_w/h in AppCtx, set_px/fill_rect use dynamic size
- touch_event_cb uses dynamic max_w/h
- On-demand refresh: l_game_set_frame_updates sets wants_frame_updates flag
  - Pico games without set_frame_updates (solitaire) only redraw on touch events
  - Continuous games (breakout, pong) with set_frame_updates(true) use FRAME_TICK every 16ms
  - Initial draw after init for on-demand games
  - FPS tracking only when redraw occurs
- Solitaire optimized: LEFT 37->4, GAP 10->4, TOP_Y 30->4, TAB_Y 98->60, removed draw_terminal_chrome (outer frame + title bar + window controls)
- Uploaded optimized solitaire via /fs/upload?path=/sdcard/lua/solitaire.lua (24430 bytes)
- Tested fullscreen: display 320x480, no toolbar, screenshot shows chrome removed, white pixels 3197 (cards only)
- Logs show no continuous FPS spamming for solitaire (on-demand)
2026-07-31 13:12:32 -04:00
Adolfo 827fdb41c2 feat(LuaGame): Lua interpreter game engine with audio, 17 FPS, 4.5x ball speed
- Embed Lua 5.4.7 source to avoid missing symbols (clearerr, clock, getenv, etc)
- Provide local stubs for missing libc and avoid unexported LVGL cache APIs
- Fix float handling in sys.* bindings (checknumber vs checkinteger)
- Move Lua init and game loop to dedicated 16K FreeRTOS task to avoid GUI 4K stack overflow
- Implement sys API: clear, print (8x8 bitmap font direct FB), rect, circle, line, touch, sfx, tone
- Audio via SfxEngine (SfxId mapping, playNote for tone)
- Ball speed 2 -> 4.5, FPS counter (~17 FPS after direct FB text optimization)
- Supports loading from /sdcard/lua/breakout.lua and embedded fallback
- Verified symbols: 0 missing, builds esp32s3, installs on 192.168.68.107
2026-07-31 12:52:02 -04:00