# Data centred architecture design question

This topic is 4534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm using the date-centred architecture for my game, and I'm trying to decide on how the data should be layed out, I have 3 ideas: 1. Some kind of branching tree that uses hashmaps with string names to get at the data, eg:
data--->window--->width
--->height
--->entities--->0--->position
--->orientation
->1--->position
--->orientation


Pros: easily edited data structure, data can be initialised easily in a xml file Cons: may be slow because of excessive use of hashmaps(eg string search for data's pointer) 2. Class based method, eg:
class Data {
Window window;
vector<Entity> entities;
}; //etc etc


Pros: Very fast Cons: Requires alot of classes, eg get/sets funcs aswell 3. Relational Database Doesn't have to be a real database, just the data layed out like one. pro/con: not sure. So how is data generally layed out when using this architecture? Thanks

##### Share on other sites
You might want to take a look at Eric Malafeew's GDC 2005 session Data-Driven Programming Made Easy (PowerPoint presentation).

• 10
• 13
• 14
• 18
• 15