Game Development Community

dev|Pro Game Development Curriculum

Up to Date Max2Map

by Matthew Jones · 01/27/2003 (12:40 pm) · 24 comments

I just recently dicovered Desmond Fletchers changes to his site concerning Max2MAP. He now goes into making an exported .MAP file compatible with Quark. Previuosly I believe it was only compatible with WorldCraft. I will discuss setting it up either way depending on what tools your using. Since Quark is the dominate tool in my opinion I wanted to set my Max2Map file to output Quark compatible files.
The first snag I ran into, is the current version of code for Max2MAP still only compiles for use with MAX 3.1. I needed at least R4. So I looked around and asked a few question over at Tork-Dev. Stephan informed me I needed to make some linking changes to the Max2MAp project:

1. Open your torque SDK project
2. set MAX2MAP as the Active project
3. Right Click MAX2MAP and choose settings.
4. In the setting panel first go to the "C/C++" panel under project options you should find a section that says "../lib/maxsdk31". Change it to "../lib/maxsdk40"
5. Next goto the "Link" panel and under project options you'll find "../lib/maxsdk31" change it to (just like before ]"../lib/maxsdk40". Then do a clean build on at least that project and this should compile and run under MAX4 or 5.
The exporter will still only write a World craft compatible MAP file at this point. But for World Craft user GOOD NEWS your done!

For Quark Users you'll need to make some more changes.
In your Max2Map folder you'll find 2 folders called "Source" and "Header". Open the Source folder and you'll find 1 file called Main.cc
Search for this statement in your file
// wadname
   dSprintf(buf, sizeof(buf), "\"wad\" \"%s\"\n", gMapProperties.mWadName);
   writeString(file, buf);
Comment out the writeString part
//writeString(file, buf);
Next go down about 10 lines you'll find this
// ambient color
   dSprintf(buf, sizeof(buf), "\"ambient_color\", \"%d %d %d\"\n", 
      gMapProperties.mAmbientColor.red, gMapProperties.mAmbientColor.green, gMapProperties.mAmbientColor.blue);
   writeString(file, buf);
Change it to this
// ambient color
   dSprintf(buf, sizeof(buf), "\"ambient_color\" \"%d %d %d\"\n", 
      gMapProperties.mAmbientColor.red, gMapProperties.mAmbientColor.green, gMapProperties.mAmbientColor.blue);
   writeString(file, buf);
Doesn't look like we change much. We didn't we just removed the comma after "\"ambient_color\"
Next we will do the same thing in this statement:
// emergency lighting color
   dSprintf(buf, sizeof(buf), "\"emergency_ambient_color\", \"%d %d %d\"\n",
      gMapProperties.mEmergencyAmbientColor.red, gMapProperties.mEmergencyAmbientColor.green, gMapProperties.mEmergencyAmbientColor.blue);
   writeString(file, buf);
Change it to:
// emergency lighting color
   dSprintf(buf, sizeof(buf), "\"emergency_ambient_color\" \"%d %d %d\"\n",
      gMapProperties.mEmergencyAmbientColor.red, gMapProperties.mEmergencyAmbientColor.green, gMapProperties.mEmergencyAmbientColor.blue);
   writeString(file, buf);
Then for astetics you can search the main.cc and the export.h files for any instance of WorldCraft 3.3 and change it to Quark 6.3 or whatever you want.
Do a clean build on the project and you should be Up To Date.
I just did all this today but I'm blond and I had a wild youth so I very could have forgoten somthing. If anybody has a problem please let me know by posting here or emailing me at mjones7947@comcast.net

I have a compiled version of the debug (renamed max2map eporter.dle) and the Source code with these changes for people who don't really care they just want to get it done. It can be found HERE
I guess it was to big to upload to GG so its at my site for the time being.
I also am trying to find all the ins ands outs of this tool and will hopefully have the time to write a tutorial.
My programmer is also looking into the feasabilty of writing a MAX2DIF plugin. Most likely we will just write a script that will run both max2map and map2dif in the same operation. I have seen several people state they were going to give Max2Dif a try but nothing ever came of them so we don't know what the possibilities are.
We think its not such a far stretch considring MAX geometry is very similiar to Dif geometry at least when you look at it under wire frame.
Also a I would think a blender2dif and milkshape2Dif should't really be such a stretch if MAX version is possible. This would eliminate the need for a proprierty map editor. Quark is a great tool I just think it has a few problems. The recent release of Marble blast Map2Dif reduces the of the bugs like inflating and deflating of faces and edges but the problems still pop there head everynow and agian for unknown (by me, anyway) reasons. With MAX2MAP I do not get any of this and I am more flexible in the type of geometry I can build.
Enough babbling Have fun

Matt
Page«First 1 2 Next»
#21
12/22/2005 (10:47 am)
Hi,

You can download the free Game Level Builder 2.22 for 3ds max 3 - 8 from http://www.maple3d.com/MainFrameScriptsPage.htm.
It comes with a .map exporter for max and has very handy tools for making buildings for torque.
All you need to do is run Map2Dif on the exported file to create your .dif file.

Hope this helps,

Michael.
#22
03/27/2006 (6:25 am)
I have been looking for the max2map for 3ds Max 8.

Do any of you have the new exporter for Max 8 that they could send me or give me a good link to download it
#23
11/24/2006 (10:27 am)
I don't know why GG just doesn't export these tools to make them ready for us users? I am trying to compile max2map for 3ds Max 7. I have followed the instructions at the beginning of this forum and get to the point where I now get an error saying: LINK : fatal error LNK1181: cannot open input file 'engine_DEBUG.lib' This .lib is not found anywhere in my torque directory. I have compiled this previous to this problem (with no problems). I am using Visual Studio 2005 V.8. How do I link to this .lib file when it's nowhere to be found?

Any help would be greatly appreciated.
#24
11/24/2006 (10:49 am)
THat the Debug Version of Torque engine LIBRARY your missing. Compile the torque SDK first then do the MAXtoMAP.

Matt
Page«First 1 2 Next»