Devlog Update 2.9: Setting up a Tutorial


Hey all!

Part of making a videogame is teaching people how to play the videogame -- be it the controls, the game loop, or the intricacies of the UI. Here at Sigil, we have a simple but involved game loop with a collection of uncommon controls. One of the biggest complaints from our early access playtesters was difficulty remembering controls, and not having an area to learn in.

We remedied this in our main game loop by providing an on-screen help book that the player could open at any time. The help book, while giving the entire control scheme, didn't cover the situational applications of certain gameplay mechanics -- when to heal, what different spells do, etc.

This, unfortunately, was a little harder to remedy.  We started with a beautifully designed level that had emissive textures outlining the basic controls (WASD to walk, mouse to look around, shift to sprint, and spacebar to jump), but found conveying the magic system difficult through hieroglyphs. After brainstorming for a few meetings, we all agreed that a spoken tutorial was the way to go -- but how were we going to play all the audio, and make it accessible or useful to people with the game sound off?

Subtitles enabled, as we all know, is the only way to watch movies and TV shows on streaming services. Anyone that says otherwise is lying, and I'll pretend I can't hear them because there's no text mirroring what they're saying at the bottom of my screen.
What I didn't know about subtitles is the challenges associated with synchronizing them with audio. In movies, the subtitles have timestamps that correlate to the movie's visuals.  In video games, there are no timestamps, and players inevitably want to skip through parts of the dialogue.

As the junior programmer, this task seemed 'simple enough', and I bravely stepped up to the plate with expectations of smashing this out of the park.  What I wasn't expecting was the plethora of bugs I'd encounter, and cause.



Part 1: Early Onset Insanity

With all programming or game development tasks, the cleanest and most efficient way to start is to scope the problem and start planning out a solution.  My initial scope for this challenge was as follows:

  1.  The player spawns in & walks forward
  2. Sound plays & text shown on screen in sync with the audio
  3. The Player can right-click to skip the dialogue if they desire
  4. The player walks forward and hits the next dialogue box, taking us back to step 2.

Unfortunately, issues immediately became apparent; if the player didn't skip the audio/subtitles and walked into the next box the audio would overlap, and we needed some way of cueing audio after the player had completed a task -- defeating an enemy, for example.

The obvious solution to this was to stack audio tracks in a list, and when the player skipped ahead simply skip to the next track to stop audio overlapping.
Fixing the cue issue was a little more challenging, and required linking some custom events to situations only occurring when the player had finished a task or challenge; an enemy despawning or the player's health changing.

This, however, brought about an entirely different set of issues:

  • Changing between audio lists would stack audio components in the scene, resulting in overlapping audio
  • The cue system would trigger before the player reached the section requiring the cue system, overlapping audio again
  • The player was able to stroll through the entire area without completing any of the tutorials, as the teleporters were always enabled

Part 2: Overcomplicating the simple things

With the player being able to skip sections of the tutorial by dealing damage to an enemy before the introductions to the scene had been made, I devised a cunning plan to not queue audio until several events had been triggered; a litany of custom events tied across nearly every actor in the scene.  This, of course, caused issues when redesigning the scene as the player was unable to trigger some events as they weren't reconnected.

My senior dev laughed, and suggested I use some booleans to allow/disallow certain audio lists being copied into the playlist; if we hadn't reached the end of the introduction list, don't let the game copy across the 'successful kill' list.


Part 3: Identifying features out of bugs

Skipping the level? More like pro speedrun strat for returning players that got tired of hearing the same audio tracks on repeat, right? At least that's what we've settled on. Don't break my tutorial, okay?


Summation:

In the end, I created a tutorial system that both plays and displays information pertinent to the player experience and gameplay loop.


That's all for now,
Lots of DevLove,
T0RCH

Get Sigil

Leave a comment

Log in with itch.io to leave a comment.