Game Development Community

Help with iTGB 1.2 iPad - choppy graphics

by Johnny Vo · in iTorque 2D · 08/21/2010 (8:40 pm) · 29 replies

I've got 1.2 fully functional on the iPad but its seems the graphics are choppy. When objects move or particles play they all seem choppy.

@Sven, Michael
You guys have any idea? I spent the last 2 days trying to get 1.4 to work on my ipad and ran into too many problems, so that's why i'm using 1.2.
Page «Previous 1 2
#1
08/21/2010 (9:44 pm)
Don't use alpha blend (and thus also no particle effects) on the ipad

the ipad is seriously fillrate limited and alpha or generally any blended rendering is killing in on exactly that end.

the ipad can draw all screen pixels about 2.5-3 times per frame to remain fluent (comparision: the original iphone 2g could do it 5 times per frame to remain fluent) which makes usage of alpha and blending a tricky and commonly "not recommend" thing.


for particles the solution isn't all that hard actually: TimelineFX can create animation strips from particle effects that you can use that reduce the amount of dran pixels massively and still look better (remember, the ipad offers you much more RAM and VRAM so use them to precalculate "overlaying" stuff like particle effects or even multilayer tilemaps if possible)
#2
08/21/2010 (9:47 pm)
Hey Marc. The app runs in iphoneX2 really smoothly tho.

But my iPad native version everything is choppier/slower, almost like the game is running at a restricted FPS (note i'm using 1.2, not 1.4)
#3
08/21/2010 (10:08 pm)
Which iTGB you use does not impact the FPS, they are not locked on either

That it works fine on the iphone is clear.
The ipad is able to draw twice as many pixels as the iphone 3G and earlier graphics chip.
Yet the screen of the ipad has 5.2 times more pixels it needs to render -> you can redraw the screen only half as often.

solution: don't use alpha or blending unless definitely required, there is no way to overcome it if you fill the fillrate, it will lead to frame skips as the gpu just can't process more than a given amount of pixels per second and 1 / x of them per frame to reach x frames per second.
the more pixels you need to render due to blending and alpha, the smaller x (the FPS) will become


In this case, the cpu of the ipad will not help the least bit because you are graphic chip limited and the graphic chip on the iphone 3GS, iPhone 4 and iPad is exactly the same, which means that for any graphic chip limited game will run worse on the pad.

iTGB 1.3 had a nice way to counter that: You could setup the rendering in two modes, full mode and half mode. In half mode it still rendered at normal iphone resolution (480x320) but scaled it to the full screen for presentation.
Unhappily there was the "only bottom left area receives touches" issue in the setup.

but generally that would be the way to go and additionally add usage of the GL_APPLE_Multisample extension available since 3.1.3 which does fullscreen antialias to hide the fact that you cheated on the rendering ;)
#4
08/22/2010 (3:03 am)
Johnny - Interesting that you decided to stick with iT2D 1.2. Apart from the broken particles (which I think the team are looking in to now) I've found 1.4 to be pretty good.
#5
08/22/2010 (4:15 am)
Thanks for everyone's comment so far. I think I'm going to put the iPad version aside until an update comes out.

@Conor - I see that you're doing great with Droneswarm. What version of iTGB are you using?
#6
08/22/2010 (12:19 pm)
Just for clarification in case that:
There is no update thats going to magically solve designs that will and can not workout on the ipad I fear ...
Best you start experimenting and learning on the matter of how graphic cards work etc a bit and how to handle that. There is a thread on here on how to optimize ipad games or at least a thread that contains some usefull ideas as disabling the blending in the blend rollout etc
#7
08/24/2010 (5:47 am)
This is bad news regarding the speed of the GPU in the iPad. Is it definitely a fact that the iPhone 4 uses the same GPU? The CPU looks like it is pretty strong on the iPhone 4, at least on paper. So, I was wondering, if we stick to the 3GS screen resolution for our graphics (480x320), how will the iPhone 4 GPU deal with that? Will the GPU then automtaically scale the graphics with minimal overhead so that it runs at approximately the same speed as in the 3GS? If that's the case, with the benefit of a having a more powerful CPU that should make the game run a bit faster overall, right? I hope that is the case anyway.
#8
08/24/2010 (7:25 am)
Just my twopence worth ... My observation is that IWT is smoother on the iPad even when scalled. Next is the iPhone4 and then the 3GS.
#9
08/24/2010 (7:41 am)
Thanks Scott. That was what I was assuming based on the specs, so that's good news :).

ps. how is it going with that distributor? I'm kinda waiting to see what your experiences are before I approach them. Have you heard of Digital Chocolate? That is another company that I've been looking at, but I haven't contacted anyone so far. I've been working on some contracts so my game progress has slowed down a bit of late.
#10
08/24/2010 (8:19 am)
Yeah its a fact that the iphone4 has the same gpu. Still the same A4 as in the ipad, just that the iphone4 in addition has a clocked down cpu.
#11
08/24/2010 (9:55 am)
@Mark, still working on changes with the publisher - it turned out to be more than I expected, hopefully will make the game that much better. We are close to release candidate though :)

@Marc, thanks Marc, that explains what I am seeing,
#12
08/24/2010 (6:33 pm)
@Scott - Let us know when that update comes out. Maybe a sneak preview?
#13
08/24/2010 (9:02 pm)
Johnny, I under orders not to show the updates unfortunately :( Otherwise you'd all be the first for a sneak preview ;-)
#14
08/25/2010 (9:14 am)
Scott, thanks for your feedback. It is probably a pain for you right now having to make changes, but the fact that they are so concerned about making the game more marketable has to be a good thing, I think. I would be more concerned if they didn't offer any advice ;). Keep us informed, and I am looking forward to seeing your next release :).

Mark, thanks for the confirmation. I think those stats make sense, and it also confirms that iTorque is mostly CPU limited. It is bad news that Apple continue to use an old GPU, but at least for iTorque users it probably isn't such bad news for now. I personally do not intend on working with the iPad for a while. I can't afford it right now anyway.
#15
08/25/2010 (9:03 pm)
Mark, they've pretty good and most of the feedback has been astute and when you think about it, you think, hmmm, why didn't I think of that.
#16
08/25/2010 (9:04 pm)
Mark, your game must be very close by now? Any screen shots or videos for us to take a look at? - I'm dead keen to see the end result :)
#17
08/26/2010 (2:49 am)
@Johnny -

I experienced the same issue as you (though I am using 1.4 on the iPad). I just (literally a few minutes before this post (in which I was hoping to find an answer)) discovered what was causing the issue (for me, at least).

I had sixteen objects on screen. All sixteen had a mounted object attached. Whenever a single one of these parent objects moved, the result was very choppy, as you have described. The iPad was sitting pretty at 40-45 FPS with the game doing nothing. Then, I moved a piece and...hmm....still 45 FPS but the movement was very choppy. So, I thought perhaps the culprit was indeed the engine and not the fill-rate of the GPU.

I disabled the mounted objects and...TADA! I now have completely smooth animation of my objects on the iPad. Also, the frame rate increased to a steady 60 FPS (not sure if that's some cap integrated into the GPU/OpenGL ES or just a weird coincidence). This 60 FPS is exactly what I get on the iPhone 4 as well (have yet to test on my old iPhone 2).

So, while my performance issue was solved, I am now at a loss as to how to compensate for my now-missing mounted objects. Since these are generated dynamically at run time, and attached to each object, I fear my only course of action is to...once again...dig into the source to see how object mounting can be optimized for iDevices.

If this works as a fix for you (or anyone else), I'm glad to have been a help. If not, I hope your solution presents itself soon.

AFTERTHOUGHT: The threshold for human recognition of non-fluid animation (moving pictures) is 16 FPS (though many can detect glitches/skips at 22 FPS and lower). This is why film runs at 24 FPS, and traditional NTSC at 29.97 FPS (PAL at 30 FPS). So, the fact that the iPad was running at 40-45 FPS during which time I could see visible skipping points more to an engine issue as opposed to the physical platform.
#18
08/26/2010 (2:52 am)
@Brian - I do have mounted objects. Thanks for letting us know. I'm going to go do some testing.
#19
08/26/2010 (2:57 am)
@Johnny -

I posted an afterthought in my original response (above your reply here). I no longer have time tonight to dig into the "mounted objects" related code but I will attack it sometime tomorrow morning.

Good luck with your tests!
#20
08/26/2010 (6:36 am)
This is an interesting result. I have a lot of mounted objects in my game and it's running fine at 40fps without any choppy motion. iT2D 1.4.
Page «Previous 1 2