Archived

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

Game World ... loading/file format

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

I need to to what actually is saved in the World files that most 3D game uses (like Serious Sam, Unreal Tournament). My general idea is the world saves the level(terrain .. ) , Skybox, models, entities etc. But for a 3D world how can i make a world file format that i can read in to load a game level? As far as my knowledge is concerned i know that loading worlds of .3ds format is not a good idea. But then i require my own file format for worlds and models. I need some help on how to make my own file format ....

Share this post


Link to post
Share on other sites
I cant specifically answer your question but i can direct you to Wotsits file formats which is the best place on the web for researching file formats

EDIT: just noticed the screwed link, fixed now





[edited by - Spudder on June 5, 2003 12:46:15 PM]

Share this post


Link to post
Share on other sites
Well for my entity data I use XML, which is easily read into the program. Well I say that, but I haven''t actually finished my whole system yet. Also XML can''t be used for geometry data. For my game I use models and terrain anyway, so it doesn''t matter. Read SuperPig''s article in the article and resources section on XML, if you want to know more.

The article

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you actually could use .3ds if u like
just use an octree to sort it
take a look at gametutorials.com
they have a .3ds octree tutorial

Share this post


Link to post
Share on other sites
But loading a whole world with .3ds would be inefficient as it will be slow and take lot of memory. Possibly thats why commercial games use their own file format. So i''m trying to find a way to create my own file format to save my world...

Share this post


Link to post
Share on other sites
quote:
Original post by skremon
So i'm trying to find a way to create my own file format to save my world...


Having EVERYTHING for a whole world in one file is kinda hard to do. You'll need some way of combining geometry, sound and textures (as well as other variables etc) into the one file which is gonna be hard to code and ready back. The best way I've found to do it is to actually have a number of different files which just tell you what geometry/sound/texutre files to load. My current project uses a setup like this:

Levels.cfg <-- global config file
---------------------------------------------------------
number 2 <-- total number of levels avaliable
moutainLevel.cfg <-- first level file
riverLevel.cfg <-- second level file

moutainLevel.cfg <-- specific map config file
---------------------------------------------------------
map hill.geo <-- geometry file
skybox moutains <-- skybox picture set
sound wind.mp3 <-- ambiant sound
... <-- anything else like gravity constant etc


The point is that when i load my game I read in the Levels.cfg which is hard coded in. Then that will tell me how many levels i currently have, and the filename of the config for each level. Then if I want to load in the mountain level - i know to look in moutainLevel.cfg for all the details. This is a great idea for 2 reasons. [1] Its easy to write the files up by hand and then edit them to add more levels or details etc if needed and [2] You can write your level congigs however you want which makes the loader easy to write because you know exactly how it all works. This way your actual sound/texture/geometry files stay seperate so you don't have to worry about joining/splitting them and you can swap things in and out as needed with no fuss! If your worried about your root dir getting to messed up then try useing directories for each map, and having every file stored in a maps directory or something.

ok i'll stop now!


- kaysik

[edited by - kaysik on June 6, 2003 4:18:08 AM]

Share this post


Link to post
Share on other sites
Thanks for help. So your idea is to have a config file for the world and load each object/entity by reading the content of the file... sounds neat to me.
Now a days every game comes with a level designers. After designing a whole level with terrain, skybox, models they save the world in some native file format. Can anyone tell me what information actually goes into that file? Do they save configuration/geometry information .. or .. the whole worlds model like in .3ds?

Share this post


Link to post
Share on other sites