The Last Night,
The Last Night's Game Architecture
The Last Night is based on a vision: immerse the player into a relevant depiction of the future, via an open world seamlessly blending simulation & unique situations.
This mix of systemic & scripted content required to invest heavily into architecture & tools to support this vision, especially given that Unity, our engine of choice, isn’t really designed for open worlds.
My name is Nicolas, Lead Programmer at Odd Tales, and I’m about to show you some outputs of years of research & development, in this presentation I originally made for the RGB Games Programming Conference in Switzerland.
Click on the three vertical dots and select “Enter full screen (CTRL+Shift+F)”.
- Architecturing a non-systemic game in Unity is complex due to engine design.
- Avoiding spaghetti code in Unity requires special care & serious investment in R&D.
- Decoupling features makes everything easier, from collaboration to debugging. It’s also more scalable and future-proof, with every part being independently reusable across projects.
- Our variable architecture allows us to create “agnostic components” that can input & output values from anywhere.
- We’re giving the ability for team members to choose the scope of variables directly in the editor: local, external (from another component holding the value, even cross-scene), global (from a ScriptableObject living in the project), or from saved data.
- While fetching values, we can pass them through stackable modifiers, opening up powerful possibilities for designers.
- Values can also be fed from our visual scripting graph for the most advanced setups.
- Our visual scripting solution is 14 times faster than Unity Visual Scripting, and furthermore avoids memory allocations.
- Visual scripting isn’t a silver bullet: without discipline, it just displaces the spaghetti from code to designer-land.
- But with best practices in place, this agnostic code / visual scripting approach makes it possible to have a game where features are perfectly decoupled.
- Our “API” approach to core components like doors, limiting themselves to common features & inputs / outputs, allows robust customization by designers, eliminating the need to hard-coding dozens of special cases.
The following talks introduced us to ScriptableObjects back then, and put us on track to design a holistic architecture & set of tools around them.
We hope that by sharing our findings, it might help your journey with your own game. Our efforts & investments paid off beautifully - our proven architecture and the robust set of tools built upon it are now powering The Last Night, and will serve as powerful & reliable foundations for all our future games.
The Last Night,
Two years ago, Odd Tales and Raw Fury agreed to part ways on The Last Night.
Secrety perfecting our visual style. Low-fi assets, hi-fi rendering.
Enter behind the scenes and discover how we created our e3 trailer.