Black screen on startup?
by Ricky Hopper · in iTorque 2D · 08/30/2009 (11:27 am) · 20 replies
Hey,
I'm trying to test an early version of my game on my device, however, all I get is a black screen and the status bar at the top. After about half a minute, the game crashed and went to the home screen of the device. Am I doing something wrong? I'm using the iTGB_Optimize target if that matters, and compiling using OS 3.0, since that's what is installed on the iPod.
I'm trying to test an early version of my game on my device, however, all I get is a black screen and the status bar at the top. After about half a minute, the game crashed and went to the home screen of the device. Am I doing something wrong? I'm using the iTGB_Optimize target if that matters, and compiling using OS 3.0, since that's what is installed on the iPod.
About the author
Recent Threads
#2
08/30/2009 (4:32 pm)
Now the screen is white. Other than that, it's the same.
#3
The OS will forcefully quit any application pending for 30s and more without returning to user usability
08/30/2009 (7:25 pm)
if it goes half a minute and then crashes, you have too many assets you try to load.The OS will forcefully quit any application pending for 30s and more without returning to user usability
#4
08/30/2009 (7:27 pm)
Well, with the white screen, it's not crashing. It did with the black one, however. Plus, my game has 2 objects in it right now, shouldn't be too much for anything.
#5
I'd highly recommend watching the output in GDB while your game is running. Many of the potential problems can be solved just by looking at the debug output there. Also check out the debug output from the app by viewing the crash logs for your iPhone / iPod Touch in XCode's Organizer.
08/30/2009 (8:29 pm)
Try removing everything in the Resources folder of your XCode project, and drag/dropping them back in from Finder. Xcode might just not be finding all the files needed to run the game properly, so it is loading up what it can, then stopping and can't figure out what to do next.I'd highly recommend watching the output in GDB while your game is running. Many of the potential problems can be solved just by looking at the debug output there. Also check out the debug output from the app by viewing the crash logs for your iPhone / iPod Touch in XCode's Organizer.
#6
08/30/2009 (8:41 pm)
...This is weird. I try to put my game folder or the common folder into the resources, and xCode says it can't copy them. Is there a fix for this?
#7
As for two objects: unless you modified the scripts, all datablocks and with it textures in your whole project are loaded at startup. not just your two objects
08/30/2009 (9:07 pm)
you must not copy them. you must create references.As for two objects: unless you modified the scripts, all datablocks and with it textures in your whole project are loaded at startup. not just your two objects
#8
08/30/2009 (9:12 pm)
The two objects are the only things I've added to the project, along with 2 behaviors. It's mostly a barebones project.
#9
"Game Startup Error
'initializeProject' function could not be found.
This could indicate a bad or corrupt common directory for your game.
The game will now shut down because it cannot properly function."
Any thoughts?
08/30/2009 (10:11 pm)
Also, I've left the white screen running on the device for a while, and I just got back and it is showing this message:"Game Startup Error
'initializeProject' function could not be found.
This could indicate a bad or corrupt common directory for your game.
The game will now shut down because it cannot properly function."
Any thoughts?
#10
08/30/2009 (10:20 pm)
that means that your scripts are not compiled at all (only dso will work, .cs, .t2d and uncompressed fonts wont work) or that you used a _script optimized build for the iphone and did not manually rebuild tgbgame and the editor with the corresponding puap script change flag
#11
08/30/2009 (10:26 pm)
well I've run the game before just using the run button in iTGB, shouldn't the scripts have compiled then? And I have no clue what you mean with the puap script change tag, can you please explain this?
#12
1. only the scripts that were executed then are build, not needfully all. especially not levels
2. in that case, if you never rebuilt the TGB and TGBGame from the desktop xcode project, it will also never work on the iphone if you use any of the two Script builds. you must use the non script optimized or check out one of the two dozen threads on how to compile TGB and TGBGame for usage with script optimized iTGB
the first step would be the cheat sheet thread stickied at the top
08/31/2009 (9:15 am)
If you just use run in the game editor then:1. only the scripts that were executed then are build, not needfully all. especially not levels
2. in that case, if you never rebuilt the TGB and TGBGame from the desktop xcode project, it will also never work on the iphone if you use any of the two Script builds. you must use the non script optimized or check out one of the two dozen threads on how to compile TGB and TGBGame for usage with script optimized iTGB
the first step would be the cheat sheet thread stickied at the top
#13
08/31/2009 (9:41 am)
Quote:Now the screen is whitewww.garagegames.com/community/forums/viewthread/94931
Quote:that means that your scripts are not compiled at allwww.garagegames.com/community/forums/viewthread/97937
#14
So a few questions...
1) I do not see TGB and TGBgame in my xCode project, do I need to use the one in the regular xCode folder, not xCode_iPhone?
2) The black screen is still there for a few seconds at startup, then it turns white. What does this mean? I think it may mean that my .t2d files aren't compiled properly, as it might just not be loading the level...?
3) I'm always using iTGB_Optimize, I heard before that this was the right one to use.
4) What about using the build button in iTGB's editor to get on the iPhone? Would this be easier?
08/31/2009 (10:02 pm)
I looked at the cheat sheet thread, not really sure what I can do from there to help. Sorry if this is basic stuff, I'm new to this. Might have to make your explanations dummy-proof ;)So a few questions...
1) I do not see TGB and TGBgame in my xCode project, do I need to use the one in the regular xCode folder, not xCode_iPhone?
2) The black screen is still there for a few seconds at startup, then it turns white. What does this mean? I think it may mean that my .t2d files aren't compiled properly, as it might just not be loading the level...?
3) I'm always using iTGB_Optimize, I heard before that this was the right one to use.
4) What about using the build button in iTGB's editor to get on the iPhone? Would this be easier?
#15
2) possible.
4) wouldn't solve this problem
08/31/2009 (10:42 pm)
1) Right you need to use the regular xcode project. The iphone one is for the iphone application only.2) possible.
4) wouldn't solve this problem
#16
Have you tried the Touch Game tutorial and the Behaviour Shooter?
09/01/2009 (2:29 am)
Quote:I'm trying to test an early version of my game on my deviceDoes your game run o.k. in simulator?
Have you tried the Touch Game tutorial and the Behaviour Shooter?
#17
09/01/2009 (7:19 pm)
It does the same thing in simulator. And I've tried TouchGame, which worked. I just tried it now, though, and it didn't work either. Might try taking the blank project from a fresh iTGB download and start over that way.
#18
09/01/2009 (7:38 pm)
Ok, this is strange. I tried to build my game for mac from the iTGB project builder and see if that worked, and it came up with iPhone simulator and it installed a previous tutorial on it. What's going on?
#19
Clean (all) target(s) in Xcode.
In Xcode delete the references of the common- and game-folders and of main.cs
Start the linking and compiling process in Xcode from scratch.
Maybe you have already tried this...
09/02/2009 (4:13 am)
Try to reset simulator.Clean (all) target(s) in Xcode.
In Xcode delete the references of the common- and game-folders and of main.cs
Start the linking and compiling process in Xcode from scratch.
Maybe you have already tried this...
#20
09/02/2009 (4:09 pm)
Just tried this. Now the simulator displays the default iTGB loading screen for around 10 seconds, then the simulator returns to the home screen.
Torque Owner Zilla
Active SDK : Simulator/Device iPhone OS 2.2.1
Active Target : iTGB_Optimize