Game Development Community

Images show when run from Torque, but not in simulator

by Eric Holsinger · in iTorque 2D · 10/03/2009 (5:59 am) · 5 replies

I'm using some of the fish art resources to test out the 1.3beta for iPhone.

The project runs fine from torque. But, when I build the project in xcode, the simulator is all black after the GG splash screen. I added the resources directory to the xcode project, but no luck. So, I removed it again.

Then, I moved my images into the game/data/images and game/data/particles. I removed the fish pack resources, created new sprites manually, and changed the objects to use the new sprites.

I reran from Torque and the game still looks OK.

In xcode, I deleted and re-added the main.cs, game and common directories. I did a clean, build and launch in the simulator and only some of the images show up. I can tell that the static sprites are the ones not showing up in the simulator, this time, though.


The static sprites have these settings:
Image Mode: FULL
Filter Mode: SMOOTH
Filter Pad is checked
Prefer Speed is checked
Preload is checked

I've tried them with and without Compress to PVR.

The only difference I see between the static sprites and the animated ones is the Image Mode (naturally, it's CELL for the animated ones).

Any ideas on what I'm doing wrong here?


#1
10/03/2009 (4:11 pm)
the images are 1024x1024 or smaller and if you have cell then without compression (for iTGB 1.2 and earlier)
#2
10/03/2009 (4:17 pm)
Not sure what you mean; I think you mean to say that I need to have images less than 1024x1024, is that correct? I checked, and the images that come with the T2D & iTGB are all 1024x768 for the backgrounds.

I've gone back and tried iTGB 1.2, iTGB 1.2.2 and T2D for iPhone Beta. Maybe it's an xcode thing?
#3
10/03/2009 (4:57 pm)
if it is related to the actual code you would get an error or message when you run the game from xcode while beeing in the debug view as it shows the console.

what you can do is run it with the various instruments from xcode ... especially if possible the opengl one so you can see your graphics mem usage.


as for the 1024x768: keep in mind that you waste memory with them as the iphone only accepts power of two so 512x512, 1024x512 or 1024x1024

also 1024x768 for a background on a 480x320 device is kind of oversized.
#4
10/04/2009 (8:27 am)
This is excellent advice. I understand what you are saying. I was only trying to make it work using Torques provided resources, to test it out. But things are not going so well.

I created a new test background. But that did not render in the simulator either.

I then decided my project must be hosed and tried to create a new project. Now I'm having other issues.

Not sure Torque was worth my money.
#5
01/27/2010 (4:26 am)
You have to convert the texture to pvr (texture must be power of two) and change the datablock relative to the level (remove image extension). Read the guide...it's explained.