H.A.A.R.P An Extremists Approach To Data Driven Design
In my short 1 year of programming I have gone to great extents to learn not only how to code but also the techniques and methods behind game architecture that make things work and keep the integrity, re usability and productivity of my code to a maximum.
Out of all the techniques I have come across there are two that really have taken the cake. These two techniques are (excluding OOP, thats a given):
- Finite State Machines
- Data Driven Design
Data Driven Design
For those of you who don'tk now or are not sure of what Data Driven Design is, here is a brief explanation.
Data Driven Design is when you don't hard code any constants into the game but rather draw out all the "data" required for your game from external files such as .txt files, .xml files or databases. Pretty much any data you can think of can be stored in a database externally from the code such as the following examples
- Material Paths
- Model Paths
- Camera Follow Distance
- Prop Attachment Offsets
- UI element's, textures, scale, position, parent, target etc.
- Weapon model,
- Weapon Power
- Weapon Fire rate
- Game Settings & Key Bindings
- etc. etc. etc.
Now anyone who knows me or has seen my posts and status updates would notice that I'm obsessed with Data Driven Design even to a point where it may even get annoying. However, I talk about it a lot for good reason. It is because the benefits of it are tremendous and it increases long term productivity and game design freedom to a new high not possible with simply coding constants.
With data driven design you can store all your data in an easy to find place in a database and access it and edit it easily without having to touch your code. This means no more wading through thousands of lines of code but simply going through a logically setup database to find the data. Say you don't like the run speed of your character. You have to close the game find the speed variable and change the value. This could take a while to find in your code and you have to then recompile again. Then you load up your game and if its not good you have to repeat the process again. However with DDD you simply have to change the easy to find value in the database and restart the game.
Another big pro is that you can easily make an every game with DDD. Why completely re-write the code for another RTS or FPS game if you have already coded one. With DDD you can simply change the models and values in the database and everything can look new without even recompiling. For an FPS game you can simply code only one gun, but have different stats and models in the database and already you can create pretty much any gun you'd ever want in an FPS.
Well I've done a lot of rambling just then so here is a video of something I'm making called H.A.A.R.P. With HAARP I have combined the power of Finite State Machines with Data Driven Design and taken the whole thing one step further to come up with a solution that stops me from re-coding things, reducing my workload and increasing my productivity in the long term.
I don't mind the time it will take to create this H.A.A.R.P implementation because as far as I've noticed so far the art assets get out of data 100x faster than code and this will allow me to concentrate more on making the game and less on coding once I've finished it so I will be able to get the art out quicker before it gets outdated.
- 3
12 Comments
Recommended Comments