Game Development Community

Export first timer

by Benjamin Stoneking · in Constructor · 05/19/2008 (5:06 pm) · 7 replies

Ok so i'm a total noob here, and i've just picked up constructor and i've managed to create a nice stronghold/fort with portals and everything... now when i try to export map2dif I get this long winded report that ends with a message like "deleting auto-converted map". and when i try to locate that file it doesnt exist! what am i doing wrong?

#1
05/20/2008 (9:30 am)
You're not doing anything wrong... that's what you should see. Map2dif is a standalone program that is external to Constructor. You should see the executable in your root Constructor directory. It requires a .MAP file as its input and outputs a .DIF file, which is the file you import into Torque through the World Editor. So when you export using map2dif, Constructor first saves the scene as a .MAP file in some temporary location, then runs map2dif with that file as its input argument, then deletes the no longer needed .MAP file.

If you export using the internal exporter option (Export to Dif), no intermediate .MAP will be created. The internal exporter has some advantages, like a nicer lighting algorithm for generating the lightmaps, and the ability to "bake in" static DTS meshes. Map2dif also has some advantages, but I'm no expert on the differences between the two. I use the internal exporter as much as I can... if something doesn't work as expected, then I try map2dif as a backup. Another nice thing about map2dif is that you have the source code, which allows you to customize it if you want.
#2
05/20/2008 (4:41 pm)
I did what you said, I saved it as a .map and did map2dif it appears to have exported but i can't locate the file in torque or on finder...
#3
05/20/2008 (8:39 pm)
You don't need to save it as a .MAP file... Constructor will do that automatically when you export using the "Torque Game Engine (map2dif plus)" option. Then it'll delete it after it creates the .DIF file.

So let's say you just created your new stronghold/fort in Constructor. If you want to use map2dif rather than the internal exporter, you would go to File->Export->Torque Game Engine (map2dif plus). If you haven't saved your .CSX file, it will complain. In that case just save it and try again. Now a directory tree pops up allowing you to choose where to save your .DIF file. You need to put it in a place where Torque can find it. For example, try putting it in:

/example/tutorial.base/data/interiors

When you click OK, a window will pop up with the export status messages from map2dif. If everything went okay, you should have a .DIF file in your chosen directory with the same name as your scene name, along with your textures. Now to get it into Torque, you need to start the correct game. You need to find the main.cs file located in the example folder. Make sure it has this line somewhere (usually at the top):

$defaultGame = "tutorial.base";

Save main.cs and run torqueDemo.exe. This will start Torque running the tutorial.base game. Hit F11 to enter the world editor. Hit F4 to open the World Editor Creator. Drill down into the "interiors" branch of the directory tree to find your .DIF file and click on it. It should appear in your viewport. That's it!
#4
05/26/2008 (9:21 am)
I did exactly what you said. But I still don't have an exported file in the end. I cannot locate it anywhere on my computor!.
#5
05/26/2008 (9:54 am)
@Ben: Just use "export to dif", and then select where you want it to go, it should create a .dif file just fine. Is there some reason you want to use Map2dif?
#6
06/01/2008 (8:04 am)
Yes... because everytime I export to dif it creates an invisible structure or it doesnt export anything at all.
#7
06/01/2008 (8:12 am)
@Benjamin: Can you send me the map?