Developing a configuration framework

Hi All
I’m in the process of developing a configuration framework that I can use across projects.
The reason this has come about is for a game I’m creating where the player can drive different vehicles, but will apply to other game assts as well.

Basically it’s a series of c# configs that all game assets will be linked to.
For example:
Let’s say that there are a vehicles in the project. Every vehicle would have basic properties that they share or can be modified depending on the vehicle. Then each subclass of vehicle can have it’s own set of properties

here’s what I have in mind for the parent/child structure for the vehicle class
Class vehicle //the basic vehicle config class
Class Tracked:Vehicle // for tanks, buldozers etc every vehicle that has tracks
Class Wheeled:Vehicle // cars, trucks etc every vehicle that has wheels
Class Air:Vehicles // basic aircraft config class
Class Prop:Air // propeller and jet aircraft config class
Class Helo:Air // helicopter class
etc etc

The same can be done with buildings, objects, AI, player, weapons.

The idea is that when an asset is created you drop the corresponding config script on the model, make adjustments to the model’s properties and move onto the next asset.

For weapons you could have fire rates, damage a bullet causes, what bullet model the weapon uses, etc.

Sounds like inheritance to me.

The stock standard monobehavior is an example of it, there is a ton of stuff ‘behind the scenes’ that we didn’t write but can use e.g. the ‘gameObject’ variable :slight_smile:

Camera inherits from Behavior which inherits from Component, which inherits from Object :slight_smile:

Yup. That’s what it is. Assets will inherit properties from what ever parent/s they need. At the root public properties will be preset, but at the child level the presets will be able to be altered depending on the asset (vehicle, weapon etc).
What i’m working on atm is a framework for vehicles which will enable me to select driver animations, vehicle sounds, specific vehicle animations etc without having to rewrite code for each vehicle. So far it is looking quite good. There is still a lot of work ahead, but I think in the long run it will pay off.