How joeliranzo/luango works
Project Type & Purpose
• Luango Engine is a lightweight, modular game engine written in Go with embedded Lua scripting (via Gopher-Lua) designed for performance and flexibility. Its purpose is to provide game developers with a simple yet powerful platform that supports modding through Lua scripts.
• The README shows that it handles rendering (using Ebiten), audio (using Beep), input, and a mod loader that automatically loads Lua scripts. Future roadmap items include an ECS system and enhanced modular engine modules.
Main Components
a. Engine Core:
– The Go-based core (represented by main.go and go.mod) that bootstraps the application.
– Core engine modules for graphics, input, and audio which, although not neatly separated into individual directories in the file tree, are implied through the README and TECHNICAL documentation.
b. Lua Scripting Integration:
– The embedded Lua interpreter (Gopher-Lua) that supports scripting.
– The Lua API exposing functions (log, debug, play_sound, move_player, etc.) and game hooks like on_start() and on_update() located within the mod/game/init.lua.
c. Mod Loader & Scripting Modules:
– The mod folder (with subdirectories like mod/player, mod/enemy, mod/items, and mod/game) which holds various Lua scripts.
– The mod loader component that scans the mod directory and loads the Lua scripts.
d. Asset Management:
– The assets directory including images (sprites) and sounds (e.g., assets/sounds/sonidito.wav) that the engine will load and render/play as needed.
e. (Planned/Upcoming) Infrastructure:
Relationships & Data Flow
• Entry point (main.go) initializing the Engine Core.
• Graphics/Rendering Module (using Ebiten)
• Input Module (using Ebiten’s input handling)
• Audio Module (playing .wav files via Beep)
• Asset management as a supporting service providing images and sounds to the rendering and audio modules.
Technologies & Architectural Patterns
• Labels for Go, Lua (Gopher-Lua), Ebiten, and Beep where appropriate.
• Modular, event-driven design and mention that the design is “ECS-ready” (even if the ECS layer is planned) since it influences how components interact.
• Mod loader subsystem that autonomously loads Lua modules from multiple directories (mod/player, mod/enemy, mod/items, etc.).
Key Elements to Label
• Each main component should have clear labels (“Engine Core”, “Rendering Module (Ebiten)”, “Input Module (Ebiten)”, “Audio Module (Beep)”, “Lua Scripting Engine”, “Mod Loader”, “Asset Manager”).
• From main.go to each subsystem.
• From Engine Core to Lua (showing initialization and hook invocation).
• From Lua scripts to engine subsystems (indicating how game events like on_start() and on_update() drive behavior).
• Optionally, add annotations for planned features (like ECS) to provide context for future development extensions.
Conclusion
– A clear high-level view linking the Go backend application with its various game subsystems.