Files
GDevelop-Heretek/Extensions
John Smith ae815f489b feat(ai): local multi-agent game studio + engine culling and instancing
Answers the two questions the fork asked, then acts on both.

Assessment (AI_GAME_STUDIO_ASSESSMENT.md): a literal Anno-1800-scale 3D
city builder is not achievable on this engine - no instancing, no 3D
culling, Android is a Cordova WebView around the same HTML5 runtime, and a
15 MB per-resource cloud-build ceiling. A 2D isometric city builder of
Anno-1602/1701 scope is reachable today. The hosted backend already is a
multi-agent company; the BYOK path can reach none of it (no plan tool, no
sub-agent tool, no role prompts, no local spawner, no loop guard).

Studio (phases 2-5, 9-11), all under newIDE/app/src/AiGeneration/Studio/:
* Roles.js - manager/designer/developer/tester: prompts, exact tool
  subsets, read-only invariant, turn caps.
* PlanStore.js - create_or_update_plan is real under BYOK and returns the
  shape getLatestActivePlan/OrchestratorPlan already read; the dispatcher
  merges a new plan over the existing one so a re-plan cannot strip a field
  another writer set.
* SpawnSubAgents.js + customCreateSubAgentAiRequest - spawn_agent (the BYOK
  tool schema goes 29 -> 39 tools) and a real child AiRequest carrying the
  role's prompt and tool subset.
* FinalizeSubAgents.js + UseStudioRuntime.js - a finished child's report is
  written onto its parent's function_call_output and the plan task flips.
* RequestWriteGate.js - one gate owns writes to an AiRequest, with named
  block reasons and latest-wins per-request serialization.
* LoopGuard.js - a local circuit breaker (repeated identical calls, error
  storms, turn count) with a steer -> constrain ladder. Ported from
  chaitanyagiri/munder-difflin (MIT) src/main/breaker.ts, incl. its #377
  whole-arguments sha256 key; no MD source is vendored.
* One in-flight model turn per request id, and the two in-place mutators
  made whole-replace so a concurrent turn cannot discard them.

Engine (phases 6-8):
* 3D culling: gdjs.Object3DCulling shared AABB maths, a per-layer frustum
  cache, and a 3D branch in both _updateObjectsPreRender implementations.
  Capability-checked, because CustomRuntimeObject3D does not extend
  RuntimeObject3D.
* Instancing: opt-in Model3D "Use instancing" property + Model3DInstancePool,
  one InstancedMesh per (resource, material, layer) for single non-skinned
  meshes; every other model silently keeps the clone path.
* TileMap culling generalised to TileMap (not just SimpleTileMap) and to
  tilemaps nested in custom objects, with bounds clamped to the map.

Two bugs found by running the loop end-to-end rather than by tests: the
instance pool was page-global (handing out slots on a discarded scene's
mesh), and buildSubAgentReport read only `output_text` while the local path
emits `text`, so every local sub-agent reported "(no report)".
2026-09-22 11:19:22 -04:00
..
2019-12-26 11:36:03 +01:00

Extensions for GDevelop

These are the "official" extensions directly bundled with GDevelop.

Writing your extensions or contributing to an existing one 😎

Most extensions can be written in JavaScript.

Read this README to learn everything about writing extensions for GDevelop.

License

  • Extensions are provided under the MIT License: see LICENSE.md file.
  • External libraries can be used by extensions (Box2D, Dlib or SPARK for example). See their licenses in their directories.