Skip to content

Claude/game module engines editors 5y us9#354

Merged
Krilliac merged 8 commits intoWorkingfrom
claude/game-module-engines-editors-5yUs9
Apr 3, 2026
Merged

Claude/game module engines editors 5y us9#354
Krilliac merged 8 commits intoWorkingfrom
claude/game-module-engines-editors-5yUs9

Conversation

@Krilliac
Copy link
Copy Markdown
Owner

@Krilliac Krilliac commented Apr 3, 2026

No description provided.

claude added 6 commits April 3, 2026 13:32
The SparkGameEngineEditor module duplicated 6 of 9 subsystems that
already exist in the engine/editor (Material 95%, Animation 90%,
Level Design 85%, VFX 80%, Asset Pipeline 75%, Visual Scripting 40%).

Moved the 2 truly unique subsystems into SparkEditor as proper panels:
- Prototyping: blockout primitives, 8 game templates, gameplay rules,
  play-test sessions (SparkEditor/Source/Prototyping/)
- UI Designer: WYSIWYG widget tree editor with anchors, data binding,
  style system, 3 presets (SparkEditor/Source/UIDesigner/)

Both registered in EditorPanelFactory with icons and default visibility.
Deleted the entire GameModules/SparkGameEngineEditor/ directory.

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
Compiler fixes (VisualScriptCompiler.cpp):
- Branch: proper if/else with true/false path routing
- ForLoop: generates real for-loop with start/end/index
- PlaySound/PlayAnimation: emit real API calls instead of print()
- DestroyEntity/SetHealth: emit real calls instead of comments
- FireEvent: emit real fireEvent() call
- GetVariable: emits actual variable reference as typed output
- SetVariable: fixed input index
- Added missing: GetPosition, GetRotation, GetHealth, GetSpeed,
  GetEntityByName, SetPosition, SetRotation, ApplyForce,
  Normalize, DotProduct, Distance, Sequence
- New node types: DefineCustomEvent, CallFunction, ReturnValue
- Function sub-graphs compile to separate class methods
- Custom event definitions compile to handler methods

Editor fixes (VisualScriptPanel.cpp):
- Pin-to-pin connection dragging with bezier preview
- Type compatibility validation (Exec<>Exec, Float<>Int, etc.)
- Hover highlight on pins, cancel with right-click/Escape
- Single-connection-per-input enforcement
- Graph save/load to .vscript JSON files
- Save/Load buttons in compile toolbar
- Complete pin definitions for all 50 node types
- New Functions category in palette (Custom Event, Call, Return)

New ScriptDebugPanel:
- Breakpoint management with enable/disable and hit counts
- Variable watch panel with live value display
- Execution trace log with timestamps
- Debug compile mode (instruments scripts with trace calls)
- Pause/resume execution on breakpoint hits

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
AngelScript API bindings (AngelScriptEngine.cpp):
- Added 14 new global functions callable from generated scripts:
  destroyEntity, getPosition, setPosition, getRotation, setRotation,
  getHealth, setHealth, getSpeed, applyForce, playSound, playAnimation,
  getEntityByName, fireEvent, debugTrace
- All registered in RegisterGlobalFunctions() with proper AS signatures
- Entity functions use World/ECS (Transform, HealthComponent, NameComponent)

Compiler improvements (VisualScriptCompiler.cpp):
- ForLoop now emits connected body nodes inside the loop block
- Branch walks full execution chain per path (not just first node)
- Debug trace mode: when enabled, inserts debugTrace() call before each node
- Compile() now accepts debugMode parameter

Editor improvements (VisualScriptPanel.cpp):
- CompileGraph() now calls AngelScriptEngine::CompileScriptFromString()
  to load generated scripts into the runtime (scripts actually execute)
- Generated code preview (collapsible) in compile toolbar
- LoadGraph() fully implemented with JSON parsing (nodes, connections,
  variables restored from .vscript files)
- Key name dropdown (24 keys) for OnKeyPress/GetKeyDown/GetKey nodes
- Property editors for PlaySound, PlayAnimation, FireEvent, SpawnEntity,
  GetEntityByName, CallFunction, Get/SetVariable with variable dropdown
- Variable dropdown for Get/Set Variable nodes shows declared variables

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
…afety

Compiler fixes (VisualScriptCompiler.cpp):
- Fixed action node input indices: all action nodes (SetPosition, SetHealth,
  ApplyForce, DestroyEntity, PrintMessage, SetVariable) now correctly skip
  input[0] (Exec pin) and read data from input[1+]
- ForLoop uses correct indices: Start=input[1], End=input[2], Index=out[1]
- GetDeltaTime emits `float n_out0 = dt;` instead of comment
- Sequence emits connected nodes for each output pin in order
- Added selfEntity member variable to generated class
- Double-emission prevention: nodes that are children of Branch/ForLoop/
  Sequence are collected and skipped from the main emission loop

Editor fixes (VisualScriptPanel.cpp):
- Execution pin type safety: Exec pins can only connect to Exec pins,
  data pins cannot connect to Exec pins
- SaveGraph now serializes node properties (key, sound, animation, event,
  function names) and constant default values to JSON
- Int<>Float implicit conversion still allowed for data pins

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
Compiler fixes:
- Branch condition now correctly reads input[1] (was input[0] = Exec pin)
- Execution chain walker uses pin kind check instead of broken double-negation
- Removed dead for-loop on trueChain variable

Editor UX improvements:
- Pin labels shown on all nodes (type name for data pins, True/False for
  Branch, Body/Done for ForLoop, 0/1/2 for Sequence)
- Node palette search filter with case-insensitive matching, auto-opens
  matching categories
- Comment nodes (green, no pins, editable text body rendered on canvas)
- Debug compile checkbox in toolbar with tooltip
- LoadGraph now parses and restores node properties (key names, sound
  names, etc.) using brace-depth-aware JSON parser

Debug system wired end-to-end:
- ASDebugTrace() calls through DebugTraceCallback to ScriptDebugPanel
- ScriptDebugPanel registers callback on Initialize()
- Trace entries flow from running scripts -> engine -> editor panel
- Breakpoint hit detection triggers pause in debug panel

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
Undo/Redo for graph edits (VisualScriptPanel):
- AddNodeCommand, RemoveNodeCommand, AddConnectionCommand with full
  undo support (snapshot/restore node state and connections)
- Direct operation methods for commands to call without undo tracking
- UndoRedoManager integration point via SetUndoRedoManager()

Step-through debugger (ScriptDebugPanel):
- Step Over: execute one node then pause (m_stepMode flag)
- Continue: resume until next breakpoint
- Call Stack tab showing recent execution trace with current node
- Paused-at-node indicator in toolbar
- Step mode auto-pauses after receiving one trace entry

SparkGameVisualScript — zero C++ game logic module:
- ALL gameplay defined in 5 visual scripts (AngelScript .as files):
  * PlayerController: WASD movement, jump, sprint, health regen
  * Collectible: spinning coins with bob animation, score on pickup
  * EnemyPatrol: waypoint patrol, player detection, chase AI, attack
  * GameManager: score tracking, win condition (5 coins), game over
  * HealthPickup: healing on contact, respawn after 10s cooldown
- C++ shell (Main.cpp) only loads scripts and spawns 11 entities
- Game features: movement, collectibles, enemies, health, win/lose
- Zero lines of C++ game logic — everything runs through AngelScript

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

✅ CI Errors Resolved

All previously reported errors have been fixed. All builds passing.

Last checked: 2026-04-03T21:41:03Z

claude added 2 commits April 3, 2026 21:14
- PinKind → Spark::Scripting::PinKind (fully qualified namespace)
- ImVec2 m_canvasOrigin → float m_canvasOriginX/Y (no imgui.h in header)
- ImVec2 GetPinScreenPos() → void GetPinScreenPos(float& outX, float& outY)
- Updated all callers in RenderPendingConnection and HitTestPin

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
The coverage job (Code Coverage GCC) was missing error extraction and
artifact upload on failure. When coverage failed, the CI Error Report
had no data about it and silently reported "no errors".

Added to the coverage job:
- Build output captured to cmake-build.log via tee
- Test output captured to test-output.log via tee
- extract-errors.sh runs on failure to parse build/test errors
- error-summary.json uploaded as ci-errors-coverage artifact
- CI Error Report job already had coverage in its needs list

Now when coverage fails, the consolidated error report will include
the coverage job's build errors, test failures, and warnings.

https://claude.ai/code/session_01D2R4yPRwqonR24XjxUziy1
@Krilliac Krilliac merged commit 978537c into Working Apr 3, 2026
41 of 43 checks passed
@Krilliac Krilliac deleted the claude/game-module-engines-editors-5yUs9 branch April 3, 2026 21:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Code Coverage (GCC + lcov)

Utils/Logger.cpp                          |21.8%    133| 0.0%    17|    -      0
Utils/Logger.h                            |18.2%    121| 0.0%    20|    -      0
Utils/MathUtils.cpp                       |    -      0|    -     0|    -      0
Utils/MemoryDebugger.h                    |13.3%    150| 0.0%    20|    -      0
Utils/MemoryMonitor.cpp                   | 9.6%    229| 0.0%    19|    -      0
Utils/MemoryMonitor.h                     |85.7%     14| 0.0%    12|    -      0
Utils/NetworkHealthMonitor.cpp            | 113%     15| 0.0%     2|    -      0
Utils/NetworkHealthMonitor.h              |    -      0|    -     0|    -      0
Utils/OpaqueHandle.h                      | 209%     11| 0.0%    15|    -      0
Utils/Profiler.cpp                        |14.2%    113| 0.0%    15|    -      0
Utils/Profiler.h                          |36.4%     33| 0.0%    12|    -      0
Utils/RandomEngine.h                      |29.3%     41| 0.0%    12|    -      0
Utils/Result.h                            | 100%     29| 0.0%    28|    -      0
Utils/RingBuffer.h                        | 108%     59| 0.0%    64|    -      0
Utils/ScopeGuard.h                        | 142%     36| 0.0%    51|    -      0
Utils/ScopedTimer.h                       |25.0%     12| 0.0%     3|    -      0
Utils/Serializer.h                        | 100%     48| 0.0%    42|    -      0
Utils/SparkConsole.cpp                    | 125%     32| 0.0%     6|    -      0
Utils/SparkConsole.h                      | 100%      2| 0.0%     2|    -      0
Utils/SparkError.h                        |10.9%     55| 0.0%     6|    -      0
Utils/SplinePath.h                        |    -      0|    -     0|    -      0
Utils/StackTrace.h                        |11.0%     73| 0.0%     8|    -      0
Utils/StateMachine.h                      |54.0%     63| 0.0%    32|    -      0
Utils/StringUtils.h                       |18.8%    112| 0.0%    21|    -      0
Utils/ThreadDebugger.h                    |12.8%    148| 0.0%    19|    -      0
Utils/ThreadSafeQueue.h                   |27.5%     40| 0.0%    11|    -      0
Utils/UUID.h                              |43.2%     37| 0.0%    16|    -      0
Utils/Validate.h                          |    -      0|    -     0|    -      0

[/home/runner/work/SparkEngine/SparkEngine/SparkSDK/Include/Spark/]
IEngineContext.h                          |6700%      1| 0.0%     1|    -      0
Version.h                                 |    -      0|    -     0|    -      0
================================================================================
                                    Total:|35.4%  12112| 0.0%  2439|    -      0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants