How simocastro18/knightmare works
Knightmare is an Unreal Engine turn-based 1v1 tactics game against AI. The player deploys a Brawler and Sniper on a procedurally generated, elevation-based grid, then selects units to move or attack while the game mode advances turns and evaluates tower control for victory. AI units choose strategic targets and move using selectable A* or Greedy pathfinding. The map, input, unit combat, tower objectives, and UI are evidenced by the README, tree, and sampled C++; unsampled Blueprint wiring is represented only where documented, so uncertain links are omitted.
Main entry points: StrategyGameMode.cpp Game Mode · StrategyPlayerController.cpp Player Controller · GameField.cpp Grid Manager · StrategyUnit.cpp Units
Components 13
Map and Grid
- Grid Manager
Source/StrategicoaTurni2025/Private/GameField.cpp - Grid Tiles
Source/StrategicoaTurni2025/Private/Tile.cpp
Match Flow
- Game Mode
Source/StrategicoaTurni2025/Private/StrategyGameMode.cpp
Units and Combat
- Units
Source/StrategicoaTurni2025/Private/StrategyUnit.cpp - Tower Objectives
Source/StrategicoaTurni2025/Private/StrategyTower.cpp
Player Presentation
- Click Input
Content/Input/IA_Click.uasset - Player Controller
Source/StrategicoaTurni2025/Private/StrategyPlayerController.cpp - Game HUD
Content/Blueprints/WBP_CurrentTurn.uasset - Combat Log
Content/Blueprints/WBP_CombatLog.uasset - Match Result
Content/Blueprints/WBP_GameOverWinner.uasset - Deployment UI
Content/Blueprints/WBP_Deployment.uasset
Other components
- Player
- Unreal Engine
Connections 20
- Player → Click Input: clicks
- Click Input → Player Controller: triggers
- Unreal Engine → Player Controller: dispatches input
- Player Controller → Grid Manager: queries paths and ranges
- Player Controller → Grid Tiles: handles selection
- Player Controller → Units: places, moves, attacks
- Player Controller → Game Mode: advances deployment
- Grid Manager → Grid Tiles: generates grid
- Grid Manager → Tower Objectives: spawns objectives
- Grid Manager → Units: spawns AI units
- Game Mode → Grid Manager: uses map manager
- Game Mode → Units: dispatches AI turns
- Game Mode → Tower Objectives: evaluates control
- Units → Grid Manager: requests pathfinding
- Units → Units: attacks and damages
- Game Mode → Game HUD: broadcasts turn updates
- Game Mode → Combat Log: broadcasts log messages
- Game Mode → Match Result: shows game over
- Player → Deployment UI: chooses deployment
- Deployment UI → Player Controller: selects unit class