Game Development Community

Opening Torque 2D 1.7.6 project in Xcode 4.2

by Frantisek Smrcka · in Technical Issues · 01/04/2012 (1:57 pm) · 4 replies

Hi guys, I'd really appreciate a little help here.

I'm trying to build in Xcode 4. but it seems that no matter what project I try to open in Xcode, it always opens the default Torque2D.xcodeproj set. Now I've seen a tutorial for Mac AppStore publishing here, suggesting to duplicate TGBGame target and edit it. Unfortunately, this doesn't seem to work for me, perhaps Apple changed something for the version 4.2 (which honestly looks a whole different then version 3 straight away). It would be so nice if there was a complete tutorial or at least a list of changes that needs to be done inside Xcode when trying to build from it.

The next thing is, that I'm able to build using Torque File -> Build Project... without big problems. It even allows me to move resource data inside the app archive manually and it still works fine, just as I desire (and I can pretty much edit the app through .plist), only it doesn't feel clean to me and I can imagine there might be some issues, especially when trying to push the game to Mac AppStore.

The last thing is the annoying second black screen I keep getting when previewing projects and building using the method described above. I've tried commenting out OpenGLDevice::OpenGLDevice() as someone suggested but with no luck. Any hint on this one? Thanks in advance guys...

#1
01/06/2012 (12:55 pm)
It's opening the correct project. Unlike T3D and iT2D, T2D does not create Xcode projects or Visual Studio solutions for specific games. There is only the 1 project for each compiler that is opened for recompiling the source.
#2
01/06/2012 (3:28 pm)
Alright, how can I compile my game using my own Xcode setup through Xcode then?
#3
01/06/2012 (7:07 pm)
@Frantisek - You need to set the path for the build in Xcode. Here are some simple instructions:

1. Open the Xcode project like you have been.
2. Click on the Torque2D project icon on the left to open up the settings
3. Select the TGBGame or TGBGame Debug target
4. Look for Per-Configuration Build Products Path
5. Set the path to your game's location. For example, mine looks like this: /Users/michaelperry/MyGames/Memory
6. Build and run

This will compile the executable and put it in your game's directory, which allows you to debug that specific project.
#4
01/07/2012 (1:15 am)
Thanks Michael, I've made it to work on Xcode 3.2 eventually and it runs just great, only I get bunch of "warnings" when building. Should I worry about it when the game runs as supposed?