iPhone Scroll Performance - Polys vs Drawsprite vs Drawanim

Previous topic - Next topic

Kitty Hello

Yes, I was unable to get a single background quad underneath the scrolling playfield as well.
Did anyone manage to get 2 layers at 60 FPS? I'd be really interested if it's possible at all.

Hemlos

Hmm

I was looking at code by KH and Kaoti..

I noticed ENDPOLY is missing from both codes.

Perhaps this is the thorn in your paw.
Bing ChatGpt is pretty smart :O

kaotiklabs

Sorry, I forgot to type it in the post, but is in my app code.
Unluckily, it seems is not as simple as a silly mistake.

I don´t really know if is a performance problem related with the platform or with GLBasic.

I have played some games not related with GLBasic that scrolled so smooth.
You can try for example the lite version of Knights Onrush by chillingo. the smoothness is awesome.
So must be something related with GL.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Kitty Hello

Knights Onrush has much bigger thus less sprites. iPhone programming seems a lot of tweaking.

codegit

Quote from: Kitty Hello on 2009-Oct-29
Knights Onrush has much bigger thus less sprites. iPhone programming seems a lot of tweaking.

Yes, I agree, the iTouch needs care and lots of optimising. But its all possible, GLBASIC has more than enough horsepower to do most things  on this little gadget (my 2 cents) .  =D
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

kaotiklabs


Just for information.
I´ve tried severals ways of drawing a 3 layers scroll, tiles 32x32, 16 files, 8 columns.
I only apply alpha textures to one of my layers.

The two layers without alpha can be drawn using polys. Using one poly for each layer or one for all makes no difference even it has more polys to draw in one call and should be a litle faster.
The layer with alpha has to be drawn separetly because alpha with polyvector is performing horrible. So I use drawanim there.

Using 2 layers with polyvector and the other with drawanim I reach 41-43 fps without moving the scroll.
When the scroll is moved, the fps falls to 36.

Drawing the 3 layers with drawanim I reach 40-43 fps without moving the scroll.
When the scroll is moved, the fps falls to 35.

So, at least in my case, don´t mind wich method to use.
As KH said, maybe to reach a good performance, the tile size should be generously increased.
Maybe 64x64 tiles would be a better option.

Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

codegit

I also agree, 64 x 64 tile sizes will most probably work well. After the release of my game (soon now) I have an idea for a sideway scroller so this is something I will also be looking at.  :'(
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

kaotiklabs

Hi, I´ve modified the thread name because is more representative and easy to find.

I have found some interesting posts that expose a bit the performance problems that opengl developers are facing with tilemaps ont the iphone.

I hope this can help to improve the performance on glbasic. Forgive me if I´m posting something you allready know...

I was reading the comments of this interesting thread talking about iphone drawing speed (http://abepralle.wordpress.com/2009/05/06/iphone-drawing-speed/) when I found those comnents...

"This guy has a tutorial and is claming 310,000 polys per second, or over 5,100 per frame. Is he taking a totally different approach?"

So I follow the link and it seems very interesting. Don´t know if this could help, eitherway hope it helps...

Here the links:

Improving OpenGL performance on iPhone
http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es
http://www.sunsetlakesoftware.com/2009/01/13/opengl-es-catransform3d

Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!