File format for world

Hi!
I’m developing a game engine for my course project. Now i’m confused with file format for saving the world. The engine is OpenGL based. And I can Use modeler as Milkshape or Studio Max. Now which format will be best for high parformance and large level loading? Any idea?

Can i use any existing file format? or should i build my own file format?

please reply

File format only really affects load time, not in-engine performance. Any format that contains the necessary info to display the world correctly can be transformed into a more efficient format upon load.

This is of course entirely off topic, but you probably want some kind of scripting involved in your world to make it come alive.

You could integrate your world loading with your scripting, so the “world” would be stored as a script which instantiates the right objects in the right positions, with the right orientations and appropriate customization.

Mock-up:

Entity(
Pos( 0,0,0 ),
Ori( 0,0,0,1 ),
{ mesh => “mesh/palmtree.x”,
diffuse => “tex/palm2.dds” }
)

Your world editor could either just execute the script, or it could parse the script separately and “save” means just writing out a script file that references the right geometries (symbolized with “.x” meshes here).

This particular example assumes the LUA scripting language, and user-defined functions named Entity() to create an entity, Pos() to create a float triple and Ori() to create a float quad, recognized by the Entity() function. The third argument is a Table; the generic do-everything associative array in LUA.

[This message has been edited by jwatte (edited 06-12-2003).]

Originally posted by Coriolis:
File format only really affects load time, not in-engine performance. Any format that contains the necessary info to display the world correctly can be transformed into a more efficient format upon load.

Of course level loading affects performance.
the more Polygons you render the lower your
performance gets.

You could load a BSP(Quake III, Quake II, or Half-Life REMEMBER THERE ALL A BIT DIFF) use q3radient to create the BSP file. You can find good tutorials at gametutorials.com. Im not sure how to do collision detection yet(dont use there ive found it to be VERY laggy) More advanced stuff like doors or other moving objects and highly detailed parts of the map are stored in MD3 files. Not sure how to implement those yet.

Well gl and hf

Of course level loading affects performance.
the more Polygons you render the lower your
performance gets.

While the second statement is true, the first is not (when discussing the rendering performance of geometry). Not only that, the second has nothing to do with the first.