Last week, I reported that I was working on the intro script for The Dungeon Under My House, my second Freshly Squeezed Entertainment project.
I have since continued the work.
Sprints 27: Pre-production and initialization
Planned and complete:
- Create introduction script
I had envisioned a multipart introduction that allows the player to learn about the characters of the game and navigate their way around the home before finding themselves in the dungeon.
With the first scripted part finished and kicked off as part of the game’s initialization, I created triggers that would start the second and third parts.
The first script features dialogue with your Explorer’s Club friends, and ends with you on a quest to get snacks.
I created triggers that have arbitrary criteria, and one criterion I created was to determine if you had entered a specific room.
So when you enter the kitchen, it would start the second part of the intro script, which eventually sends you to the basement.
Entering the basement kicks off a third intro script, which ends with you discovering a part of the basement you didn’t know existed before.
This second basement isn’t visible in the house view until that point, but it features a ladder, and when you climb down and enter the dungeon for the first time, it kicks off the final intro script.
To make all of the above work, I needed to modify the triggers, commands, scripts, and menus to support a bit more flexibility and capability. Up until now, a menu option was always tied to a single command, but now triggers, scripts, and menu buttons can all kick off a series of commands. In practice, it means I can have a trigger disable itself after the first time it is triggered, while also starting a dialogue script, while also setting an arbitrary flag to a particular value.
Many years ago, I made a game called Stop That Hero!, and in it I created a data structure that could be any arbitrary data type that I would like. It turned out afterwards that I discovered boost::any was a thing, but my own code worked well enough, and I found it useful this time around, too.
Well, anyway, now that I have the intro scripts, I found that I didn’t like what I had made. It’s functional and it does what I set out to do, but in my head I have this colleague who once said that he hates long sequences of introduction that prevent him from playing the game right away. He hates it so much that he stops playing the game entirely.
And I realized that I had made just such an intro.
So I started thinking about ways to change the intro so that the player is more actively involved and driving things instead of passively hitting the “Continue” button until the blocks of text go away.
I’ve mentioned before how I want dialogue to be more than merely static text with branching, and I think this intro would be a good opportunity to figure out what the player should be able to do and how to make it work.
Unfortunately, before I could work on it, or on making the art for the characters much better, I discovered that while the game seems to work just fine on my development machine, it crashes when I run it on Android, specifically when entering the dungeon.
It is strange, because I have an Android build from a few weeks ago that runs perfectly fine, and I haven’t touched the dungeon code since that build.
The crash seems to point to a memory trampling issue, and I spent the last few days of the week investigating and debugging. Unfortunately, while I narrowed down where the crash seems to be occurring, it isn’t clear to me why it is occurring.
Creating an array of Uint32 shouldn’t cause an issue, but clearly something is wrong:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x74db82e79e88 Cause: stack pointer is in a non-existent map; likely due to stack overflow.
And I wonder if it doesn’t have something to do with the triggers and scripts, which need to live separately from the main GameData data structure, which may or may not be handled properly when I am periodically saving it.
So this coming week I hope to figure out why the Android build crashes. So far I have fixed a number of minor memory issues that valgrind found, but none of them seemed to be related to this issue.
Thanks for reading!
—
Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!
One reply on “Freshly Squeezed Progress Report: Intro Scripted”
[…] my previous sprint report, I created an introduction script for The Dungeon Under My House, my second Freshly Squeezed […]