Jump to content
  • Advertisement
Sign in to follow this  
BobMan

Help with .map files

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Thanks Alan

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!