Game Development Community

New to xcode

by Bret Snyder · in Torque Game Engine · 03/12/2007 (1:53 pm) · 5 replies

Quick question. I've been using Torsion (in windows) for about 6 months. I'd like to start building on my Mac now (and porting), but I'm completely new to xcode. I don't even think I'm setting up projects correctly in it. I'm starting from an empty project and pathing to my directory (an example folder) and its executable, but none of my files show up in my project window like they normally would in Torsion. Is xcode not setup to show you a list of all of your folders and files? It seems so inconvenient to have to open files separately. I would guess that all of my folders/files should be showing up under my project name.

My apologies if this has been answered numerous times before. I've been searching through pages and pages of forum threads on this and also looked at the setup tutorial for xCode and Torque. In TGE 1.5, I don't have a PB folder, but I do have an xCode folder; however, the only project file I find inside of this can't be opened by xCode - it errors out.

#1
03/12/2007 (8:46 pm)
Bret - make sure you have the latest version of Xcode - 2.4.1. The project file included in 1.5 - xcode/torque_xcode_2_2_UB.xcodeproj does work.
#2
03/12/2007 (9:22 pm)
Thanks, that did it. When I want to create new prototypes/games now, do I just need to drag that xcode file from my 1.5 folder into an example folder? Does running that file within the example folder create the project?

My second question is that xCode displays all of the source files along with the script files even when I execute it from a copy of the example folder. I can see why, but is there a way to hide all of those other files that I won't be modifying? In all of my prototypes and mini-games, I've only been using the example folder (which contains the kits as well as a skeleton kit (tut.base). I haven't done any engine modifications.
#3
03/18/2007 (10:52 am)
Hi Bret,

XCode is more like Visual Studio than Torsion but that doesn't mean you can't use it to manage/edit your script files. If you just want to manage/edit, all you have to do is install this plugin (for syntax highlighting)...
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11193

... and then create an empty XCode project and drag your example folder into the project. Be sure to leave the "add recursively" radio button selected.

This won't allow you to do things like click the "build and go" buttons to automatically launch your game, etc. but will let you work with Torque Script based files using XCode in a nice way.

FYI, there's also a nice article on creating XCode project templates here...

briksoftware.com/blog/?p=28

Hope this helps,

Ben
#4
04/11/2007 (2:23 pm)
1) Actually, do not use that old resource.

There is an updated and better version that ships with TGE 1.4.2 and TGE 1.5.*, in torque/xcode/script editing/TorqueScript for Xcode.pkg.zip .

It's an installer, so you don't have to worry about whether you correctly installed it or not anymore.

2) Do not move or copy the xcode file. Just open it. You can run the executable from within xcode quite easily. There's a large button button in the toolbar with a hammer and a bright green 'play' icon labeled: "Build And Go". This will compile and run the application. Look under the 'Build' menu for other similar functions.

3) If you want to create a scripts-only xcode project, you can still get Xcode to let you use the "build and go" button. Just create a custom executable, and point it at a compiled torque app. You'll have a pretty good script editing solution there. There are better, and some ppl prefer other text editors to Xcode's . If you don't like Xcode, you may want to check out TextMate.
#5
04/12/2007 (7:47 am)
I've been fooling around with adding support for TGE syntax and debugging to the open source Mac text editor Smultron. I cycle between: working on my game, getting frustrated with the lack of decent tools like a script debugger, work on adding debugging support to Smultron, and then realize I'm wasting time that I should be spending on my game. Repeat endlessly.

It's a shame the Torque debugger commands aren't the same as gdb or xdebug or something already built-in to many editors. I guess there's another approach right there, editing TGE's debugger commands to match gdb.