Texture performance

Nibbie
Posts: 1
Joined: 2010.02
Post: #1
Hello,

I am new to iPhone development. Currently, I am thinking about writing a game that is rather graphics heavy.

I have not yet signed up to the iPhone Developer Program, as I am not sure whether I will get a reasonable performance. I am, being a student, a bit short of money and it would be a kind of a waste if I enroll only to discover that my idea is, performance-wise, too ambitious. I have googled a lot on the subject, but I keep hearing different stories about the performance that would apply to my situation.

It would be great if you guys could shed some light on the subject. The situation is as follows: there are only few polygons and basically, the game consists of lots of 2D sprites in a 3D environment. I won't be using lighting, but I will make some heavy use of alpha blending. You could see the game as a 2D game with sprites, but with the difference that it will be 3D (with perspective).
I can stuff my sprites in a large texture map (maybe two, not sure yet), but still - how fast does OpenGL ES handle lots of textures with alpha blending?

I am very sorry if similar questions have been asked before.

Thanks a lot,
JPvdB
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
This may be the best answer you get without benchmarking:

http://www.anandtech.com/gadgets/showdoc...i=3579&p=3
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #3
Great article! I hadn't seen that yet.

@ JPvdB: Since you don't have a device to play them yourself, what I would suggest is looking at some of the games on the iTunes store which might do something like you're planning, and then going to their websites to look at videos of their gameplay.

Giving a ridiculously wild generalization: you can probably expect to be able to get away with a couple hundred blended sprites with 3D transforms at reasonable frame rates on first gen hardware (disclaimer: depending on wildly various factors). [edit] I really shouldn't even say this because you could be fill-rate bound in a dozen sprites or with crappy coding, or easily many many more if you're great at coding and are using small sprites and batch them properly, so please emphasize the "wildly various factors" part, with extra special emphasis on "wildly" Wink [/edit]
Quote this message in a reply
Member
Posts: 26
Joined: 2010.01
Post: #4
I ran into a similar problem. Part of the difficulty is that stats on the PowerVR forums and general stats like those in the article aren't that useful, because the architecture varies wildly - just because the SGX is listed in a certain table as capable of 7m tri's a second, that's a theoretical max and still depends on clock speed, memory bus in the specific chip, as well as exactly which SGX chip it is. There are massive differences in speed between the SGX 520, 535 and 540, and no-one seems certain exactly what's in there.

In the end the only sure way to really measure these things, as lots of PC graphics engines have demonstrated in the past, is to write your own benchmarking mode in your game engine. Which also has the benefit that you're immediately factoring in how super (or not) your code is. But it does mean doing more work up-front.

Also interesting:
http://www.geeks3d.com/20090624/opengl-e...pphone-3g/
http://www.rapidrepair.com/guides/iphone...chart.html
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #5
Kerome Wrote:no-one seems certain exactly what's in there.

If you want to know what the renderer is, try asking it:

printf("%s\n", glGetString(GL_RENDERER));
Quote this message in a reply
Member
Posts: 144
Joined: 2009.11
Post: #6
arekkusu Wrote:If you want to know what the renderer is, try asking it:

printf("%s\n", glGetString(GL_RENDERER));

If you run that on an iPhone or iPod touch you'll need to pay special attention to the console view in the devices pane of Xcode in order to see the output.

(Just an FYI - otherwise things could go south as far as your sanity is concerned).

IIRC the renderer differs from simulator to device, so you'll have to keep that in mind while working.

Everyone's favourite forum lurker!
https://github.com/NSError
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Performance problems with render to texture method mbw234 6 5,199 Jun 25, 2010 01:47 AM
Last Post: Jamie W
  Render to texture performance iPhoneGG 2 3,739 May 18, 2009 03:31 PM
Last Post: ShiftZ
  Texture Performance Questions OptimisticMonkey 4 2,747 Mar 18, 2009 08:06 PM
Last Post: Frogblast