A german word says...

Published October 27, 2004
Advertisement
"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.
Previous Entry My network...
Next Entry oh well
0 likes 3 comments

Comments

Gaiiden
A single word in German says that??
October 27, 2004 05:21 AM
Metron
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.
October 27, 2004 05:24 AM
Gaiiden
thought so
October 28, 2004 05:00 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement