# Optimising code for a choose-your-own adventure

**URL:** <https://forum.makecode.com/t/optimising-code-for-a-choose-your-own-adventure/40861>\
**Category:** Help\
**Created:** [December 9, 2025, 9:34pm UTC](https://forum.makecode.com/t/optimising-code-for-a-choose-your-own-adventure/40861 "2025-12-09T21:34:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [December 9, 2025, 9:34pm UTC](https://forum.makecode.com/t/optimising-code-for-a-choose-your-own-adventure/40861/1 "2025-12-09T21:34:48Z")

</div>

I’ve made a start on a choose-your-own adventure.

I am using the Story and Adventure Extensions for the best of both worlds.

I’ve drafted a game sample here and I’m looking for feedback on optimising the code to handle users’ choices.

> **[HOME.](https://arcade.makecode.com/25801-19149-20640-56775)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Before I progress with the game, is this the optimal way of approaching a game of this style? (I.e. each scene as a function, with my TTS plugin running in the ‘separately do’ timer functions, the text explaining the game appearing from the _Adventure_ plugin with the rolling text, and using the _Story_ plugin to handle the choices)

(Notes: Don’t focus on the game itself such as the images, or lack of an inspiring story. I’m just interested in the best approach to the code currently)
