Sign in to follow this  

Data centred architecture design question

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

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