1
\$\begingroup\$

I've read the definition of a data-driven game engine, in several places, and one item usually mentioned is the game rules: separating them from the logic of the engine. What is meant by a "game rule"? How could it be considered data?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ "I've read (...) in several places". Where? \$\endgroup\$ Commented Sep 18, 2012 at 13:09

2 Answers 2

3
\$\begingroup\$

A data-driven game engine is one that successfully separates game-specific logic (what you call "game rules") such as weapon types, HUD layouts, keybindings, etc. from the engine's core functionality. This is achieved by having scripts or code outside of the engine that call upon the engine's functionality to build the gameplay. An example would be a game-specific HUD element that is implemented by calling upon the game engine's Sprite/2D graphic functionality. The reason data-driven engine architecture is important is because it allows the same game engine/code base to be used to support multiple game types, without having to strip out or modify core components. Below are a few articles I think you may find helpful in understanding data-driven game engine design:

\$\endgroup\$
3
  • \$\begingroup\$ This was very helpful. Now that you've explained what the engine doesn't do (what is factored out), what does it do? It's core responsibilities? \$\endgroup\$
    – KeithM
    Commented Sep 20, 2012 at 11:21
  • \$\begingroup\$ The engine is responsible for providing the base functionality that the games that use it are built upon. While the engine would not implement the HUD, it would provide sprite/2d graphic capabilities that game developers would utilize to implement the HUD they want. Likewise, the engine wouldn't implement specific characters, but it would provide a generic actor/character class that would handle things like loading models, textures, animations, and and provide methods for utilizing them, simplifying the development effort required by game developers. \$\endgroup\$ Commented Sep 21, 2012 at 14:47
  • \$\begingroup\$ Thank you for your time. Very nice explanation both ways. \$\endgroup\$
    – KeithM
    Commented Sep 27, 2012 at 23:02
0
\$\begingroup\$

The only way a game rule can be data is if it's an external script. But this method has its drawbacks like simplified cheating.

P.S. It's the first time I hear that a data driven game engine has a solid definition. Anything that includes the word "driven" is usually just a bunch of buzzwords glued together.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .