PuzzleCore is a minimal, modular puzzle framework for UnrealEngine, designed to simplify implementing puzzle logic in both offline and online multiplayer games.
The system focuses on clear separation of logic, data-driven conditions, and network-friendly design, making it suitable for small indie projects as well as scalable multiplayer experiences.
- PuzzleComponent
UPuzzleComponentis the main component you attach to an Actor, each puzzle is a component and when solved that all condition is true you can define condition witthUPuzzleCheckclass- PuzzleComponentState:
- Unavailable: Your puzzle not active
- Locked: Your puzzle is active but still not try to solve
- Solved: Your puzzle is solved
- Failed: Your puzzle try befor and after that can't solved
- PuzzleCheck
UPuzzleCheckis aUObjectcalss that has
classDiagram
class UPuzzleComponent{
+bool AutoAvailable
+String PuzzleName
+UPuzzleCheck Requirements
+bool AutoReset
+bool AllowAttemptAfterFailure
+bool UseMinimumRequirement
+int32 MinimumRequirement
+GetPuzzleState()
+IsPuzzleSolved()
+IsPuzzleLocked()
+IsPuzzleActive()
+GetPuzzleName()
+IsPuzzleSolved()
+GetTryCount()
+CanSolvePuzzle()
+TrySolvePuzzle(Solver)
+ResetPuzzle()
+SetAvailablePuzzle()
}
class UPuzzleCheck{
+GetOwnerPuzzle()
+PrintDebug(message)
Event_OnBeginPuzzle
Event_CheckCondition
Event_OnEndPuzzle
Event_OnPuzzleStateChanged(state)
}
class APuzzleActor{}
- PuzzleComponent = puzzle manager / brain
- PuzzleCheck = individual rules / sensors / validators
They are designed to separate core logic from individual conditions, making the system flexible, modular, and multiplayer-safe.
- Server-authoritative puzzle logic All puzzle state and solve logic run on the server for multiplayer safety.
- Offline-friendly Works seamlessly in single-player / standalone games with zero network overhead.
- Flexible Requirements Attach UPuzzleCheck objects to define custom conditions to solve a puzzle.
- Minimal Blueprint exposure Use the component in Blueprints, but core logic remains in C++ for performance and security.
- Events & Delegates
Listen to puzzle state changes via:
- OnStateChanged
- OnSolved
- OnFailed
- OnReset
- Automatic handling
Optional features:
- Auto-reset after fail
- Allow attempts after failure
- Minimum requirements mode
- Add
UPuzzleComponentto your Actor or UsePuzzleActor - Assign your
UPuzzleCheckinstances in the Requirements array. - Use the exposed Blueprint or C++ API to attempt puzzle solving
PuzzleComponent->TrySolvePuzzle(Solver);
Note: TrySolvePuzzle must be called on the server or via client request routing (e.g., through PlayerController RPC).
- Unreal Engine 5.6+
- No external dependencies
- UPuzzleCheck is instanced and editable per actor.
- Puzzle state is replicated automatically for multiplayer.
- For Online the component only work in Server and client just updated states puzzle.
flowchart TD
CC(Construct) --> SU[**Unavailable**]
SU --> BP(BeginPlay)
BP -->|IsAutoAvailable| SL[**Locked**]
BP --> SU2[**Unavailable**]
SL -->|TrySolvePuzzle| H{IsSolved}
H -->|False| H2{AutoReset}
H -->|True| SS[**Solved**]
H2 -->|False| SF[**Failed**]
H2 -->|True| SL
SF -->|TrySolvePuzzle| H3{HasAllow}
H3 -->|True| H
H3 -->|False| BB(PrintLog)