XaiJu
StudioKlondike
StudioKlondike

patreon


[Background Blog] Astatos - Single Player Trials

Hey patrons, Compymono here again! Over the past two months I've been working on a major systems Update to Astatos featuring the groundwork for our single player Trial gameplay in the form of a fully-playable tutorial system.

This has been a long time coming as we've been slowly building the systems for it in the background since launch— most recently resulting in the PvE Training Trials added a few months ago.

Today I wanted to go a little in-depth on the scripting structures behind the new Trial scripting system and how it works.

Overview

When the Astatos game was originally being planned in early 2020, we mainly focused on a prototype involving multiplayer gameplay. This prototype quickly became the foundation of the current game—although almost all of it has been replaced by now—and resulted in the general networking framework we have at the moment.

A crucial goal in the design of the game was to minimise both the amount of data sent, and the amount of work needed to be performed by the server (to an extent) in order to keep operational costs small enough for an indie team.

We realised implementing PvE and Story Trials would probably be outside of the time budget we had remaining for developing the game, so we removed them from the early access launch scope so we were able to focus on creating a polished experience.

After release, we started tackling how to implement Story Trials. The first thing we knew is that we wanted to be sure of two things:

To accomplish this, PvE battles have two components.

The above resulted in a few months of revision, planning, and development, but in the end we finished and added Training Trials to the game. Although, I'm not completely happy with how the bots behave during the Hero Stage, it's good enough to beat new players. (And it was best to release it when it was ready)

Next was working on implementing these AI battles into the story, but we still had some work to do as new requirements are introduced:

The first point was easy to start, but it took a few days of work to finish. Due to the multiplayer structure, all we had to do was to divert the sending packets directly back at the receiving script. Some functions had to be rewritten to compensate for there being no server though.

When it came to setting up the Trial parameters, we created a new data type and a function to replace the setup that would usually occur in the lobby. (It also has the ability to change more parameters such as seal count, the specific bots involved, their levels, and music.)

Once we're actually in the Trial it was time to work out how to trigger events at specific times during the Trial. To do this, triggers were added at key transition points where it was safe to pause the timers, and A.I. actions.

Over the course of designing the tutorials, 55 of these triggers were added into the game. (And there will likely be more added as needed)

Now that there's a bunch of triggers everywhere, I had to work out what to do with them. In general, you can categorise the triggers as determining story, or function events. In order to determine these, each Story Trial has a Logic File and a Dialogue File— which are spreadsheets containing all the data for a given scenario.

While it would have been possible to combine these into a single file, it would become difficult as edits in the story text or translation could get in the way of modifications to the general scripting of the Trial itself.

Dialogue Files

These contain blocks of text and scripting references to display dialogue and timed events.

The game interprets the spreadsheet file using a custom syntax format, with dialogue and character sprites being defined alongside references to flags in the logic script for things like tutorial highlights.

Logic Files

These contain round by round scripting for the Trial, including what cards you draw, how the A.I. will behave for that round and what events and script are linked to triggers.

This script is read at the start of the Trial, and checked for new data at the beginning of each round. 20 or so unique functions were created for the scripting involved in just the tutorials alone!

Bringing it Together

Outside of code, the implementation of single player trials and the new tutorials also involved a few new UI elements, a lot of designing for the Tutorials themselves, over 5k words of design documentation, and over 8k words of original character dialogue for the new tutorials. 

It's been a long journey to get here—and one that made me learn a lot while struggling along the way—but I'm happy to be able to move onto less challenging tasks for a little while as we work towards adding the single player trial system into the Story.

In the meantime, I hope everyone looks forward to the new tutorials update coming soon to the game!

- Compymono

[Background Blog] Astatos - Single Player Trials [Background Blog] Astatos - Single Player Trials

More Creators