by:
Nicolas Regnault
Category:
Publications
Topics:
The Last Night,
Game Development
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.
Talk
Slides
Click on the three vertical dots and select “Enter full screen (CTRL+Shift+F)”.
Key takeaways
- 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.
SOLUTION | C# | UNITY VISUAL SCRIPTING |
|
---|---|---|---|
TIME | 9.5 ms | 676 ms | 47 ms |
MEMORY ALLOCATION | 0 MB | 11 MB | 0 MB |
- 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.
References
The following talks introduced us to ScriptableObjects back then, and put us on track to design a holistic architecture & set of tools around them.
Conclusion
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.
by:
Nicolas Regnault
Category:
Publications
Topics:
The Last Night,
Game Development
more?
We think you'd like these.
-
Odd Tales & Raw Fury are parting ways on The Last Night
Two years ago, Odd Tales and Raw Fury agreed to part ways on The Last Night.
-
The Last Night now targets next-gen
Secrety perfecting our visual style. Low-fi assets, hi-fi rendering.
-
Journey to One of the Most Beautiful Games of E3 - IGN First
Enter behind the scenes and discover how we created our e3 trailer.
Wishlist
Show your interest. As a young studio, it helps getting leverage.