Becareful using Torque Script Highlighting for Xcode...
by Lateral Punk · in iTorque 2D · 10/15/2008 (1:26 pm) · 11 replies
I had the Torque XCode 3.0 Specification stuff installed from
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=15089
and it was causing me problems when copying the root main.cs onto the device or simulator. This is after adding a new *game* to the Resources folder (common,game,main.cs). The error would be :
warning: no rule to process file '$(PROJECT_DIR)/../../../games/TouchGame2/main.cs' of type sourcecode.torque for architecture armv6
it's really subtle, but what happens is that the main.cs file is not being copied over!
One fix I found was not the use the above named resource altogether. Then next time you add a game, it will work just fine. But you get no syntax highlighting of .cs files..
I've not figured out a way yet to use Torque highlighting and still have the main.cs file being copied over...
..But I don't understand how the original Xcode-Iphone project works for main.cs and the syntax highligting. It doesn't generate an error there...Can you tell me how you handled inserted that file into the Resources folder? Did you manually create the file separately?
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=15089
and it was causing me problems when copying the root main.cs onto the device or simulator. This is after adding a new *game* to the Resources folder (common,game,main.cs). The error would be :
warning: no rule to process file '$(PROJECT_DIR)/../../../games/TouchGame2/main.cs' of type sourcecode.torque for architecture armv6
it's really subtle, but what happens is that the main.cs file is not being copied over!
One fix I found was not the use the above named resource altogether. Then next time you add a game, it will work just fine. But you get no syntax highlighting of .cs files..
I've not figured out a way yet to use Torque highlighting and still have the main.cs file being copied over...
..But I don't understand how the original Xcode-Iphone project works for main.cs and the syntax highligting. It doesn't generate an error there...Can you tell me how you handled inserted that file into the Resources folder? Did you manually create the file separately?
#2
10/16/2008 (12:43 am)
Was unable to get that package to work at all. seems like it does not work on the current XCode for iPhone or whatever ... at least I get a blank nonhighlight and use Unitron / Smultron due to that ... or Torsion through Parallels
#3
...yeah i've given up on it...doing all my scripting in Eclipse now...
10/16/2008 (6:46 am)
FYI, I mention in the resource above why it might not work for people...the folder name should be "Specifications" with an s.......yeah i've given up on it...doing all my scripting in Eclipse now...
#4
If I edit a .cs file in Xcode, then run the project with TGB 1.7.4 for Mac, the changes are apparent, but then when I click build-and-go in Xcode, it hasn't changed.
Am I doing something wrong? What is the correct workflow for doing final debugging on hardware? Is there a TorqueScript syntax highlight plugin for the latest Xcode? What are you guys at Garage Games using?
10/23/2008 (8:54 pm)
Changes I make to .cs files in Xcode don't seem to have any effect on my game. It's as if it's just using the .dso and ignoring the .cs completely. Is this the case?If I edit a .cs file in Xcode, then run the project with TGB 1.7.4 for Mac, the changes are apparent, but then when I click build-and-go in Xcode, it hasn't changed.
Am I doing something wrong? What is the correct workflow for doing final debugging on hardware? Is there a TorqueScript syntax highlight plugin for the latest Xcode? What are you guys at Garage Games using?
#5
p.s. My menu screen is now running at a very pleasant 50fps, which makes the menu transitions nice and smooth. In-game is still under 1fps.
10/23/2008 (9:15 pm)
Ah ok I've figured a way out. If I change a .cs in Xcode, then run the project with TGB 1.7.4 (which rebuilds the .dsos) then clean the project in Xcode and rebuild (which takes a couple of minutes) then I can see script changes. Is this the correct workflow? It's pretty painful if you're making minor changes and you need to see them running on the hardware.p.s. My menu screen is now running at a very pleasant 50fps, which makes the menu transitions nice and smooth. In-game is still under 1fps.
#6
10/24/2008 (11:02 am)
If you delete the DSOs and re-compile them it should work the same. Essentially, re-build the scripts, but not the whole TGB project. Only thing is, XCode seems to be a little slow in recognizing when files have changed, so to make sure I delete ALL the dsos and wait about 10 seconds before re-compiling them.
#7
Anyway, when you do re-compile them, build you project again. The source will not have changed so it won't build that, but it will say "Copying resource..." and give part of the directory(it might go pretty quick for a small project though), then you know your changes are being transferred.
10/24/2008 (12:11 pm)
Hmm, let me clarify my previous post a bit. In order to see your new changes, XCode needs to re-deploy your "resources" folder. That is, it has to re-cpoy the files into your app., which it will only do if it detects changes in said files. I don't know exactly how it does that, but I've found that if I delete all the DSO, and re-compile them a little later, it will pick on the change, whereas if I just delete and re-compile them quickly, it may not. Anyway, when you do re-compile them, build you project again. The source will not have changed so it won't build that, but it will say "Copying resource..." and give part of the directory(it might go pretty quick for a small project though), then you know your changes are being transferred.
#8
It worked once, but it usually doesn't work so I can't tell what the correct method is.
Can someone from GG please clarify what is the correct way to make script changes apparent in Xcode, other than completely cleaning and rebuilding the project?
10/24/2008 (6:51 pm)
Thanks for the help Mat, I've managed to get that system to work once, but that was 1 in about 5 tries. When I delete the .dsos they turn red in Xcode, then I play the game in TGB 1.7.4 and the .dsos are recreated, and they turn black in Xcode. However when I then run the game in Xcode, the script hasn't changed. I've tried deleting all the .dsos, I've tried waiting 10 seconds before running TGB. It worked once, but it usually doesn't work so I can't tell what the correct method is.
Can someone from GG please clarify what is the correct way to make script changes apparent in Xcode, other than completely cleaning and rebuilding the project?
#9
http://www.garagegames.com/mg/forums/result.thread.php?qt=80065
10/25/2008 (5:58 am)
Ur talking about this in the wrong thread...http://www.garagegames.com/mg/forums/result.thread.php?qt=80065
#10
10/25/2008 (6:04 pm)
Thanks Lateral - it seems you've asked the same questions before. I guess I'll have to take a look at eclipse for script editing also.
#11
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7200
That's one more problem solved!
10/25/2008 (6:42 pm)
Just tried this plugin with Eclipse and it works perfectly.www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7200
That's one more problem solved!
Torque 3D Owner Lateral Punk
Default Studio Name
Install TorqueScript for Xcode.pkg.zip
which you find under compilers...