Hi there! We are developing a 3D Open World game with a cooperative element (1-4 players, players versus monsters in the world) with an isometric camera perspective. We are currently in the 3th month of development, and the project will be quite extensive, involving around 15 people, including 5 programming engineers. Ultimately, the project is being done for PC with the possibility of later porting to the latest consoles. I have question that arose during my research:
What code architecture to adopt? Initially, we were thinking of starting with Zenject (I also looked at VContainer and Reflex), but it relies heavily on reflection, which works slowly and has issues with reflection in AOT, plus it creates an invisible architecture with dependency injection. Scriptable Object Architecture, due to its granularity, may cause problems with a larger team, so it's not a preferred option.
Ultimately, I was thinking of something like this:
- Netcode for GameObjects
- Scenes loaded additively: meaning we have a Persistent scene that is never unloaded, a Gameplay scene, and loading World Chunks.
- Attach service locators contextually, somewhat like subsystems in Unreal.
- Divide the code responsibilities between the Server and Client and further stick to small modules with assembly definitions.
- Automated tests, including unit tests and integration tests using Unity Test Runner.
I understand that each project will require a different architecture, but using solutions like Zenject, I feel like I'm fighting against the engine. There is also an issue with finding resources on how to scale large projects in Unity, what architecture to adopt, and what options are suitable for Unity. Generally, most samples are either showcase projects or very indie in scale and may not necessarily be suitable for more robust scaling that maintains order in the project, scalability, and portability to other platforms.
Thanks in advance for your help! 🙂