Sign in to follow this  
Followers 0
vipar

Data Driven Design: Questions (and Answers?)

10 posts in this topic

I've been reading up on a lot of articles which covers the subject of Data Driven Design (DDD) when making games.

 

It seems to come down to:

  • No Hard Coding
  • No Game Specific Code in Engine
  • Scripting (ai, cut scenes, etc.)
  • Generalizing Code for Max Reusability
  • Component Design
  • Modularity
  • Low Coupling
  • Editors (Data, Map, Scripting)
  • External Data Retrieval
  • Constants kept in Text Files (INI or otherwise)
  • Expose Data through Editors for Scripting/Manipulation for Designers

Now, my first question is of course: Is this understanding correct? (From an Objective Point of View if possible)

 

One of the editors I looked at was Warcraft 3's Map Editor (WC3 ME) since I've had the most experience with it over my years of obsessive gaming. For those who don't know, the WC3 ME is the tool used to make custom maps in WC3. You had the power to pretty much alter anything within the engines limitations be it Units/Abilities/Items (Raw Data Editing like in a Database), Maps (Level Editor) or Triggers (Event Based Scripting Editor). You could also write in Blizzards custom language called JASS to gain absolute control of the language the the Trigger Editor tried to cover in as much detail as possible. The WC3 ME was often considered the "Engine" of the game.

 

My dream is to make an engine for my games which can be as extensible, modable and easy to configure engine as the WC3 Engine. Other examples from more recent games would be Starcraft 2 and Skyrim both also following DDD. Popular DDD engines are UnrealEngine (UDK) and UnityEngine (Unity). Some would argue Torque, but from what I understand it violates some of the core principles of DDD. Especially with it's heavy realiance on the scripting system that kind of developed into it's own programming language which is not part of DDD.

 

The problem I seem to have though, is where to start. I can't wrap my mind around how to execute this methodology in code. The engine needs to be very abstract so that I can make many different games with little to no edits in the engine itself. My goal is to first make a simple (at least in theory) 2D tile engine to follow styles such as that from Pokemon or A Link to the Past. Moreso the latter because it uses a tile system but got free movement in all 8 directions.

 

My second question is: Do you have any points on where to start?

 

I would use an already existing framework to make the engine and not make my own OpenGL bindings and such. Something like Tao or SFML.

 

So that is that. I hope we can have some good discussions in this thread and perhaps get together to get resources on these subjects as they are very sparse...from what I have tried to find any way!

Edited by vipar
1

Share this post


Link to post
Share on other sites

Never heard of design paralysis but I guess it makes sense, given your description.

 

When I learned about Object Oriented Design for my first courses in Java, I sat down and read a book about Java for about 5 months. Then it finally clicked and all the theory I had read over time about how OOD works, suddenly made sense and I could pretty much utilize it all from the get got. It was the same concept I wanted to apply to learning Data Driven Design. When it clicks I learn incredibly fast and can apply the theory I've previously read with ease. I wanted to understand DDD in it's simple form. Which I do. I understand, in theory, how it works. I just can't apply it to code. It's just very different from OO.

 

I am not reading others code to get there but now I've reached a point where reading code is beneficial because I understand most of the theory behind it. It's just how I learn unfortunately.

 

My dream is to end up with a very flexible engine, yes. I am no fool though and know it will take time and effort to get there at least. It won't happen overnight ^_^

I just really hate the notion of starting to code something and have no one by my side to consult with over it. Which is why I like getting taught by teachers rather than reading books or courses on the internet. If I make things wrong from the get-go and learn nothing I feel I've wasted my time.

0

Share this post


Link to post
Share on other sites

When I learned about Object Oriented Design for my first courses in Java, I sat down and read a book about Java for about 5 months. Then it finally clicked and all the theory I had read over time about how OOD works, suddenly made sense and I could pretty much utilize it all from the get got. It was the same concept I wanted to apply to learning Data Driven Design.

 

 

The thing is that despite a similarity in names, object-oriented design and data-driven design are different classes of concept entirely. The former is more structured an idea than the latter. I'd also challenge your assertions regarding your understanding of OO at that point in time, because many academic programs focus entirely on the wrong parts of OO and without using it extensively on real software, you don't really build up a true, "battle tested" understanding. One can acquire a passable understanding of a concept through books and other references, but until you really start using things in practice you have no idea how much you don't know you don't know.

 

I just really hate the notion of starting to code something and have no one by my side to consult with over it. Which is why I like getting taught by teachers rather than reading books or courses on the internet. If I make things wrong from the get-go and learn nothing I feel I've wasted my time.

 

You really need to disabuse yourself of this notion. Making mistakes is a critical part of learning and if you try to avoid it, you're only holding yourself back. Build games, and when you have questions or get stuck, you can ask people on the internet. Stop being afraid of doing it wrong. Everybody has, everybody will continue to do it wrong and make mistakes -- professional engineers who have been building games for ten years still make them happily.

 

You are holding yourself back by not trying to train yourself out of that pattern.

Edited by Josh Petrie
2

Share this post


Link to post
Share on other sites

You really need to disabuse yourself of this notion. Making mistakes is a critical part of learning and if you try to avoid it, you're only holding yourself back. Build games, and when you have questions or get stuck, you can ask people on the internet. Stop being afraid of doing it wrong. Everybody has, everybody will continue to do it wrong and make mistakes -- professional engineers who have been building games for ten years still make them happily.

 

 

 

You are holding yourself back by not trying to train yourself out of that pattern.

 

I think you misunderstand me on this point. I am not afraid of making mistakes.

I just really dislike making mistakes and learn nothing.

0

Share this post


Link to post
Share on other sites

A decent tool for XML serialisation is tinyXML2. There is no benefit in chosing JSON over XML in C++ as neither of them will deserialise directly to C++ data structures like JSON does in Javascript.

 

Data Driven Design can be used together with an OO hierarchy, by using a praser and a factory you can construct the instances the data is specifying and initialise them with data from the data.

-1

Share this post


Link to post
Share on other sites

A decent tool for XML serialisation is tinyXML2. There is no benefit in chosing JSON over XML in C++ as neither of them will deserialise directly to C++ data structures like JSON does in Javascript.

 

Data Driven Design can be used together with an OO hierarchy, by using a praser and a factory you can construct the instances the data is specifying and initialise them with data from the data.

 

That is a nice suggestion. But I was hoping I could carry it out in C# as C++ is still too overwhelming for me to comprehend.

Are their other similar libraries for C#?

0

Share this post


Link to post
Share on other sites

C#'s base class library has support for XML deserialization (I prefer the XDocument API over the actual XML serialization APIs, personally). There are 3rd party libraries for JSON as well, if you'd prefer. Search around and find something you like.

0

Share this post


Link to post
Share on other sites

C#'s base class library has support for XML deserialization (I prefer the XDocument API over the actual XML serialization APIs, personally). There are 3rd party libraries for JSON as well, if you'd prefer. Search around and find something you like.

 

Yeah I knew about XDocument, so was curious to see if there were others.

0

Share this post


Link to post
Share on other sites

I use serialization quite often, both at the binary level and xml level.  You can even do simple text readers.  If you want to move into databases you can do a MySQL database or an Access database that drives your application.  

 

XDocument is good.  If you really want to understand the guts... write a serializer in C#.  Compared with overall game development, file serializers are fairly straight forward.  

0

Share this post


Link to post
Share on other sites

I use serialization quite often, both at the binary level and xml level.  You can even do simple text readers.  If you want to move into databases you can do a MySQL database or an Access database that drives your application.  

 

XDocument is good.  If you really want to understand the guts... write a serializer in C#.  Compared with overall game development, file serializers are fairly straight forward.  

 

Aren't XDocument already serializable?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0