Home-made BSP map editor
I want to make my own BSP map editor and compiler. Are there any resources you can recommend? How should I go about doing this?
Particularly, how do I divide the world into clusters and portals like in Quake 3 BSP?
And how do I make it compile with maximum speed? I need to see how the map looks in the game when I make changes, that's why it has to compile fast.
Editor I could understand but... the compiler? Are you sure? Let me quickly summarize BSP history.
If you want to be able to modify live data, do not use BSP. Use AABB trees or everything else incremental.
But even this would take some effort. Hint brushes and areaportals can speed up computation quite a lot (I think 4x easily) so if you are not using them already those are your first step.
if you write your own tools, you will spend a lot of time re-implementing basic functionality that QuArK already has, you will fix bugs that consume a lot of time.
I suggest you take instead the QuArK source and modify the code to your needs, why writing 99% of what is 'ok' again? that's the best reason software is open source!
so, profile the binary with e.g. AMD CodeAnalyst (it's free) and find the 1% of problematic code, now you can focus on what costs so much time, sometimes adding a few openMP lines can make such code 4x faster.
otherwise, you might ave all those 4min, but you'll spend half a year writing the editor+compiler, if you are very skilled.
Particularly, q3map2 was developed by some very clever and knowledgeable people (John Carmack of id, and Randy Reddig of Splash Damage). If q3map2 is taking a long time to compile your maps you are very, very unlikely to improve on that with your own code. Four minutes is a long time for a map - which stage is it slow in? BSP, VIS, or lighting?
Here is what I'm basing the map on:
You can check out the detail here:
https://dl.dropbox.com/u/109630018/Pathogen.zip
you're modeling the whole place inside the square? in all details? (rooms, windows etc?)
wow
that's impressive and cool.
I just think the old school BSP tech might not be the best, it's not that well suited to render big amounts of polys (in case you're going outdoor).
will check out your zip when I'm at home :)
You may want to check out L. Spiro's article on his .MAP generator which builds out BSP trees based on the Hammer editor. The sample code is explained pretty well.