# Integrating an “Expressive-Iteration” AI narrative system with 3 modular AR gameplays in 8th Wall

**URL:** <https://forum.8thwall.com/t/integrating-an-expressive-iteration-ai-narrative-system-with-3-modular-ar-gameplays-in-8th-wall/7601>\
**Category:** Technical Support\
**Created:** [July 16, 2025, 7:46am UTC](https://forum.8thwall.com/t/integrating-an-expressive-iteration-ai-narrative-system-with-3-modular-ar-gameplays-in-8th-wall/7601 "2025-07-16T07:46:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chow\_kenny](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@chow\_kenny](https://forum.8thwall.com/u/chow_kenny)\
**Post date:** [July 16, 2025, 7:46am UTC](https://forum.8thwall.com/t/integrating-an-expressive-iteration-ai-narrative-system-with-3-modular-ar-gameplays-in-8th-wall/7601/1 "2025-07-16T07:46:30Z")

</div>

**Hi 8th Wall Support Team,**

I’m working on a prototype that combines:

1. **EI Framework** – an OpenAI-powered storytelling loop that yields discrete “Events”.
2. **Three standalone WebAR mini-games** (orbit-to-find-mark · hand-tilt-reveal · fly-and-grab).
3. **Dynamic 3D assets** – each event’s user-photo is sent to Meshy AI → returns a GLB URL.

At runtime we:  
– call `/api/photo_event` → get `{ event_text, gameplay_type, glb_url }`  
– inject the GLB into the scene and launch the matching gameplay A-Frame component.

**Flowchart**

 ![AI - MR System](https://us1.discourse-cdn.com/flex019/uploads/x8thwall/original/2X/4/45400a7dce96ebc8d36aabd5cf114ca4b37b70c0.png)

**Key questions**

1. **Architecture fit** – Is it okay to run such a fully dynamic flow (async GLB download + hand-tracking + component hot-swap) inside an 8th Wall `xrweb` scene?

2. Can OpenAI choose one of the three gameplay based on the generated Event? How to implement it between 8th Wall and Backend Server?

3. **Best-practice for modular gameplays** – current idea:

html

CopyEdit

```auto
<a-entity id="gameRouter"
          ei-gameplay-router="type: gameplay2; glb: ./model.glb; label: '…';">
</a-entity>

```

- The router component removes/creates inner entities and adds one of three child components (`gameplay-orbit`, `gameplay-hand-reveal`, `gameplay-fly`).  
Does this align with 8th Wall’s recommended pattern for memory/performance?
- **Asset streaming** – Any limits or tips for repeatedly loading Meshy-generated GLBs (~2 MB each) into the same `xrextras-hand-anchor`?  
Should we cache via `<a-assets>` or call `scene.renderer.compile()`?
- **Hand-tracking overlay** – We currently attach the GLB to `xrextras-hand-attachment point="inner,palm"`.  
Is there an official way to _disable_ hand-mesh rendering but keep the tracking grip point?
- **Compatibility** – Target devices are iOS + Safari/Chrome.  
Any known gotchas with the combination: A-Frame 1.4.2 + 8th Wall XRExtras + dynamic `gltf-model` attribute changes?

**Demo**

**EI Framework**

> **[EI.mp4](https://drive.google.com/file/d/1U4hsJbYqqaFbNSs3RAnyjGCauvA8jOVS/view?usp=drive_link)**
>
> Google Drive file.

**Gameplay 1**

> **[Mobile\_G1.mp4](https://drive.google.com/file/d/1QQXWP2oNFvuQUGFi3lpYZg8C3a2GmNZM/view?usp=drive_link)**
>
> Google Drive file.

**Gameplay 2**

> **[Mobile\_G2.mp4](https://drive.google.com/file/d/18b8Q1Y9tQ4ZozTSdtA0UTTot-vBGuAOX/view?usp=drive_link)**
>
> Google Drive file.

**Gameplay 3**

> **[Mobile\_G3.mp4](https://drive.google.com/file/d/1F40653XDiEQZNdC3U3ct7UJxouIADF58/view?usp=drive_link)**
>
> Google Drive file.

Thanks a lot for any guidance you can share!

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [July 16, 2025, 9:32pm UTC](https://forum.8thwall.com/t/integrating-an-expressive-iteration-ai-narrative-system-with-3-modular-ar-gameplays-in-8th-wall/7601/2 "2025-07-16T21:32:09Z")

</div>

8th Wall, specifically the Editor, doesn’t do anything beyond providing the tools to create AR experiences and tracking. That being said, there is nothing specific to 8th Wall that you need to do when optimizing your A-Frame project. I recommend following A-Frame’s best practices and style guidelines, along with those of any other tools you are using.

Additionally, xrextras is open source. I encourage you to take a look and potentially clone it if you would like to make any edits:

> **[web/xrextras at master · 8thwall/web](https://github.com/8thwall/web/tree/master/xrextras)**
>
> 8th Wall Web projects and resources. Contribute to 8thwall/web development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![chow\_kenny](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@chow\_kenny](https://forum.8thwall.com/u/chow_kenny)\
**Post date:** [July 17, 2025, 1:35am UTC](https://forum.8thwall.com/t/integrating-an-expressive-iteration-ai-narrative-system-with-3-modular-ar-gameplays-in-8th-wall/7601/3 "2025-07-17T01:35:24Z")

</div>

Dear Butler,

Thanks for your reply, I will read the documentation carefully.
