FPS Maps - Need Info

Started by
5 comments, last by ReKlipz 18 years, 8 months ago
OK, a friend and I are trying to create a simple FPS We developed a Quake III BSP loader, which we were planning on creating our levels in the Quake III level editor and using them, but I've ran into a snag. When trying to find the leaf that contains the camera, the algorithm i am using always returns -1 for the leafs cluster, so in other words it is getting the wrong leaf, and I have to stop here and cant continue the other algorithms to cull the rest of the leafs. My questions is, do we stick to using the Quake III BSP level format, or are there better formats out there, or do we design our own? If you feel we should stick with the Quake III BSP format, Please post how we may go about fixing the algorithm, we have scoured the internet for all resources and turned up short, so suggestin a google search provides no help at all. If you think there is a better way other than BSP levels, please post what it is and give as much detail as possible about what it is and how it works. If you feel we should design our own, then woah, think once more and if you feel the same, tell us 1) Why? 2) Where to start? and 3) What are the benefits? Heh, sounds kind of demanding I know, didn't meant for it to be... Thanks In Advance! ~ReKlipz
Advertisement
I think there is a better way. After all, BSPs haven't changed much since Quake 1, and that was 1996! The supposed advantages of BSP were potential visibility culling, and fast line-tracing for collision detection. Nowadays, video cards can handle so many polygons that culling every little one you could is almost fruitless. As for the line tracing, it is really only a little bit useful. You still have to build an entire physics engine on top of just a simple line trace, which isn't very trivial, or even possible in some cases. I would suggest going with an arbitrary model format. Find one that fits your needs: make sure it supports the number of texture coordinates that you'll want to use (for normal mapping, for example), make sure the class structure makes sense to use in your design structure. Something as simple as OBJ formats, or ASE would work fine, or even 3DS. The next step would be to pick up a physics engine. I can't even begin to tell you how much work this saves you. Current physics engines handle *everything* for you, you can really just get down to programming the logic, once you get a framework in place. All of the major physics engines support arbitrary triangle meshes for the static environment, so it would be as simple as uploading the vertex/polygon data from your OBJ file to the physics engine, and all your collision detection and response is automatic.

Some physics engines that are highly used and praised (I could be wrong about licensing):
Newton - Free.
Novodex - Free, not free for commercial use.
ODE - Free, Open Source.
TrueAxis - New Comer. Free, not for commercial use though.

I personally use TrueAxis, it is the most wonderful piece of software currently in existence, in my opinion. I'm only a hobby developer, I'm not looking to make money off of my game, only hoping to maybe make a name for myself, so the license is just fine. Anyway, check it out!. If you want me to elaborate on anything, feel free to post here or send me a PM.
i agree with optus but i want to add somethings.

as optus did, i recommend the ASE format. u can push tons of raw data into it with no limit. on top of that it allows you to develop whatever data management you want. you can use the data to create BSPs, quadtrees, octrees, portals, anything. personally i would recommend using octrees. theyre soo basic its funny. it consists of dividing your entire world, inside of a bounding cube, and its divided into 8 parts. once along the x, y, and z axis'. this gives 8 cubes within the bounding cube. check the number of polys within each cube against a constant to see if further division is needed. its very similar to BSPs but instead of spliting into two parts, its split into 8 parts.

BSPs are a dying trend in the newer games.
OK, as far as physics go, I dont think we're even ready to be thinking about them in our engine.

We plan on writing our own engine, and the only way to test it is to write a game along with it, but, ya

So, use a model editor(IE 3DSMax) and make our levels in there?

I'm a bit confused about the octtree part, i thought that getting rid of BSP trees meant like all trees in general... or is it something different?

i think we are going for some kind of levels like Half Life 2 or Halo, but I have no idea about the way levels are stored/created, i just know about BSP's because we wrote the loader, and I also used to design some CS 1.6 maps.

But octtrees would be the way to go? And ill have to look up this ASE format... I dont even know what it is, sounds like some sort of model format though cause you said 3DS would work too..., idk

Thanks for your replies!
Really you're only getting rid of BSP trees to replace them with another type of tree. Octree's are really popular like adam mentioned. Another is called a Quadtree (Can you guess? It just means 4 parts per cube instead of 8). Most of the physics engines I listed actually use an AABB tree. Which is, an Axis-Aligned Bounding Box, so tree traversal only consists of a simple bounds check. The BSP implementation with a single splitting plane per level is just old technology.
OK, so what do you suggest, and how do i go about using/learning it?

got any links?

maybe something that tells the benefits of each?

I am a bit confused as to how they work, i know that a BSP tree at time of compiling the map, it uses a single plane and then makes the tree off of that, splitting polygons and such, and the less splits the better the tree

octree and quadtrees are the same thing? or just the same principle? how do they actually work, like, do they also split polygons and such, or is it different?
*^ bUmp ^*

This topic is closed to new replies.

Advertisement