Jump to content
  • Advertisement
Sign in to follow this  
Inukai

Own Map-editor: How to save my terrain?

This topic is 2474 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
I'm kinda new to 3D-programming.
I know how to create a terrain with vertices and how to load and animate models.
Now I want to programm a mapeditor for my game.However, My idea is to create a list of vertices in my editor and save this list in a
xml-File and load this file in my game. Is this the right way to do it? Or is there an easier way to do it?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

Saving terrain to an xml-file depends greatly on the amount of data. You should make some simple calculations to see how much space it will take to save a typical terrain, then you can assess if it is reasonable or not.

Cheers!

Share this post


Link to post
Share on other sites
A format with binary data but meta data in the head of each array would be more efficient than XML since you have a lot of information and no need for deep nested structures.

Share this post


Link to post
Share on other sites
hello.
if your terrain is using a height map, you may be better of rebuilding the terrain mesh when you load the map.

The way I've done it in the past is to create a class mapheader that I hold all relevant information to recreate the map,
this way if its a network game you can send the maps.

E.g.
class MapHeader
{
public:

POINT MapSize;
texturesnames;
other things
};

then you make a map manager(oops Manager class)to save and load the maps.

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!