Game Development Community

Behavior Shooter does not run on iPhone device...

by Lateral Punk · in iTorque 2D · 10/15/2008 (1:33 pm) · 6 replies

The default behavior Shooter from Xcode_iPHone/Torque2D.xcodeproj seems to run fine inside of the simulator but does not run in the device...I get back the following error mesage on the device:

"Game Startup Error"
'initializeProject' funciton could not be found...and then the white screen of death...

others seeing this too? It works fine just in the sim like I said which I'm finding very odd...

#1
10/15/2008 (2:12 pm)
I figured it out...

You have to run the game ones through TGB (with the project opened) and then click on play..this basically generates the necessary DSO files...

this seems unnecessary to do it that way...can we the DSOs generated automatically somehow..so it can be as easy as 1) develop 2) build 3) run???
#2
10/16/2008 (12:03 am)
No, without executing the main.cs and everything that gets execed by it you can not do it sadly.
So at one point they must be executed. If this happens through the run button, through executing tgbgame (which I do to test it anyway) or through some other meaning is in the end up to you.

what I would welcome is a "build" button that runs that script compilation and then automatically triggers the xcode build through commandline and run. This naturally would assume that the iTGB editor gets a dropdown with the desired build type
#3
10/16/2008 (6:31 am)
I see...there is the -compile flag that i see being declared (well being checked for and used) in BehaviorShooter main.cs, but never being used. I tried passing a command line flag to sim/device (-compile) and while it seems to do something, i get the WSD (white screen of death)....

...another related question is that it seems we are deploying or game script files also on the sim/device...whats the deal with that?
#4
10/16/2008 (8:12 am)
@Lateral - In the documentation, one of the requirements listed when deploying a project is to generate DSOs. There is no getting around this.

Currently, running the game through the editor generates the DSOs. If you make a change to any of the scripts besides the level, you will need to delete the DSO files and recompile them.

The code to automatically generate the DSOs files was added, and yes it is a flag. For the next build, this will be integrated as a button in the TGB Editor. The code is available, though. It's not in the form of a button, but you can run your game from the editor or TGBGame with the flag enabled and it will automatically delete and recompile.

You are deploying the DSO files onto the sim/device. I don't know if I understand your next question: "...what's the deal with that?"
#5
10/16/2008 (8:42 am)
Thanks for the reply Michael.

I was passing the -compile flag for the sim/device not for TGB Builder/binary. So you are saying I should try do it for the latter if I don't want to wait for the button?

My other question was simply that inside of Xcode in the REsources folder we put in things like common, game, etc. If your .CS scripts are in there, they will get deployed to the sim/device right? But I think I know the answer to my question, or the solution that is. You're suppose to delete *.cs files when you are finally going to deploy (minus main.cs in root)...that way there are only .dso deployed...

Am I correct?
#6
10/16/2008 (9:15 am)
@Lateral - Happy to help. Yes, use that flag until the button shows up =)

Oh, I see what you mean now. I need to check that, but I don't think the .cs files get transferred. I'll ask Paul and the iTGB team about that.