Help with .map files

Started by
1 comment, last by BobMan 19 years ago
Hi All I'm new to this forum - but don't treat me as a newbee to gaming. To explain, I'm a lecturer in game development and teach most of the aspects of the industry. I like my students to know most of the aspects of game development, from the programming side through to creating games using next gen engines. On that front we are using a next gen (2005 onwards engine - undesclosed at the minute) for that side of things. I also teach the students the fundamentals of programming, where they develop simple 2D games like space invaders and frogger through to DirectX applications. In DirectX they create simple rooms made up from geometry specified in text files that they create by hand and read, and spin cubes in 3D space etc. But enough of that. I want to set an assignment where they create a simple engine that will display a map file created in GtkRadiant 1.4. Sound simple? Well it really is if they can understand the map file format. (Meaning I need to know it first) Unfortunately, the maths side of things does not, yet, extend to binary trees. And, from what I can gather, you need to be able to understand these to read a map file. My question - at last says you - can someone please explain the structure of the GtkRadiant .map file. I'm not interested in all the texture stuff, just how a plane - or 6 planes - can represent a brush/cube. Please don't answer unless you use plane english. I need to know how the co-ordinates in the .map file represent surfaces/quads in a cube. Also, don't refer me to google searches. I've been there. And, although people may not admit it, there is no real information - non-mathimatical information, out there. So basically, I want someone to explain how something like this - see below - can be translated into the co-ordinates of six quads, or a cuboid? ( 0 64 -64 ) ( -64 64 -64 ) ( -64 -64 -64 ) ( -64 -64 64 ) ( -64 64 64 ) ( 64 64 64 ) ( -64 -64 8 ) ( 64 -64 8 ) ( 64 -64 0 ) ( 64 -64 8 ) ( 64 64 8 ) ( 64 64 0 ) ( 64 64 8 ) ( -64 64 8 ) ( -64 64 0 ) ( -64 64 8 ) ( -64 -64 8 ) ( -64 -64 0 ) This is a section cut from a GtkRadiant .map file. Anyone up for it. Now that I've started, I'll probably use this forumn and help where I can. Bobman
Advertisement
The format is pretty simple. Each line of three coordinates defines a plane in 3d space. Form an infinatly large polygon from each of the plane definations, and then clip it with each of the other planes in the brush to get to a polygonal representation.

Alan
"There will come a time when you believe everything is finished. That will be the beginning." -Louis L'Amour
Thanks Alan

Actually found a PDF document by Stefan Hajnoczi that explains it all pretty well. Quite a bit of maths here.

This topic is closed to new replies.

Advertisement