Hello everyone. Debated putting this in the scripting section… but I have no programming questions necessarily. I just want to pick people’s brains about maximizing Unity’s component based design paradigm.
I’m not a formally trained programmer. What I know, I’ve picked up over years of self-learning. My apologies if this question sounds “noobish”, but there are indeed people on here far far FAR more experienced than me who may be able to provide some jewels of knowledge.
I’ve come to love Object Oriented programming langauges (C# in particular, Java is also great). My problem now that I am using Unity… is that I tend to cling to my old patterns of designing class hierarchies. So far it’s worked well enough. I’m more than able to pull off a good deal of things using Unity… and quite quickly. My main concern is that my code is rarely flexible enough to easily plug into other games/projects that I am working on…without of course some odd copy/paste/modifications.
Currently I’m developing a few things for the community to use… and I want to maximize their flexibility/re-usability in a multitude of projects so that users around the Unity community actually find them useful and easy to use. My main concern at the moment is that I am horrible for creating tight coupling amongst classes. This coupling makes my code frameworks a lot less usable to someone who isn’t me (aka the designer). I just want to ask if you guys/gals have any suggestions on how to truly maximize the use of component based architecture.
My current challenge is a Cube-Based Strategy board (think Final Fantasy Tactics) framework that I am working on. I have a good deal of it working, but when I look at my code, I realize how difficult it will be for a user who wants to make a type of game like this, to use my package with their own code. I would much rather provide a solid set of simple components that allow the user to customize what they are creating, rather than providing prefabs constructed with a rather complex class hierarchy attached.
Anyways I’m rambling… what is the best way to create components that can easily be used across multiple projects? Thanks in advance! All advice is appreciated.