Game Development Community

Obstacles

by Rob Stiles · in iTorque 2D · 08/26/2009 (9:47 am) · 5 replies

I've decided to try my simple platform game in iTGB 1.1 since 1.2 seems to have a horrendous memory leak, which I've posted about in a different thread. I'm having trouble with 1.1 as well though. My game seems to run fine in the editor and also when I built it for the Mac platform, it works great.

www.codexsoftware.co.uk/imagedump/Game_Mac.png
If I add it's resources (main.cs, common and game folders) to the xcode_iphone project and run it in the simulator or on the actual device I get this:

www.codexsoftware.co.uk/imagedump/Game_iPhone.png
Has anyone seen this sort of thing before? It's possibly like the view is misaligned or something.

#1
08/26/2009 (9:58 am)
Looks like one part thinks you're still in portrait mode. Check common/commonConfig.xml for those settings. Resolution should be "480 320 32" and ScreenOrientation should be "Landscape".
#2
08/26/2009 (10:47 am)
You're spot on! That was it! It's displaying properly now.

Strangely the physics don't seem to be working now. I'm setting velocities and reading them back to confirm they're set but the player sprite isn't moving. Again, it works fine on the mac!
#3
08/26/2009 (11:47 am)
You probably haven't enabled physics, or there are different flags for the iPhone-compiled project. There is a checklist of sorts in a sticky here. Generally: "object.enablePhysics = true".
#4
08/26/2009 (12:05 pm)
or object.setUsesPhysics(1);
#5
08/26/2009 (1:19 pm)
That was it, thanks guys :) Now hopefully there's no large memory leak on this one!

Thanks again!

Edit: Yup, no big memory leak now.