How penquinz01/lazzo-engine works
1. Repo shape and build boundaries
This repository is split into two main Visual Studio projects: Lazzo/ is the engine code, and SandBox/ is a small test application that exercises the engine. premake5.lua and GenerateProject.bat are the build-generation layer, while vendor/ holds third-party dependencies.
2. Engine core as the reusable boundary
The engine lives under Lazzo/src/Lazzo/ and is structured as a reusable runtime library rather than a standalone game. The key public-facing pieces are Application, Window, Events, GraphicsAPI, UI, and Log, with Core.h and Lazzo.h likely acting as umbrella/include and export-definition headers.
3. Application lifecycle and main loop
Application.cpp/.h appears to define the engine-owned runtime loop and high-level app lifecycle. EntryPoint.h suggests the executable entry point is centralized in the engine and calls into a user-defined application class, which is the usual boundary between engine startup and game/app code.
4. Sandbox as the consumer app
SandBox/src/SandboxApp.cpp is the testbed for engine features. Architecturally, this is where an application built on top of the engine would plug in custom behavior without modifying the engine core.
5. Windowing and platform integration
Window/Window.cpp/.h is the abstraction over native window creation and event pumping. The README says SDL is used for window and input handling, so SDL is the platform boundary where OS events enter the engine.
6. Event system as the input/data translation layer
Window/Events/ contains the engine’s internal event types, such as KeyDownEvent. This layer likely translates SDL callbacks/events into engine-specific event objects so the rest of the engine does not depend directly on SDL types.
7. Rendering backend abstraction
Window/GraphicsAPI/GraphicsAPI.h plus OpenGLAPI.cpp/.h indicate a backend interface with at least one concrete implementation: OpenGL. GraphicsFactory.h suggests the engine selects or constructs the active rendering backend through a factory boundary, keeping higher-level code independent of the API choice.
8. UI integration on top of the graphics context
Window/UI/ImguiUI.cpp/.h shows Dear ImGui integration as an engine subsystem layered on top of the window and graphics context. This is probably used for editor/debug UI and depends on the OpenGL/SDL setup being initialized first.
9. Logging as a cross-cutting service
Log.cpp/.h is a shared diagnostic subsystem used across engine modules. It is likely initialized early and available to both engine internals and sandbox code for runtime tracing and debugging.
10. Dependency and initialization flow
The runtime order implied by the structure is: build system generates the solution, the executable starts through the engine entry point, Application creates/owns the Window, the Window initializes SDL and an OpenGL context via the graphics API layer, then the main loop processes SDL events, dispatches engine events, renders, and optionally draws ImGui UI.
11. Technology choices that affect architecture
The important external technologies are C++, SDL2, OpenGL, and ImGui. SDL is the platform abstraction for windowing/input, OpenGL is the rendering backend, and ImGui is an immediate-mode UI layer tied to the graphics context.
12. Current maturity and planned expansion
The README roadmap shows the engine is still early-stage: only core runtime, windowing, events, logging, and basic OpenGL/ImGui integration are present. Future layers like ECS, renderer systems, lighting, animation, and physics will likely sit above the current engine core rather than replace it.
Main entry points: Window.h Window · SandboxApp.cpp Sandbox App · Lazzo.vcxproj Lazzo proj · Application.h Application
Components 18
Build
Project generation and solution boundaries
Engine
Reusable runtime library
- Lazzo proj · Reusable engine library project
Lazzo/Lazzo.vcxproj - Lazzo.h · Public engine include surface
Lazzo/src/Lazzo.h - Core.h · Core macros and common engine definitions
Lazzo/src/Lazzo/Core.h - Entry Point · Central executable entry that starts the user application
Lazzo/src/Lazzo/EntryPoint.h - Application · Owns lifecycle and main loop
Lazzo/src/Lazzo/Application.h - Log · Cross-cutting logging service
Lazzo/src/Lazzo/Log.h
Platform
Windowing, input, rendering, and UI integration
- Window · Native window and event pumping boundary
Lazzo/src/Lazzo/Window/Window.h - Events · Engine event types and dispatch layer
Lazzo/src/Lazzo/Window/Events/Events.h - Graphics API · Backend abstraction for rendering APIs
Lazzo/src/Lazzo/Window/GraphicsAPI/GraphicsAPI.h - OpenGL · Concrete OpenGL implementation
Lazzo/src/Lazzo/Window/GraphicsAPI/OpenGLAPI.h - Factory · Constructs or selects the active graphics backend
Lazzo/src/Lazzo/Window/GraphicsFactory.h - ImGui UI · Immediate-mode UI layer on top of the graphics context
Lazzo/src/Lazzo/Window/UI/ImguiUI.h
Apps
Consumer application built on the engine
- Sandbox proj · Test application project that consumes the engine
SandBox/SandBox.vcxproj - Sandbox App · Engine consumer used to exercise runtime features
SandBox/src/SandboxApp.cpp - ImGui config · Sandbox UI layout/state persistence
SandBox/imgui.ini
Connections 24
- Generate → Premake: invokes · Batch script runs the generator
- Premake → Solution: creates · Generates the solution and project files
- Solution → Lazzo proj: contains · Solution includes the engine project
- Solution → Sandbox proj: contains · Solution includes the sandbox project
- Lazzo proj → Lazzo.h: exports · Builds the engine public include surface
- Lazzo proj → Application: implements · Compiles runtime lifecycle code
- Lazzo proj → Window: implements · Compiles platform/window subsystem
- Lazzo proj → Log: implements · Compiles logging subsystem
- Application → Entry Point: boots · Startup path enters through engine-provided entrypoint
- Entry Point → Sandbox App: launches · Entrypoint instantiates the user application
- Sandbox proj → Sandbox App: contains · Sandbox project hosts the sample app
- Sandbox App → Application: inherits · Consumer app plugs into engine lifecycle
- Application → Window: owns · Application creates and drives the main window
- Window → Events: emits · Window translates platform input into engine events
- Window → Factory: requests · Window setup asks for a rendering backend
- Factory → Graphics API: selects · Factory binds the abstract backend interface
- Graphics API → OpenGL: implements · OpenGL is the current concrete backend
- Window → ImGui UI: hosts · UI layer is initialized on top of window/context
- ImGui UI → OpenGL: depends on · ImGui rendering requires the graphics backend
- Sandbox App → ImGui UI: uses · Sample app can exercise editor/debug UI
- Sandbox App → Log: logs · Application code can use shared diagnostics
- Application → Events: dispatches · Main loop processes engine events
- Window → Log: reports · Platform failures and lifecycle messages flow to logging
- Sandbox App → ImGui config: persists · Sandbox stores UI state for ImGui