Well, today I finally got around to testing the new collision-detection scheme in the game. I've got a new system into the engine, based on the popular, yet lightweight, collision detection library - OPCODE (http://www.codercorner.com/Opcode.htm)
This has some far reaching consequences. Firstly, OPCODE is a highly optimized library. That means our current collision scheme will be matched in terms of speed and far surpassed in terms of accuracy (initially, we were dealing with bounding-boxes). Secondly, as a result of this, we're now going to have a much better art pipeline... confused? read on...
One of the many quirks on my mind about the Top Secret: CNGH project was how we'd get those fantastic town/ race-track designs into our game. The primary problem is that the community which designed these layouts didn't have to worry about the implementations. When it came to us, I was initially very happy to just get bounding-box queries done and put in blocky models, mostly made with some CSG tool like WorldCraft. For those of you who don't know what CSG is, it stands for Constructive Solid Geometry. It doesn't work like your standard 3D meshes. Instead it is composed only of primitives (and some recent additions allow for some variations - patches, bezier curves etc.). That means that the collision detection becomes very easy - instead of querying against randomly oriented triangles, you can construct a tree and perform calculations very easily. One of these trees is called a Binary Space Partition Tree (or BSP). Now I don't want to get into the details, but this idea was (and is) very popular with "dungeon-crawling-corridor-sprawling" FPSes (Quake and Doom). In fact, even Half-Life used a proprietary BSP format.
Now, imagine taking primitives and making a believable town/ race track out of it. Imagine yourself, sitting with primitives (cubes/ cuboids/ cylinders for the most part) and building up organic caves... not a very good idea. With the introduction of OPCODE into our engine, we now have polygon-to-polygon collision and that means we can now make our models in standard modeling packages like Blender, and use 'em to great effect, without having to worry about performance issues.
Well, thats it for a start. Expect more stuff very soon. If you're the impatient type, there are some cool screens coming up as well... ;)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment