Jump to content
  • Advertisement
Sign in to follow this  
swinchen

Design help needed (UML overview)

This topic is 4930 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

Wow good stuff! That makes a lot more sense now.

So basically you have a std::map of std::maps. The outer is a map of groups, and the inner is a map of textures. That makes sense.

I can't even begin to imagine how you model things like those typedefs in UML.

STL seems to be very powerful. I think I will need to look around for some more reading material on it. Koshmaar: Are there any other web resources that find to be very useful?

Thanks.

EDIT:

Why: typedef std :: map < std :: string , TextureHandle > TextureGroup;
Instead of: typedef std :: map < std :: string , TextureHandle* > TextureGroup;
?

Share this post


Link to post
Share on other sites
Advertisement
Quote:

I can't even begin to imagine how you model things like those typedefs in UML.


Typedefs aren't modeled in UML :-) AFAIK when you want to have typedef in UML (so that users will be aware of it) you can write that typedef directly in comment, class definition etc.

Quote:

STL seems to be very powerful. I think I will need to look around for some more reading material on it. Koshmaar: Are there any other web resources that find to be very useful?


Yup, Google and C/C++ reference are nice :-) And remember to read those from my last post, they're really great (I learned from them).


Quote:

Why: typedef std :: map < std :: string , TextureHandle > TextureGroup;
Instead of: typedef std :: map < std :: string , TextureHandle* > TextureGroup;
?


TextureHandle have only few integers inside, so it would be overoptimization to keep pointer to TextureHandle allocated on heap. Also, it's more error-prone, less safe, you have to check for nulls (ie. from new) etc.

Share this post


Link to post
Share on other sites
Thanks for all the help Koshmaar.

I managed to get a little program slapped together using a texture manager similar to the way you do it (although no groups, and no directories)

Here is my little demo tiles.zip



So how do i join your team? lol :)

Share this post


Link to post
Share on other sites
No prob :-)

Nice demo, but why sources aren't included? You know, there's nothing to lose when even Carmack releases sources of Quake3 :-)


Quote:

So how do i join your team? lol :)


My team? I don't have any team ;-) some time ago there were 2 people in "team", but their help limited to sending mails etc. And sorry, now I'm one-man orchestra, no help needed :-)

Share this post


Link to post
Share on other sites
lol. I didn't include the source because.. well at the end I got a little lazy. (I hard coded a few contants where a few constants ought not to be hard coded.)

So basically I was a little embarassed by my code. Seeing some of the code that gets pasted around here, I am feeling a little outclassed (no pun intended) :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!