11
\$\begingroup\$

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?

\$\endgroup\$
  • 3
    \$\begingroup\$ Welcome to the site. You have two questions here (generally you should ask only one question per post), and the second question about "how to get started" is considered off-topic, so I've edited it out, as well as pared the question down. If you want to have discussions about how to get started with something, consider visiting the Game Development Chat. \$\endgroup\$ – Josh Jul 23 '13 at 14:24
  • \$\begingroup\$ @JoshPetrie But that was the most important one as I've been to many sites now and got no answer whatsoever. Not even a poke in a direction. There must be SOME people who got a bit of insight on these subjects. \$\endgroup\$ – OmniOwl Jul 23 '13 at 14:29
  • 1
    \$\begingroup\$ Also related: gamedev.stackexchange.com/questions/17331/… \$\endgroup\$ – Josh Jul 23 '13 at 14:29
  • 1
    \$\begingroup\$ Perhaps it's the most important to you, but it's off-topic here (see the faq). I could also have just closed the question. Visit the Game Development Chat or an actual discussion forum like GDNet if you want to ask how-to-get-started questions. \$\endgroup\$ – Josh Jul 23 '13 at 14:30
  • 1
    \$\begingroup\$ @Vipar Pop into chat if you want help with the off topic question. Not guaranteeing you will get help but a lot of smart people hang around there . \$\endgroup\$ – ClassicThunder Jul 23 '13 at 14:38
10
\$\begingroup\$

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<CreatureState> 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.

\$\endgroup\$
  • \$\begingroup\$ Yes I forgot to mention the separation part. And this is exactly the kind of thing I'd like to see. I can only read so much theory. I need to see some concrete examples. Thank you. Will also have a look at the articles! \$\endgroup\$ – OmniOwl Jul 23 '13 at 14:38
  • \$\begingroup\$ Oh wait finally found the best explanation I read a while ago. Turned out that it was an answer on a question I asked here gamedev.stackexchange.com/questions/48971/… :D \$\endgroup\$ – Roy T. Jul 23 '13 at 21:50
4
\$\begingroup\$

I think you are overcomplicating the definition. Certainly, many of the principles contained in your bulleted list of points are good ones from a software engineering perspective, but they aren't all necessarily part of the definition of "data-driven." Many of them have some overlap, or are best implemented using a data-driven approach, but don't constitute the act of data-driving something.

The actual definition of data-driven software development is generally fairly simple: a program performs actions mainly based on some outside information (a piece of level data, script data, et cetera) instead of having a series of predefined and fixed steps within the code itself that determine control flow.

\$\endgroup\$
  • \$\begingroup\$ You are most likely right that I over-complicate things. It's something I tend to do. But I can't wrap my mind around how to start coding this. \$\endgroup\$ – OmniOwl Jul 23 '13 at 14:41
  • 1
    \$\begingroup\$ I posted an answer to your question on GDNet. The crux of the issue is: stop trying so hard, pick a single simple aspect of what you ultimately want and build a small game with it. \$\endgroup\$ – Josh Jul 23 '13 at 14:55
  • \$\begingroup\$ I saw and I also responded back. Thank you for taking the time to talk to me about this. \$\endgroup\$ – OmniOwl Jul 23 '13 at 15:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.