Everhood code architecture thoughts
When it comes to programming architecture, sometimes, new devs can be a little lost.
Here are my thought about how is Everhood architecture and what is the most suitable way to work with it for unity in my humble opinion.
What is code architecture?
A code architecture is basically a set of rule that defines the procedure to writing code.
By creating a workflow you unlock the power to create a more robust and stable game structure, easy to customize and extend.
An example of rules would be :
- How objects interact with each other?
- How do you hold references?
I recommend you to check out S.O.L.I.D principles, these guidelines will help you to keep a robust, stable and clean code.
Code architecture for Unity
There is a bunch of code architecture and patterns,this is where sometimes we get lost.
So what is the most suitable code architecture for unity?
Well, the most efficient way to work with unity is to work with unity.
What I mean by that is that unity is component-based architecture. Instead of thinking that everything is a class, we need to think that everything in the scene is a GameObject.
The idea is to work alongside Unity component-based architecture.
|- GameObject Player |- Component Move |- Component Attack |- Component Interact
Everhood code architecture
In Everhood's case we haven't encountered any big issues, just small issues that were easy to fix.
In this project we use a component-based architecture, meaning that Unity and Everhood are in harmony.
The game also uses ScriptableObject workflow, a very good approach too.It helps us to store parameters like settings and projectiles speed. I will surely talk about it in another devlog :D
Principles example playlist
Inheritance and Composition
Leave a comment
Log in with itch.io to leave a comment.