Jump to content
  • Advertisement
Sign in to follow this  
MrDarkKnight

how to save 3D map?

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

Hello guys
I have been learning 3d programing for the past couple of days and i was just wondering how do i save a 3D map?

For example in a 2D game you just write a 2d array of number to text file, each number corresponds to a specific tile.

How do I that in a 3d game?
For example if I have couple of 3d house models or some other models how do i store their position in a 3d world?

Share this post


Link to post
Share on other sites
Advertisement
Hello guys I have been learning 3d programing for the past couple of days and i was just wondering how do i save a 3D map? For example in a 2D game you just write a 2d array of number to text file, each number corresponds to a specific tile. How do I that in a 3d game? For example if I have couple of 3d house models or some other models how do i store their position in a 3d world?


Thats really up to you and it is usually something highly game dependant.

You could for example use a tile system for 3D games aswell if you want, or you could store the world as a list of objects (with x,y,z positions) + a heightmap for the ground/landscape, or as one giant mesh, or well, whatever suits your game really.

Share this post


Link to post
Share on other sites
Ok I have another question about maps, and I thought why create new topic.
Anyways, right now I have a 3d camera and I can move around my 3d world. Its just a simple room and a hallway. The thing is, I create this world just by writing the vertices and it took me some time to do it.
This is my game map.

52 vertices
-3.0 0.0 -3.0
-1.5 0.0 -3.0
0.0 0.0 -3.0
1.5 0.0 -3.0
3.0 0.0 -3.0
-3.0 0.0 -1.5
-1.5 0.0 -1.5
0.0 0.0 -1.5
1.5 0.0 -1.5
3.0 0.0 -3.0
-3.0 0.0 0.0
-1.5 0.0 0.0
0.0 0.0 0.0
1.5 0.0 0.0
3.0 0.0 0.0
-3.0 0.0 1.5
-1.5 0.0 1.5
0.0 0.0 1.5
1.5 0.0 1.5
3.0 0.0 1.5
-3.0 0.0 3.0
-1.5 0.0 3.0
0.0 0.0 3.0
1.5 0.0 3.0
3.0 0.0 3.0
-3.0 1.0 -3.0
-1.5 1.0 -3.0
0.0 1.5 -3.0
1.5 1.5 -3.0
3.0 1.5 -3.0
-3.0 1.0 -1.5
-1.5 1.0 -1.5
0.0 1.5 -1.5
1.5 1.5 -1.5
3.0 1.5 -1.5
-3.0 1.0 0.0
-1.5 1.0 0.0
0.0 1.5 0.0
1.5 1.5 0.0
3.0 1.5 0.0
-3.0 1.0 1.5
-1.5 1.0 1.5
0.0 1.0 1.5
1.5 1.0 1.5
3.0 1.0 1.5
-3.0 1.0 3.0
-1.5 1.0 3.0
0.0 1.0 3.0
1.5 1.0 3.0
0.0 1.5 1.5
1.5 1.5 1.5
3.0 1.5 1.5


My question is, how can I create a single simple room without the need of writing every vertices myself?
Now all these vertices were hand written and it took some time to do them, what if I have a big world with 3 or 5 rooms, how can I build these rooms?
Do I use software like blender 3d or 3dmax to create a room and load it into my game?

And how do companies build their maps? How do they build the rooms and hallways etc... ?

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!