Jump to content
  • Advertisement
Sign in to follow this  
sunilsin

load world

This topic is 3619 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 all. I dont know is this question is asked before on this forum or not. I tried search but found nothing satisfactory. I am writing my own small level/ world class using DirectX 9. I want to know which is the best possible way to load the level/world for the game using DX ( not very complicated ). Should i write some text file then parse it and load the relative world x mesh model file. Is it possible to export the whole level from max into .x format? even if possible is it possible to find the individual object in level? I dont have any better idea about this. Can any one please provide me some guide on this. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I'm going towards the method of storing level information in xml files and storing geometry data in some other format (in my case would be Cal3D).

I'm thinking about having a level.xml file in which there is a description of which model files must be loaded for characters, objects and scenario. Once I have this working properly I may implement a layer of encription, or even implement some sort of virtual file system, but right now I'm more interested in seeing it working. Besides there are a good number of commercial games which have their content mostly in open/unencrypted individual files.

Share this post


Link to post
Share on other sites
If you're just starting to think about how your world is organized, having one big mesh file is probably not the way to go. Are you going to load and edit the entire world in max every time you want to move a bush 3 feet to the left?

For a simple world, a text file with references to object data files (like x-files) is probably a good place to start.

Text files are easy to edit outside your application and are generally easy to input and output.

Share this post


Link to post
Share on other sites
Thanks for your replay guys. If i have to implement XML or text based level loading system then should i have to implement my own exporter or i write them manually. OWL how you are generating your level xml file.

Share this post


Link to post
Share on other sites
I've currently in the phase of defining how my xml files are going to be. At this moment I've my level.xml file along these lines:


<xml>
<level id="0" name="Level 1">
<load>
<mesh type="character" file="char1.cfg"/>
<mesh type="character" file="char2.cfg"/>
<mesh type="world_obj" file="wo1.cfg"/>
<mesh type="world_obj" file="wo2.cfg"/>
<mesh type="world_obj" file="wo3.cfg"/>
<map file="map1.cfg">
</load>
</level>
</xml>


Currently my mesh files are Cal3D xml files and the map file I've yet to decide how is going to be, probably just an index of where world_obj are going to be located...

I use TinyXML to handle the xml files.

Share this post


Link to post
Share on other sites
http://www.andytather.co.uk/Panda/directxmax.aspx
I found this link very useful specially panda max tool. After doing some R & D i am writing my own max script to generate the level data from max. I am using Panda max script and dumping the scene info into XML file which i will used to load the level data. So now i dont have to export level as one big mesh :)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!