[SOLVED] Speed of objects on iPad SLLLOOOOOOWWWWWW
by Scott Wilson-Billing · in iTorque 2D · 09/25/2010 (5:43 pm) · 8 replies
I've started on IWT for the iPad (1.4) and have found that I've had to double the speed of all my objects ?!? Anyone else had to do this?
Cheers
Cheers
#2
- I had one graphic that I'd forgotten to pool in the iPhone/iPod Touch version - never noticed it, yet on the iPad it choked every time I tried to create one during the game. At first I thought it was the mounting issue but I switched off the mount and still had the choke. Stuck the sprite in a pool and voila, back to nice and smooth.
- simulator graphics seem to be 16 bit?
- the accelerometer events don't appear to be arriving in a nice constant way like they do on the other iDevices. I seem to get bursts of events followed by lag. Now this would suggest some sort of CPU issue yet the rest of the game is super smooth - I've evan had the luxury of adding bigger and better effects with no slowdown.
Good fun though :)
09/25/2010 (6:19 pm)
Thanks Brian, makes perfect sense and you hit the nail on the head :) I've noticed some other stuff about the iPad as well:- I had one graphic that I'd forgotten to pool in the iPhone/iPod Touch version - never noticed it, yet on the iPad it choked every time I tried to create one during the game. At first I thought it was the mounting issue but I switched off the mount and still had the choke. Stuck the sprite in a pool and voila, back to nice and smooth.
- simulator graphics seem to be 16 bit?
- the accelerometer events don't appear to be arriving in a nice constant way like they do on the other iDevices. I seem to get bursts of events followed by lag. Now this would suggest some sort of CPU issue yet the rest of the game is super smooth - I've evan had the luxury of adding bigger and better effects with no slowdown.
Good fun though :)
#3
09/26/2010 (5:07 am)
if you use shark & instruments you can analyze such cpu induced problems normally very easily, well and fast :)
#4
More importantly, I'm wondering if it is really worth your effort porting a game to the iPad. What kind of person uses an iPad? A gamer? I doubt it. I think after the iPod/iPhone the other markets to look into are the PC (even more so now with the portable netbooks) and then Android. It would be interesting to see a survey of iPad users to see how manyy games are downloaded from the apps store, but I'm guessing it will be small. Unless I can see some evidence that suggests otherwise, I do not intend to port my game to the iPad.
09/26/2010 (5:51 am)
It's a bit worrying that the iPad version behaves differently. If you keep all of your sprites the same size as before (as per the iPhone version) does the iPad scale linearly and produce the exact same game at the larger resolution, with identical behaviour? I was assuming this, and if this isn't the case I would have some reservations about using the engine for iPad development as I would not want to waste time re-inventing what I've already spent a lot of time on. CPU/GPU wise, I would expect the same behavior on iPad compared to iPhone V4, and if this isn't the case then there is something wrong with the engine.More importantly, I'm wondering if it is really worth your effort porting a game to the iPad. What kind of person uses an iPad? A gamer? I doubt it. I think after the iPod/iPhone the other markets to look into are the PC (even more so now with the portable netbooks) and then Android. It would be interesting to see a survey of iPad users to see how manyy games are downloaded from the apps store, but I'm guessing it will be small. Unless I can see some evidence that suggests otherwise, I do not intend to port my game to the iPad.
#5
@Marc - shark doesn't appear to be available any more and I've tried instruments in the past - always comes down to the same bottlenecks (in my game) which is the StringTable and that overhead of comparing strings to find the table match - this area really needs a hashing function - hash a number from the string and use that - it would be a nice performance improvement.
09/26/2010 (10:27 am)
@Mark, I have to rescale the graphics to the larger sizes otherwise it looks like you are playing the game through a long lens - doesn't seem right. Scaling wise the graphics are double those of the iPhone. Have to say it plays a very nice game with all the details etc - we'd always had the high res images and scaled down for the iphone so the extra effort isn't much - 2 days so far and I estimate another 2-3 days to finish - a lot of this time has been me re-doing the effects in TimeLineFX - it does seem happy to eat up bigger explosions etc@Marc - shark doesn't appear to be available any more and I've tried instruments in the past - always comes down to the same bottlenecks (in my game) which is the StringTable and that overhead of comparing strings to find the table match - this area really needs a hashing function - hash a number from the string and use that - it would be a nice performance improvement.
#6
Thats why iTorque got the optimized script around 1.2 or so, which initially was broken but overcame the kill strike it got due to its script system.
09/26/2010 (3:14 pm)
Not using strings from the start would be the better idea because string operations are after alloc and dealloc the slowest thing on the iphone.Thats why iTorque got the optimized script around 1.2 or so, which initially was broken but overcame the kill strike it got due to its script system.
#7
Glad I could help, Scott. Good luck with the remaining updates for your iPad release.
09/26/2010 (10:21 pm)
Quote:
Thanks Brian, makes perfect sense and you hit the nail on the head :)
Glad I could help, Scott. Good luck with the remaining updates for your iPad release.
#8
It would be nice to use those larger sprites from TimeLineFX. Using that tool it's possible to produce some very realistic effects. I like that tool a lot.
09/27/2010 (12:57 am)
Scott, that's a big plus if you already have the larger images. If it's not such a big job to port to the iPad it's probably worthwhile. In my case it would be a big effort to produce the graphics as I only have the lower resolution ones. Most of my sprites are 32x32 or 64x64, and some of them would look bad if I scaled them up. It would be nice to use those larger sprites from TimeLineFX. Using that tool it's possible to produce some very realistic effects. I like that tool a lot.
Torque 3D Owner Brian Szatkowski
This could actually be a simple issue of relative scale and the fixed scalar units of the iT2D canvas. I "ran into" the same issue. Then, a little trial and error reminded me of some classic physics.
I'm making certain assumptions here but I can guess that you've scaled up your moveable object graphics to make use of the larger footprint. Is this correct?
What is happening is that you are now trying to move a larger object across a wider playing field, using the same scalar force.
Picture it this way:
1. Place a dime on a table-top and push it with a constant force. Do this until the dime has moved four times its width linearly.
2. Place a half dollar coin on the same surface and push it with the same constant force as the dime, for the same amount of time. Did it move four times its width? No--because the scalar force was absolute as opposed to being relative to scale.
Does that make sense?