feat(game): AIML topic patterns, EDA event bus, ECS motion#157
Merged
cursor[bot] merged 2 commits intomainfrom Apr 27, 2026
Merged
feat(game): AIML topic patterns, EDA event bus, ECS motion#157cursor[bot] merged 2 commits intomainfrom
cursor[bot] merged 2 commits intomainfrom
Conversation
- Fix AIML_InnerGetResponse (was missing function header) and star capture Q_strncpyz targets; add compiled <topic> pattern matches with topic_stars and <topicstar/> output; include <topic> child in category XML; teach <srai> to save/restore topic stars; publish aiml.response on EDA when g_eda is enabled. - Add g_eda.c/h string event queue, EDA_Init in game systems, EDA_Frame tick, and Engine.Events Lua (publish, pop, queueDepth, clear). - Add ECS_StepMotion in EnTT layer, g_ecsMotion cvar and client frame integration; expose Engine.ECS.stepMotion to Lua. - List g_eda.c in CMake client sources. Co-authored-by: Tim Fox <timfox@outlook.com>
- Add EDA_Drain with edaEventRecord_t; Engine.Events.drain(max) returns
table of {channel,payload} plus count; use Z_TagMalloc for large drains.
- Add ECS_CountWith(component) and Engine.ECS.countWith(name).
- g_aimlDebug cvar; g_eda cvar ref in AIML; publish aiml.nomatch; gate
aiml.response on g_eda; console logs for no-match and winning category.
- Add examples/websocket (Node echo server, browser client, engine snippet).
Co-authored-by: Tim Fox <timfox@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AIML
AIML_InnerGetResponseimplementation (the previous file had a broken function body after the signature).<topic>as a token pattern (like pattern/that), matches it against the user’s topic stack, fillstopic_stars, and implements<topicstar/>withindexlike other stars.<topic>child inside<category>(in addition to<topic name="...">blocks and default topic from outer<topic>).<srai>save/restore now includes topic star captures.Q_strncpyztargets inAIML_TryMatch(useg_starBuf[row]forchar (*)[256]).g_edais enabled, successfulAIML_GetResponsepublishes a summary on channelaiml.response.EDA (event bus)
g_eda.c/g_eda.h: fixed-size queue, string channels + payloads, cvarg_eda(default 1) with startup log.EDA_Init/EDA_Shutdownwired incl_gameframe.c;EDA_Frame()called each client frame (hook for future coalescing).Engine.Events.publish,pop,queueDepth,clear.ECS
ECS_StepMotion(dt)integrates velocity into position for entities with both components (EnTT view).g_ecsMotion(default 1) controls stepping inCL_GameFrameafter physics whenUSE_ECSis on.Engine.ECS.stepMotion(dt)for scripts that want explicit stepping.Build: Vulkan client +
ctest(19/19) passed locally.