About 3D worlds and 3D maps? Whats the real way?

Started by
9 comments, last by xsirxx 19 years, 7 months ago
DISCLAIMER: (First off let me say, this is a general question that I could not find very much info about here on the groups. Ive searched for hours, or maybe im bad at searching.) 1st Question is, what is the best way to have a "world" in your game? Ive heard of people using ID's BSP format & writing their own editors... 2nd Question is, Where can I find tutorials about incorporating BSP into my game? Where can I find tutorials about making a new map editor with object placement? Culling as well... Thanks --Brad
--X
Advertisement
As for BSPs, you can have a look at the advanced OpenGL tutorials on Game Tutorials.com. It's not a tutorial as such, more commented code for you to play around with and see in action. Of course, you're free to implement it in your own engine too.

As for culling, you'll find some information on that site, but also over on Code Sampler, which is in a similar format to the Game Tutorials series.

As for creating worlds, people seems to use Valve's Hammer (which I think was based on WorldCraft), as well as the Q3Radient tools that are used with Quake 3.

An even simpler example can be found on Psionic3d's page, which uses Milkshape 3D to create simple game level architecture.

I'm sure others will have a lot more to add, but this should be an interesting starter.
There really isn't a best way per se. One of the easiest partitioning algorithms are octree/quadtree. There's a lot of articles written up on them all around the net. Octree is normally used by outdoor scenes. BSP is normally used for indoor stuff.
Quad/Oct Trees seem like a good way to go then for me... Any idea where I might find a good tutorial on that? or just general info to read up on?

Also If worldcraft is a good program, that uses ID's bsp format right? Is that generally a good thing to incorporate rather than re-writing everything? And is there a good DirectX tut on that? Thanks

--Brad
--X
Worldcraft (including Worldcraft 3.x, which is Hammer, iirc) allows the designer to create worlds using CSG by adding blocks and entities to the level. The results are saved as .map and .rmf files, which do not contain any culling, visibility or partitioning information, just the blocks and entities.

From there, programs take the .map or .rmf saved files and transform them by removing hidden faces, creating a bsp tree, computing visibility and lightmaps, in the case of half-life maps (that use their own bsp format - although it is heavily inspired by the quake 1 bsp format). However, you can use any converter to transform a .map or .rmf file into your own file format (although basic operations such as turning brushes into triangles or removing hidden faces can still be performed using the default programs).
For Quad/Oct tree tutorials, there's a couple here on GameDev, such as: this and this.

Also, the GameTutorials link has some code for one too.

EDIT: ToohrVyk answered the Worldcraft question better
Yea im definitly reading up on the OctTrees.... So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing. Then whats the best way to create a map that I will make with the World editor? I take it that there is prolly another tut for that hiding around? Or most people go with the .map creation from another editor and then convert? Thats where my confusion begins.

Thanks again for hte tuts on the oct trees, im going to try to incorporate that as soon as I can find info on building maps from an editor that I create iI suspose.

--Brad
--X
Yea im definitly reading up on the OctTrees.... So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing. Then whats the best way to create a map that I will make with the World editor? I take it that there is prolly another tut for that hiding around? Or most people go with the .map creation from another editor and then convert? Thats where my confusion begins.

Thanks again for hte tuts on the oct trees, im going to try to incorporate that as soon as I can find info on building maps from an editor that I create iI suspose.

--Brad
--X
Moved to Graphics Programming and Theory.

Quote:Original post by xsirxx
So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing.

Making your own 3d world editor is a *big* task, much more so than for 2d games. You'll save yourself lots of time if you can use an existing editor and convert it's output. If conversion takes a long time you can always do it as a preprocessing step when you actually build your game.

This topic is closed to new replies.

Advertisement