Saturday, February 22, 2020

terminology - What is data-driven design?



I've been reading up on a lot of articles covering data driven design for games. It seems to come down to:




  • No hard coding

  • No game-specific code in the engine

  • Scripting for AI, cutscenes, et cetera.

  • Generalizing code for reusability

  • Component design

  • Modularity

  • Low coupling

  • Editors (for data, maps, scripts)

  • External data retrieval


  • Constants kept in text files (.ini or otherwise)

  • Expose data through editors for scripting and manipulation by designers


Now, my question is, is this understanding correct?



Answer



I'd say this is not correct. I believe the most important idea in data driven design is separating your data from what modifies (or updates) the data.


So going from a standard OO deep hierarchy like this:


class MyCreature{
vector position;
void update(){ position += 1; }

}

to a separate state and system


class CreatureState{
vector postion;
}

class MovementSystem{
list states;
void update() {

for each CreatureState state in states {
state.position += 1;
}
}

On of the most influential DDD paradigms at this moment are Entity Systems. Some nice resources to look up are:


http://gamedevrubberduck.wordpress.com/2012/12/26/a-hybrid-entity-system-component-architecture/


http://entity-systems.wikidot.com/


Of course as with all paradigms/ideas there isn't an exact definition and not everybody understands the same idea when talking DDD but this is what I believe the most important thing.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...