Intro
Time for another devlog!
As the title says, Everhood is getting bigger and bigger! We managed to add tons of new game content in a very little lapse of time. At some point, when a project is getting huge, a little thing can break all the game, especially when we talk about in-game logic. Trying to find where the errors are located is really time-consuming and tiring…
When working on my last project, I hit a point where the project was unmanageable, messy with errors and bugs everywhere! The project was canceled. The positive thing is that I’ve learned A LOT.
Now I’m here to give you some tips to successfully handle big projects.
Handling big projects tips
Organize scene and asset structure from start
Organizing your project structure from start, will not only help you build a workflow but, also keep your scenes robust.
Version control
Sometimes, even if your project is super clean and well structured, weird things can happen. If a bad thing happens, and you don’t have any version control,you’re going to have a good time. This is why I suggest you use a version control software. For Everhood, we use Git.
KISS
You know the drill, keep it simple stupid!
Communication
Communication is key if you’re in a team of 2 or more people. Invest your time to talk with your team to share and teach them the project workflow and tools.
Focus on working code
Do not worry about making your code perfect, focus on doing it as best you can.
Create tools
Take your time to create some useful tools to speed up development. In Everhood, we have tools for battles, dialogue, scene transition, game localization, variable listener and much more!
Readable code
It may sound obvious, but, sometimes we tend to forget it. Readable code lets you easily debug if there is any error or unwanted behavior. Try to be consistent with variable naming.
Here is how I name my vars :
public static int Value; public int value; private int _value;```
Handling big projects tips Unity c#
[SerializableField]
Sometimes you want some variable to be public to access them from the inspector. If you want JUST to tweak the variable from inspector instead of this :
public int value;
Use this :
[SerializableField] private int value;
It will serialize the variable to be able to access it via the inspector.
SPS (super persistent singleton)
From my point of view, singletons can be really good to handle something like a Game Controller. The problem is that you will get a bunch of broken dependencies errors if you load a scene without initializing singleton, sometimes, it can be very tiring. My solution is to let the singleton initialize itself before the scene load using this :
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void OnBeforeSceneLoadRuntimeMethod() { // create instance }```
I hope you enjoyed these tips! Big things are coming to Everhood!
//Jordi
Official email: [email protected]
Newsletter: https://mailchi.mp/061b366aac4d/everhood
Discord Channel: https://discord.gg/fwEed4F
3 comments