• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

A german word says...

Sign in to follow this  


"Sometimes you can't see the forest because of all the trees."

Well, that kind of happened in the last two days when I was spending time searching for a solution for a problem that doesn't really exist.

Here's the "pseudo" problem :

I have a map class that should be able to store all entities that are on a map into a save game. Therefor I have to save every entity.

Now, to create an entity, I normally use a template that is managed by my entity manager and that is stuffed into a category within the entity manager. To address a given template I only use the category and the name.

When saving the entities within the map file, I have to save the category where they are located because the next time I have to load the file, I have to be sure that the categorisation is still the same.

*BUT* the entities themself don't know anything about categories. So when I started to write the code (within the map class) to save the entities, I stumbled on the fact that I couldn't clearly access the category of an entity.

You see the trees ? So did I... but there was something hidden in the forest which I didn't consider :

The entity manager has, beside a LoadTemplates() function, a LoadEntities() function which can be used to load entities from a file directly into the entity management part of the entity manager. I simply have to write a save function there. The entities *are* stored in categories within the entity manager.

Doh is all I can say on this matter... I really did a Homer there.
Sign in to follow this  


Recommended Comments

eeeeh... no... in fact it's 7 words.

"Den Wald vor lauter Bäumen nicht sehen."

I meant to say byword... or proverb if you prefer.

Share this comment

Link to comment

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

  • Advertisement