Optimizing the quest system

Progression in Tentacular is structured by main and side quests, each with their own stories and levels organized as Scriptable Objects. The quest system contains all elements from the game as well as the scenes that Firepunchd needed to load during each build. This enabled them to manage progression from one centralized location. “Some games manage this data with long lists, but I prefer modules,” shares Cubasch. “I can just click or duplicate a module, and I really like that workflow.”

Structuring quest data with Scriptable Objects helped manipulate game data and keep Reference Exception errors to a minimum. “If we need to add more stuff or delete, it’s very easy to make adjustments,” specifies Scaramuzzino. “The iteration of level creation was much smoother because of that.”

Speeding up character design

Scriptable Objects also influenced character creation. The team worked on a large number of individual character assets – eye color, hair color, clothing, and headgear – and used parameters to generate configurations randomly. This sped up Prefab creation considerably. Most background characters are fully randomized, whereas main characters are customized in the Unity Editor. These Scriptable Objects are then exported and dropped into the game, where Prefabs are generated at runtime.

Managing localizations

To simplify switching between languages, Firepunchd linked a Scriptable Object to the database containing Tentacular’s localization strings. The Scriptable Object has functions for checking against the font/typeface and presence of certain characters. “We probably could have done this with different tech,” admits Cubasch, “but because Scriptable Objects are so convenient to use, for us it’s always a good place to go.”

“All of the localization strings are in a Google Sheets document. You can pull the data from a Google document using the Google API and populate the Scriptable Object,” explains Scaramuzzino. “This way, we can be sure that every time we build, we have the latest version of the localization files.”

Source: Unity Technologies Blog