Advertisement Jump to content


This topic is now archived and is closed to further replies.

Dreddnafious Maelstrom

Object Design Architecture

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

Hey all, now to the issue. I have a CMapLoader class that contains a dynamic array of Mesh Objects(which are also a class) You use my editor to create a text file(with the ever popular .map extension) and save it to harddrive. In the editor you can open and load the text file, and then in your code you call Map.Render and it renders all of the meshes in its array. So far it is working very well. I can load a library of mesh objects, place them in real time, rotate and scale them and build my scene just like i wanted to. (Yahooo!) then i save ot to my .map file and voila, scene persistance. My question is this. While i can load and maintain all of my static meshes with this system, i am having a problem figuring out how to include dynamic meshes(actors), also my skybox at the moment cannot be written to the .map file because it centers itself on the camera position( i think thats how everyone does it isn''t it?) My only solution i have worked out is to write a function that lets you enumerate the array and have the array return an index to the position of the element, but this seems like trouble, when you start talking about creating and destroying a bunch of objects. should i add a "Name" property and then do something like. In VB: Private externalMainDude as Actor Set externalMainDude = CMaploader.BrowseArray "MainDude" With externalMainDude .x = 0 .y = 20 .z = 100 .RotateX = 40 End With CMapLoader.UpdateProperties "MainDude", externalMainDude Where the "MainDude" string is treated is used to resolve which element in the array is what i am asking for. This will definitely work, but the problem becomes knowing what to ask for, if i have an array of 1000 elements its going to be a bitch to get each one and update the properties. Im not sure but i think this will also make it pretty impossible to use an event driven system like i had in mind. To summarize, with static entrys my current method will work just fine, im looking for an intelligent architecture to work with non-static actors and my skybox, and also my LOD algo on my terrain engine bases its "vertex-crunching" decisions on where the camera is currently placed. Sorry if this is unclear, if anyone will help, please feel free to ask any questions. thanks in advance, Dredd

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!