Help getting going...
by Keith Connolly · in iTorque 2D · 10/18/2009 (3:35 pm) · 19 replies
First off I'd like to say Hi. I love GG and their products.
Ok for starters I'm having issues compiling anything to my iPhone.
I always get 200+ warnings in xCode and the games almost never run.
I can sometimes get one out of 30 compiles to run on the phone.
So, what are the recommended settings for a device test? I can run the app on my PC, Mac, 360 no problem but when it comes to the iPhone I start getting issues.
Ok so my issues are:
-Compile issues with the iPhone.
-Why is there 3.0 OS support?
-I was reading that load time can cause an app to never start, could this be my issue? It's a simple puzzle game that uses tilemaps with scrollers for scenic backgrounds.
-What are the recommended image sizes, format, etc? I have a large number of 1024x1024+ images for panoramics, etc. I'm guessing these are too big. Always in PNG format, is that still a good choice for this engine?
-Ok so there's even more going wrong now. I got a few compiles to ACTUALLY WORK. (for once) Problem is now the resolution is all mucked up, I see bars on the sides of the screen and everything is flickery and jittery (like
your monitors refresh rate is messed up) and this is on the Phone.
Basicly, there's no real baseline as to where I should start when converting a TGB project to iTGB.
Even my basic app that I simply added onto the iPhoneTest game now won't compile once I get past a certain amount of content.
I am now EXTREMELY afraid that I bought a license to something that isn't even functional.
Is there a way to get a refund? This isn't even close to the functionality it promised.
Ok for starters I'm having issues compiling anything to my iPhone.
I always get 200+ warnings in xCode and the games almost never run.
I can sometimes get one out of 30 compiles to run on the phone.
So, what are the recommended settings for a device test? I can run the app on my PC, Mac, 360 no problem but when it comes to the iPhone I start getting issues.
Ok so my issues are:
-Compile issues with the iPhone.
-Why is there 3.0 OS support?
-I was reading that load time can cause an app to never start, could this be my issue? It's a simple puzzle game that uses tilemaps with scrollers for scenic backgrounds.
-What are the recommended image sizes, format, etc? I have a large number of 1024x1024+ images for panoramics, etc. I'm guessing these are too big. Always in PNG format, is that still a good choice for this engine?
-Ok so there's even more going wrong now. I got a few compiles to ACTUALLY WORK. (for once) Problem is now the resolution is all mucked up, I see bars on the sides of the screen and everything is flickery and jittery (like
your monitors refresh rate is messed up) and this is on the Phone.
Basicly, there's no real baseline as to where I should start when converting a TGB project to iTGB.
Even my basic app that I simply added onto the iPhoneTest game now won't compile once I get past a certain amount of content.
I am now EXTREMELY afraid that I bought a license to something that isn't even functional.
Is there a way to get a refund? This isn't even close to the functionality it promised.
#2
Everybody is getting 5000 warnings so just ignore it.
- compile issues? you'l need to be more specific for a proper respond.
For the rest of your questions. you may not get a respond because these questions have been asked over a 100 times by any newcomer that starts using torque. I can go one by one on all your issues and find you at least 5 threads talking about it.
Feel free to search for the specific topics and you will find an answer. if not please post again, and I will try to help you find that thread.
This forum is the most useful one of all of Torque's product. trust me , you will get your answer and it will work for you. hopefully very soon.
10/22/2009 (6:58 pm)
Keith, welcome to iTGB.Everybody is getting 5000 warnings so just ignore it.
- compile issues? you'l need to be more specific for a proper respond.
For the rest of your questions. you may not get a respond because these questions have been asked over a 100 times by any newcomer that starts using torque. I can go one by one on all your issues and find you at least 5 threads talking about it.
Feel free to search for the specific topics and you will find an answer. if not please post again, and I will try to help you find that thread.
This forum is the most useful one of all of Torque's product. trust me , you will get your answer and it will work for you. hopefully very soon.
#3
10/22/2009 (7:05 pm)
1024x1024 PNGs are right out. Try PVRs, and maybe 512x512. Memory is very tight. We need a proper wiki with all this :)
#4
Keith , did you get the iPhoneTest game to work on your phone?
10/22/2009 (7:54 pm)
I agree.... we need a getting started guide. _edited_Keith , did you get the iPhoneTest game to work on your phone?
#5
What compile issues. "I am having problems" doesn't normally warrant a response on ANY internet communication medium. I would love to help, please elaborate?
-Why is there 3.0 OS support?
This makes no sense. There must be 3.0 support, for staying with the times and being able to submit apps to the store when they deprecate 2.x
-I was reading that load time can cause an app to never start
This is a limitation on the iPhoneOS itself, and happens no matter what app, engine or interface. If your app is taking too long to load "its not good for the end user", and will be shut down. NO exceptions - Load only what you need for the bare minimum (and read the guidelines from apple carefully, you are not allowed to put another loading screen after default.png)
What are the recommended image sizes, format, etc?
Images can be 1024x1024 without problems, depending on usage.
Things that influence image speeds :
a) Disk access. Loading 25 sprites, or 1 512x512 = obvious performance gain - Lessen the amount of time the engine is reading files from disk for faster load times. This includes script files, btw.
b) Memory usage - any non square texture gets converted to one (normal), a 129x128 image,becomes 256x256 in memory. Pack as many images as possible onto the same sprite sheets (reduces texture state changes on the device and renders ALOT faster).
c) Using PVR's impacts load times drastically. PVR is compressed, and can be uploaded directly to the GPU, and used much faster (no need to load from ram first) so PVR's are an obvious choice. They DO destroy certain images, seeing as it is compression after all! So aim to have the handful of items that you want "crisp" inside a seperate png, and put the rest pvr format.
d) Dont load images you dont need, unload images you are not using.
e) REMEMBER THAT THIS IS A MOBILE DEVICE, A CELLPHONE. Anyone who has had the joys of working with ANY console will understand that performance, optimisation and memory are the 3 most crippling and most time consuming thing on ANY console. The iphone platform is like, a MINI console. Dont abuse it, and it wont abuse your sanity. Porting a PC game is cool but it MUST be put in a mobile context. Dont bother expecting copy paste from a pc to a cellphone, thats not really a good idea no matter what you are doing.
Problem is now the resolution is all mucked up
Have you checked that your commonConfig.xml is using the right settings, are you using Torque2D for iphone "Torque Game Builder.app" to set the settings ? Or is it settings from the PC game?
We need a bit more information. We cannot guess whats happening! (it would be a cool trick though).
10/22/2009 (9:07 pm)
- Compile issues with the iPhone.What compile issues. "I am having problems" doesn't normally warrant a response on ANY internet communication medium. I would love to help, please elaborate?
-Why is there 3.0 OS support?
This makes no sense. There must be 3.0 support, for staying with the times and being able to submit apps to the store when they deprecate 2.x
-I was reading that load time can cause an app to never start
This is a limitation on the iPhoneOS itself, and happens no matter what app, engine or interface. If your app is taking too long to load "its not good for the end user", and will be shut down. NO exceptions - Load only what you need for the bare minimum (and read the guidelines from apple carefully, you are not allowed to put another loading screen after default.png)
What are the recommended image sizes, format, etc?
Images can be 1024x1024 without problems, depending on usage.
Things that influence image speeds :
a) Disk access. Loading 25 sprites, or 1 512x512 = obvious performance gain - Lessen the amount of time the engine is reading files from disk for faster load times. This includes script files, btw.
b) Memory usage - any non square texture gets converted to one (normal), a 129x128 image,becomes 256x256 in memory. Pack as many images as possible onto the same sprite sheets (reduces texture state changes on the device and renders ALOT faster).
c) Using PVR's impacts load times drastically. PVR is compressed, and can be uploaded directly to the GPU, and used much faster (no need to load from ram first) so PVR's are an obvious choice. They DO destroy certain images, seeing as it is compression after all! So aim to have the handful of items that you want "crisp" inside a seperate png, and put the rest pvr format.
d) Dont load images you dont need, unload images you are not using.
e) REMEMBER THAT THIS IS A MOBILE DEVICE, A CELLPHONE. Anyone who has had the joys of working with ANY console will understand that performance, optimisation and memory are the 3 most crippling and most time consuming thing on ANY console. The iphone platform is like, a MINI console. Dont abuse it, and it wont abuse your sanity. Porting a PC game is cool but it MUST be put in a mobile context. Dont bother expecting copy paste from a pc to a cellphone, thats not really a good idea no matter what you are doing.
Problem is now the resolution is all mucked up
Have you checked that your commonConfig.xml is using the right settings, are you using Torque2D for iphone "Torque Game Builder.app" to set the settings ? Or is it settings from the PC game?
We need a bit more information. We cannot guess whats happening! (it would be a cool trick though).
#6
However, images *must* be square power of 2 for them to be converted into PVR files :)
Ronny for Wiki President! ;)
10/23/2009 (3:09 am)
@ Sven: Your image upsizing example is slightly off. Images will resize to be power of 2, not square power of 2. So your 129x128 example will only grow to 256x128.However, images *must* be square power of 2 for them to be converted into PVR files :)
Ronny for Wiki President! ;)
#7
With some help I got a few of the bests to work but optimiZed never works still. I commonly get this exc_ something error and it won't compile.
I've already released iPhone apps by normal hand coding and saw this as a shortcut so you can see my issues when I spend more time trying to get it working then I did for the whole dev time of my first 2 apps.
I'm going to he running through the GCC compilers and see if I can find a setup that works better.
Any suggestions? When I use the build project thing in tgb what's the best settings to use?
10/23/2009 (3:53 am)
All this information is good and much appriciated. Honestly for the high quality of GGs stuff to get itgb with all these issues is annoying at best. I even had issues compiling the iPhone test app.With some help I got a few of the bests to work but optimiZed never works still. I commonly get this exc_ something error and it won't compile.
I've already released iPhone apps by normal hand coding and saw this as a shortcut so you can see my issues when I spend more time trying to get it working then I did for the whole dev time of my first 2 apps.
I'm going to he running through the GCC compilers and see if I can find a setup that works better.
Any suggestions? When I use the build project thing in tgb what's the best settings to use?
#8
@Keith : Have you read this post : http://www.garagegames.com/community/forums/viewthread/104389
10/23/2009 (4:17 am)
@Luke : Thanks for the correction, it was a rushed post! @Keith : Have you read this post : http://www.garagegames.com/community/forums/viewthread/104389
#9
I have 5 game pieces at 40x40.
1 iPhone sized background.
All PNGs.
I'm not doing any datablock loading / unloading cause there's only one level and it's just this one small test game.
Is this seriously a ram issue? I don't think so. I mean, I've made apps before with WAY larger more compilcated PNGs before.
EDIT: Should I be using the beta or non-beta T2D for iPhone?
11/02/2009 (12:12 pm)
Ok I've gotten some luck now, had a few good compiles but it seems even my mini-game (full screen block layer thing) with about 5 40x40 pngs are taking FOREVER to load. and when it does it runs slowly. I have 5 game pieces at 40x40.
1 iPhone sized background.
All PNGs.
I'm not doing any datablock loading / unloading cause there's only one level and it's just this one small test game.
Is this seriously a ram issue? I don't think so. I mean, I've made apps before with WAY larger more compilcated PNGs before.
EDIT: Should I be using the beta or non-beta T2D for iPhone?
#10
How many seconds does it take to get there? It should take less than 10 seconds to get started with that little, I think. Make sure thumb code is off (I think it was on in 1.2 and earlier). I'm getting very short loading time with the bouncing ball demo included.
11/02/2009 (3:38 pm)
I would personally recommend the latest beta. Sven's guide shows you the steps to go through.How many seconds does it take to get there? It should take less than 10 seconds to get started with that little, I think. Make sure thumb code is off (I think it was on in 1.2 and earlier). I'm getting very short loading time with the bouncing ball demo included.
#11
No matter what I cannot get a SINGLE stable build, that stays stable.
This is beyond ridiculous.
I have spent 40+ hours just trying to get a compile so that I MIGHT be able to start making a game.
I have followed Svens excellent guide and still I cannot get a stable build.
I am running on a mac-mini late 2008, leopard (64x).
Any help would be apprciated.
I have also begun running into an error where Xcode says something like "cannot inspect application package".
I've been using xCode for years and have never seen that message. There's no error codes or anything.
I really should have done my homework before I bought this...
11/06/2009 (12:32 am)
I made a TGB game with a single 40x40 PNG, it would compile but never run. The application would sit in the loading screen for ages until the iphone would turn it off. No matter what I cannot get a SINGLE stable build, that stays stable.
This is beyond ridiculous.
I have spent 40+ hours just trying to get a compile so that I MIGHT be able to start making a game.
I have followed Svens excellent guide and still I cannot get a stable build.
I am running on a mac-mini late 2008, leopard (64x).
Any help would be apprciated.
I have also begun running into an error where Xcode says something like "cannot inspect application package".
I've been using xCode for years and have never seen that message. There's no error codes or anything.
I really should have done my homework before I bought this...
#12
11/07/2009 (11:49 pm)
Bump
#13
11/08/2009 (12:02 am)
I had a problem with sound so I had to disable OpenAL before launching the app.
#15
I installed XCODE and the SDK then downloaded the latest beta version 1.3 of iTGB.
I opened the iPhone Test application in iTGB, modified it to hide the statusbar and clicked on the build game option from the menu. I then clicked debug, simulator, clean and build. After sometime a giant text file appears. It says build successful. It runs the simulator. I launch my application from the simulator, the TGB splash goes dark, and sits there. It never does anything else.
I checked my compiler, followed all the sticked posts and still not a FRIKKEN thing.
Please explain, step by step, how to create with iTGB (GUI / Maker) a simple project, how to compile it for iPhone AND Simulator testing.
I can't even get a project with a single PNG in the background to compile or even run.
I am not getting any compile errors at the moment and so I cannot provide any error codes, etc.
Mod Note : Profanity. No thanks!
11/18/2009 (2:20 am)
Ok so I completely removed XCODE the SDK and everything related to (i)TGB.I installed XCODE and the SDK then downloaded the latest beta version 1.3 of iTGB.
I opened the iPhone Test application in iTGB, modified it to hide the statusbar and clicked on the build game option from the menu. I then clicked debug, simulator, clean and build. After sometime a giant text file appears. It says build successful. It runs the simulator. I launch my application from the simulator, the TGB splash goes dark, and sits there. It never does anything else.
I checked my compiler, followed all the sticked posts and still not a FRIKKEN thing.
Please explain, step by step, how to create with iTGB (GUI / Maker) a simple project, how to compile it for iPhone AND Simulator testing.
I can't even get a project with a single PNG in the background to compile or even run.
I am not getting any compile errors at the moment and so I cannot provide any error codes, etc.
Mod Note : Profanity. No thanks!
#16
The current problem you have, right now (according to the post above) is the dimming on the default.png : I have explained this before. Again, for completeness sake.
Default.png is a state imposed by the operating system, it is a FORCED overlay, even on its own controls - while being active (for example, displaying an alertView that says "cannot find main.cs" before the app has entered its main loop).
The solution :
Fix the error iTGB is telling you about. I know it *shouldnt* have errors but it was unforseen at the time of that release. The next release will not have this issue.
To fix it :
First, let it dim the default.png, its actually in a loop waiting for you to press "ok" on the dialog, the dialog is just hidden. Then, in the DEBUGGER WINDOW, press PAUSE :

Next, you will see code in the window on the left, showing what the code was doing at the time.

As you can clearly see, the error is quite obvious. Can you tell me what that error says ? Depenging on WHICH error message you get, i can fix it with 1 post and help you move forward.
If its to do with main.cs make sure that your resources are making it into the bundle. At times, the main.cs in the root does not make its way into the bundle (because XCode doesnt recognise the file setup fully for cs files).

As you can see, the main.cs is in my Resources AND my Copy Bundle Resources build phase. Once i can see that all my resources have made it into the build phase, i check that they are going into the right targets, see the tick in the targets of the file itself :
[image]http://img695.imageshack.us/img695/3061/screenshot20091118at947.png [/image]
Im now going to verify that they made it into the bundle , right click on the Products / yourGameName.app and say Reveal in Finder. Now, right click on the .app bundle and say "Show Package Contents", looking inside i can see that all my files exist.

Now, the app will *hopefully* make it past the errors at the beginning, and execute normally.
Also, you really need to read more and learn the tools you are using (namely XCode/Mac side). I would advise using XCode instead of the builder dialog thing, as you have to setup profiles, app identifiers and all other aspects of the build in XCode anyway. It is crucial that you start looking to understand the toolkit that apple has provided.
Hope this helps, again :)
11/18/2009 (3:55 am)
Keith, The current problem you have, right now (according to the post above) is the dimming on the default.png : I have explained this before. Again, for completeness sake.
Default.png is a state imposed by the operating system, it is a FORCED overlay, even on its own controls - while being active (for example, displaying an alertView that says "cannot find main.cs" before the app has entered its main loop).
The solution :
Fix the error iTGB is telling you about. I know it *shouldnt* have errors but it was unforseen at the time of that release. The next release will not have this issue.
To fix it :
First, let it dim the default.png, its actually in a loop waiting for you to press "ok" on the dialog, the dialog is just hidden. Then, in the DEBUGGER WINDOW, press PAUSE :

Next, you will see code in the window on the left, showing what the code was doing at the time.

As you can clearly see, the error is quite obvious. Can you tell me what that error says ? Depenging on WHICH error message you get, i can fix it with 1 post and help you move forward.
If its to do with main.cs make sure that your resources are making it into the bundle. At times, the main.cs in the root does not make its way into the bundle (because XCode doesnt recognise the file setup fully for cs files).

As you can see, the main.cs is in my Resources AND my Copy Bundle Resources build phase. Once i can see that all my resources have made it into the build phase, i check that they are going into the right targets, see the tick in the targets of the file itself :
[image]http://img695.imageshack.us/img695/3061/screenshot20091118at947.png [/image]
Im now going to verify that they made it into the bundle , right click on the Products / yourGameName.app and say Reveal in Finder. Now, right click on the .app bundle and say "Show Package Contents", looking inside i can see that all my files exist.

Now, the app will *hopefully* make it past the errors at the beginning, and execute normally.
Also, you really need to read more and learn the tools you are using (namely XCode/Mac side). I would advise using XCode instead of the builder dialog thing, as you have to setup profiles, app identifiers and all other aspects of the build in XCode anyway. It is crucial that you start looking to understand the toolkit that apple has provided.
Hope this helps, again :)
#17
11/22/2009 (11:52 pm)
The most common error I'm getting when it won't go past the default state is "initializeProject function could not be found."
#18
If not - inside of platformiPhone/iPhoneStrings.mm : Change the function dVsprintf to look like this :
This should allow you to see the normal "console" from torque, inside the XCode debugger console while testing. See what the output says.
11/23/2009 (12:40 am)
That simply means that it is not finding the game script. Verify the data is there - it seems it is not. If it is there it could be an actual error in the script which prevents the function from being declared. Seeing as you are testing on the device - Do you get console output (like echo("some text")) showing up in the XCode debugger console(cnd shift R). If not - inside of platformiPhone/iPhoneStrings.mm : Change the function dVsprintf to look like this :
int dVsprintf(char *buffer, dsize_t /*bufferSize*/, const char *format, void *arglist)
{
S32 len = vsprintf(buffer, format, (char*)arglist);
#ifndef TORQUE_SHIPPING
printf("%s \n", buffer);
#endif //TORQUE_SHIPPING
return (len);
}This should allow you to see the normal "console" from torque, inside the XCode debugger console while testing. See what the output says.
#19
I just figured out how to resolve that and posted the directories to wipe, etc. in a step-by-step here (I am running a Mac Mini Snow leopard 64 bit so seems close):
www.garagegames.com/community/forums/viewthread/93331/2#comment-703603
11/29/2009 (9:20 pm)
Quote:
Torque Owner Keith Connolly
#11
11/06/2009 (12:32 am)
...I am running on a mac-mini late 2008, leopard (64x).
...
I have also begun running into an error where Xcode says something like "cannot inspect application package".
I've been using xCode for years and have never seen that message. There's no error codes or anything.
I just figured out how to resolve that and posted the directories to wipe, etc. in a step-by-step here (I am running a Mac Mini Snow leopard 64 bit so seems close):
www.garagegames.com/community/forums/viewthread/93331/2#comment-703603
Torque Owner Keith Connolly
MesaRO LLC.