KoffeeKrew-Raycaster
A raycasting engine written in C++ using OpenGL, GLFW, glad, and ImGui, featuring a level editor, animation system, entity registry, combat mechanics, and bitmap font rendering. Architected as a reusable static library powering KoffeeKrew-Raycaster-MUD.
README
KoffeeKrew-Raycaster
A raycasting engine written in C++ using OpenGL, GLFW, glad, and ImGui, featuring a level editor, animation system, entity registry, combat mechanics, and bitmap font rendering. Architected as a reusable static library powering KoffeeKrew-Raycaster-MUD.
Screenshots





KoffeeKrew Versioning System
Format: RELEASE.MINOR.PATCH
RELEASE: Major release versions
MINOR: New systems or modules
PATCH: Updates to existing systems or modules
Keywords
- Added
- Fixed
- Improved
- Refactored
- Removed
- Updated
Version History
0.1.0 :
- Added initial raycaster engine foundation0.1.1 :
- Improved input system0.1.2 :
- Added application framework features0.2.0 :
- Added system info module0.2.1 :
- Fixed compiler warnings0.3.0 :
- Added texture system and ceiling rendering0.3.1 :
- Refactored KoffeeKrew-Raycaster for better maintainability0.3.2 :
- Refactored fragment shader for better maintainability0.3.3 :
- Added per-tile floor customization0.4.0 :
- Added editor application0.4.1 :
- Refactored tilemap naming convention
- Added CC0 sprites/textures0.4.2 :
- Fixed level loading0.4.3 :
- Added layer selection interface for walls, ceilings, and floors0.4.4 :
- Added right-click eraser functionality to editor0.5.0 :
- Added animated door system and raycast-based interaction0.5.1 :
- Refactored interaction system for modularity
- Fixed door closure edge case0.5.2 :
- Added automatic asset copying to build directory
- Fixed VS debugging configuration0.5.3 :
- Fixed framerate-dependent mouse sensitivity0.5.4 :
- Refactored from stack-allocated arrays to heap-allocated textures0.5.5 :
- Added copy/paste region functionality to editor0.5.6 :
- Added undo/redo functionality to editor0.5.7 :
- Improved tilemap grid to display texture images instead of solid colors0.5.8 :
- Added cut region functionality
- Fixed undefined behavior in BMP loader0.5.9 :
- Added select all functionality and batch undo/redo for paste operations0.6.0 :
- Refactored application class into specialized subsystems0.7.0 :
- Refactored texture system for user-defined loading
- Added shared library0.7.1 :
- Added version output to console0.7.2 :
- Added hotkey for saving levels0.8.0 :
- Added entity system and sprite rendering0.8.1 :
- Refactored KoffeeKrew-Editor for better code quality0.8.2 :
- Added linux-debug and linux-release configurations0.8.3 :
- Refactored KoffeeKrew-Raycaster for better code quality0.8.4 :
- Added FPS limiting0.8.5 :
- Fixed cross-platform FPS limiting accuracy0.9.0 :
- Added cross-platform file dialog system for editor0.9.1 :
- Added multi-file texture loading with native file dialog support0.9.2 :
- Added grid zoom to editor0.9.3 :
- Added portal entity type for level transitions0.9.4 :
- Added decoration collision and door direction dropdowns to editor0.9.5 :
- Fixed portal entity target level intialization and level transition bugs0.9.6 :
- Added current level name to editor window title0.10.0 :
- Added initial enemy AI system0.11.0 :
- Added animation system with dedicated editor panel and context-aware hotkey handling0.11.1 :
- Added docking and theme selector to editor0.11.2 :
- Added theme persistence to editor
- Removed framerate-dependent animation logic0.11.3 :
- Fixed iterator invalidation bug in animation panel0.11.4 :
- Refactored include guards to #pragma once with file header comments
- Removed unneeded includes0.11.5 :
- Fixed enemy AI oscillation using hysteresis for attack transitions
- Added arrow key controls0.12.0 :
- Added KoffeeKrew-Raycaster and KoffeeKrew-Editor screenshots0.12.1 :
- Improved README.md image usage
- Added CC0 Assets section0.13.0 :
- Added initial weapon and combat system0.13.1 :
- Fixed a logic error that was preventing certain entities placed after the player spawn from being initialized0.13.2 :
- Added damage flash feedback when enemies are hit0.13.3 :
- Added decoration and enemy scale to editor0.13.4 - Added clipboard operations and undo/redo for entities in editor
0.13.5 :
- Added customizable fog gradient and void color to levels0.13.6 :
- Improved raycast collision detection to account for door animation progress0.13.7 :
- Fixed wall texture mirroring0.14.0 :
- Added editor-configurable weapon loadouts for player spawns0.15.0 :
- Added animation support for decorations0.15.1 :
- Added DarkSpellwareResources to build asset copying0.16.0 :
- Refactored texture system to use atlases
- Added atlas generator for efficient texture binding0.16.1 :
- Fixed missing includes for Linux/GCC compilation0.16.2 :
- Fixed Linux file dialog multi-select and filter pattern handling0.16.3 :
- Refactored engine into a reusable static library target (KoffeeKrew-Raycaster-Engine)
- Fixed CMAKE_SOURCE_DIR usage for submodule compatibility0.17.0 :
- Added EntityRegistry for unique entity ID assignment and lifetime tracking
- Added unique IDs to Entity with propagation to spawned runetime objects
- Refactored CombatResult to use entity IDs instead of raw pointers
- Improved EnemyManager, DecorationManager, and Tilemap to register entities with the registry0.18.0 :
- Added RuntimeEntity base class for shared identity, position, and health interface0.18.1 :
- Refactored Enemy and Decoration to inherit RuntimeEntity
- Added health/maxHealth and registry ID to Player
- Refactored EnemyManager and DecorationManager storage from stdvector to stdunordered_map for O(1) entity lookup
- Added EntityRegistryGetEntity and SetEntityPointer for cross-manager lookup
- Refactored EnemyAIUpdate to take target position instead of const Player reference
- Refactored Combat::Fire to take shooter position/direction instead of a const Camera reference0.19.0 :
- Added EngineConfig struct for configurable engine initialization0.20.0 :
- Added GameplayConfig singleton for runtime-configurable gameplay tuning values0.20.1 :
- Refactored ApplicationInit() to accept EngineConfig and ApplicationLoadLevel() to be public for external level transitions
- Removed hardcoded gameplay constants and level paths from Constants.h
- Fixed player weapons not cleared on level transition0.20.2 :
- Added virtual callback hooks to Application for subclass-driven event injection
- Added public const accessors on Application
- Refactored Application destructor to be virtual for subclassing support
- Refactored Interaction::Interact return type to be uint32_t to surface interacted entity IDs0.20.3 :
- Fixed destroyed decorations blocking movement0.20.4 :
- Refactored game loop to use a fixed simulation tick rate (60 Hz) decoupled from render frame rate0.21.0 :
- Added BMFont bitmap font rendering system with screen-space orthographic text pass
- Added TextRenderer class supporting position, scale, RGBA color, left/center/right alignment, and word-wrap
- Added text.vert and text.frag shaders for pixel-coordinate glyph rendering
- Added fontPath field to EngineConfig for font loading at init
- Added RenderText, LoadFont, and IsFontLoaded to Application protected interface0.22.0 :
- Added OverlayRenderer for batched 2D colored rectangle and fill bar rendering with three-layer draw order (Background, Content, Tooltip)
- Added overlay.vert and overlay.frag shaders for per-vertex-color screen-space quad rendering
- Added DrawRect and DrawBar to Application protected interface
- Added CursorMode enum and SetCursorMode to Application; mouse look is gated on Captured mode
- Added ImGui integration to engine; OnImGui() virtual callback for subclass debug windows
- Added GetFramebufferSize public accessor on Application0.23.0 :
- Added InputManager class with action-mapping, per-action held/pressed-latch state, mouse button binding, and movement axis helpers
- Added InputAction enum for named engine and subclass actions (MoveForward, Fire, Interact, Quit, ToggleUI, OpenChat, etc.)
- Added InputMode enum (Gameplay, UI, Chat) with SetInputMode/GetInputMode on Application gating movement and combat by mode
- Added GetInputManager protected accessor on Application for subclass binding and queries
- Refactored Application to own an InputManager; all input sampling and latch management moved out of Application into InputManager
- Removed individual latch fields (spacebarLatch_, leftMouseButtonLatch_, rKeyLatch_, key1-3Latch_) and inline input axis fields from Application0.24.0 :
- Added StatBlock to KoffeeKrew-Shared: generic named-float stat container with base values, flat additive modifiers, and percent multiplicative modifiers
- Added StatBlock member to Player with GetStats() / GetStats() const accessors
- Added GetMutablePlayer() protected accessor on Application for subclass attribute initialization
- Added OnPlayerDied() virtual callback to Application, fired once when player health reaches zero
- Added full-screen player damage flash overlay (red vignette, fades over configurable duration) drawn via OverlayLayer::ToolTip on each hit
- Added enemy melee attack system: enemies in ATTACK state deal configurable damage per second (enemyAttackDamage, enemyAttackRate) via AccumulateAttackDamage/ConsumedPendingDamage on Enemy
- Added enemy-to-player damage processing in SimulationTick with per-enemy OnEntityDamaged events and playerDeathFired_ guard
- Added playerDamageFlashDuration, playerDamageFlashMaxAlpha, and playerDamageFlashColor* fields to GameplayConfig
- Added enemyAttackDamage and enemyAttackRate fields to GameplayConfig0.25.0 :
- Added Item and ItemType to KoffeeKrew-Shared: generic item data structure with ID, name, description, type enum, key-value property map, icon texture ID, and stack count
- Added binary serialization to Item (SaveToStream / LoadFromStream) with length-prefixed strings and property count guards
- Added ITEM_DROP entity type (id 31) to EntityTypes.h
- Added ItemDrop RuntimeEntity subclass: holds a generic Item, billboard texture ID, and scale; IsAlive() always returns true (removed explicitly by manager)
- Added ItemDropManager: manages active ground drops by registry ID with O(1) lookup; SpawnDrop, RemoveDrop, GetDropsInRange, GetDropCount, Clear
- Added itemPickupRadius field to GameplayConfig and MAX_ITEM_DROP_COUNT to Constants
- Added proximity pickup loop to ApplicationSimulationTick: collects drops within itemPickupRadius, removes them, and fires OnItemPickedUp per drop
- Added OnItemPickedUp virtual callback, SpawnItemDrop helper, and GetItemDropManager const accessor to Application
- Improved RendererRender signature to accept ItemDropManager; item drops are billboarded with entity type byte 2 and no flash0.25.1 :
- Fixed enemy death animations never rendering
- Added AnimationControllerIsFinished() to detect when a non-looping animation has played through its last frame
- Added EnemyIsDeathAnimationFinished() to expose animation completion for removal gating
- Improved EnemyManager::RemoveDeadEnemies to wait until the death animation finishes before removing an enemy