a file format for my levels

Started by
8 comments, last by Liquidus4 21 years, 4 months ago
okay, i posted this in the art section and got absolutely no reply, i think because it is more for the art side instead of the loading art into a game side. I am wondering what 3d file format to use for my levels. I was planning on 3D studio max, but when i looked up how to load them into my game it was really wierd. Something about chunks and pointers to chunks or something like that. I am getting 3D studio max from my university at a discount price anyway, since i think learning it will be very useful, and i am sure it exports to many formats. What are your recomendations for a file format for my level. The levels are for a 3d version of Smash TV, so they will be fairly small and simple. I want something that basically stores vertices and texture names for each surface/collection of vertices. SO in my game i can basically figure out which texture to use, and then draw the vertices. Thanks
The funny thing about driving a car over a cliff is, you still hit those breaks. Hey! Better try the emergency break!
Advertisement
You could make your own.
The Quake3 BSP format is pretty simple and easy to use

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
make my own what. file format. okay, make my own file format, that is completely pointless and makes no sense at all. Anyway, for experienced game programmers who know what they are talking about: What file format (which i can hopefully export from 3d studio max) simply stores a list of vertices and names/filenames for the textures used on them.
The funny thing about driving a car over a cliff is, you still hit those breaks. Hey! Better try the emergency break!
I had thought about Quake 3 bsp, i have a tutorial on loading them. But when i got the quake 3 level editor, it was not easy to figure out. I am very familiar with worldcraft and milkshape 3d, but this was just wierd. Also, i would have to pak all my textures. Unless, of course, there is a way to export this format from 3d studio max. If the file is saved in a format that simply names textures (and does not include code for unpacking them from the .pak) that could work. Something in a similar format to half life map format. It contains a list of vertices, and before the collection of vertices, the name of the texture it uses. I would use this, but the vertices are for planes, not actual polygon surface. Hoping for something similar.
The funny thing about driving a car over a cliff is, you still hit those breaks. Hey! Better try the emergency break!
quote:Original post by Liquidus4
make my own what. file format. okay, make my own file format, that is completely pointless and makes no sense at all. Anyway, for experienced game programmers who know what they are talking about: What file format (which i can hopefully export from 3d studio max) simply stores a list of vertices and names/filenames for the textures used on them.


Why not ? I''m not sure but I think you can write plugins for 3d studio max, so you can allways write a plugin that exports to your own format.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
um, i don''t want to write my own plugin. I just want to write my game. You can''t tell me there is not a file format that 3d s max generates that contains only texture names and vertice positions. I don''t want to reinvent the wheel here, i just want to use it.
The funny thing about driving a car over a cliff is, you still hit those breaks. Hey! Better try the emergency break!
Have a look at the .ase format. From 3D studio max you can directly export to this format. It''s ascii based it''s very native and easy to understand. For efficiency you should convert the data from this file format to your owm.
You may now ask "what is MY OWN FORMAT ?". For example if you store your vertices as

struct Vertex
{
float pos[3];
float tex_coord[2];
};

and your faces as

struct Face
{
int vertex_indices[MAX_VERTS_PER_FACE];
int texture_num;
};

you could open a file as binary and write an int with the number of vertices and after that an int for the number of faces to that file. After that you simply write one vertex after the other and after that close the faces one by one. Close the file and you got your own file format. You just have to make sure you read the stuff in as you wrote it to disk.

This would be a very inefficient file format and there are a thousand ways to improve it, but it''s very basic and you can extend it, to make it fit your needs. (And after the tenth format version you may find out why chunks aren''t that bad

I hope helps bit.

P.S.: The unreal importer uses also the .ase format

I will definantly look into the .ase format. It is probably similar to half life map files that is ascii based and has vertices and texture names simply written out. If this is so, than this is probably exactly what i am looking for. As with my own file type, i already have a similar setup for my .md2 file (which are used for my enemy&player models). And finally, i don''t necessarily think chunks are bad, but in this case, i think unnecesary. It is for smash tv as i stated, and the levels are just one room squares, it is an overhead view and the whole level fits on screen. I just want a tool to make the walls and floor look detailed, otherwise i could just hard code it(which is what i have done for testing purposes).
The funny thing about driving a car over a cliff is, you still hit those breaks. Hey! Better try the emergency break!
Half-Life .map files contain the planes for each face of each brush. You have to do various plane-plane intersections to build the brush.

This topic is closed to new replies.

Advertisement