Game
Everhood

6 years ago

Everhood code architecture thoughts


Intro

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.

Example :

		
			|- 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

Useful links

Principles example playlist

https://www.youtube.com/playlist?list=PLB5_EOMkLx_WjcjrsGUXq9wpTib3NCuqg

Inheritance and Composition

http://www.sigtrapgames.com/unity-software-design-inheritance-and-composition/

S.O.L.I.D

https://youtu.be/eIf3-aDTOOA

ScriptableObjects

https://youtu.be/raQ3iHhE_Kk

//Jordi

Official email: [email protected]

Newsletter: https://mailchi.mp/061b366aac4d/everhood

Discord Channel: https://discord.gg/fwEed4F



0 comments

Loading...

Next up

The divine moments of creativity

Hectic week and some thoughts

Time to wrap up the game again!

Testing, fixing, testing and testing

Yummy schmukles for 2021 #screenshotsaturday

Yet another post

Lot of stuff right now!

A look back into the dark times

Everhood is out

Game engine version change and just polish, polish, polish