GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2010-Oct-19

Title: About Speed on Ipad
Post by: mentalthink on 2010-Oct-19
HI, today arrives my iPad. Well I look first, on the forum about becuase is a little more slow than iPhone, but i don´t know is it´s is resolved yet, in this case excuse me.

Well I stay making probes, but is very slow, I try to put systempause command in false and limit fps-1, and don´t works well, the orientation of the screen no matter, only if you compile to resolution of iphone, works equal than iphone, but if you drawing all the screen or some portion of this (complete on horintal or vertical), runs slow.

I try to put in the screen pop up, when copiles in Glbasic, FULLSCREEN Activate/Desactivate but is the same, I say this, because in Wiz if you put FULLSCREEN Activated on the popUpscreen before compile Glbasic, WIZ runs very slow, however if you desactvate runs too much quickly.

Well, I hope not disturb whit this theme, but if anyone know how resolve it, will be a great.

Thanks, and Best Regards,
Iván J.


Title: Re: About Speed on Ipad
Post by: Kitty Hello on 2010-Oct-19
well, it has an 3GS graphics processor but 5x the pixels to render. That's the facts. Nothing you can do.
Try:
-upscale the image
-use STARTPOLY as little as possible
-Don't use any other colour than white on POLYVECTOR
-Try to avoid alpha blending
-Drop frames and render every 2nd frame, only.
Title: Re: About Speed on Ipad
Post by: Marmor on 2010-Oct-20
Hi there

There is a  gratis   Benchtest in the appstore  called "3D Bench"

maybe someone can post his results for ip4 ,3gs ipad and 3g .

on my 2g i have time : 27,0629 and 18,43 fps


also look here
http://www.geek.com/articles/mobile/iphone-4-is-slower-than-ipad-benchmarks-indicate-20100623/
Title: Re: About Speed on Ipad
Post by: ampos on 2010-Oct-20
3G (3.1)     :  28.92 & 17.25 fps
3Gs (4.0.1):  12.53 & 39.82 fps
4G (4.1)    :   10.75 & 46.43 fps
Title: Re: About Speed on Ipad
Post by: Millerszone on 2010-Oct-21
I installed my app on the iPad today, but wasn't happy with the performance.
My app is a baseball game still in test form. Basically all that's working
is pitching the ball and hitting the ball with a bat, also border collision checks.
FPS is about 15.
So then I took everything out of the main loop except for pitching the ball and still
15 FPS. I know the iPad isn't that slow.
It runs 60FPS on my 1.5Ghz single core laptop, windows 7.

Could I be compiling wrong? Wrong settings in xcode?


3D Bench (iPad 3G 32GB 3.2.1): 49.6 Average


I would appreciate any help.

Thank you.
Title: Re: About Speed on Ipad
Post by: Millerszone on 2010-Oct-22
I had all of the background "DRAWSPRITE's" in the main loop.  :S
So, I removed the "DRAWSPRITE's" from the loop and now, back to 60FPS.

Title: Re: About Speed on Ipad
Post by: Qube on 2010-Oct-22
Quote from: KidNovak on 2010-Oct-22
I had all of the background "DRAWSPRITE's" in the main loop.  :S
So, I removed the "DRAWSPRITE's" from the loop and now, back to 60FPS.

If your background is going to be static then drawsprite / polyvector is overkill and will suck down your FPS.

Instead use the LOADBMP command for static backgrounds (each showscreen keeps the image loaded) and you'll find your FPS will be back up to 60fps  :good: - For example

Code (glbasic) Select

LOADBMP "background.png"

WHILE True
   // Draw my wonderful graphics - No need to worry about the background
   
  SHOWSCREEN
WEND


Simples  =D
Title: Re: About Speed on Ipad
Post by: Ian Price on 2010-Oct-22
LOADBMP does have some hit on the CPU, but can be cheaper than drawing images. Don't forget though that this will keep that image as the background until you change it. BLACKSCREEN will change it back to black (well I never! :P)
Title: Re: About Speed on Ipad
Post by: mentalthink on 2010-Oct-22
HI whit Becnhmark, on my iPad, are:

Fps:49.223

O.s 3.2.2

-----------------------------------------------------
On my iPod:
Fps: 27.93

O.s:4.1

Cheers
Title: Re: About Speed on Ipad
Post by: mentalthink on 2010-Oct-22
HI I make a simple probe, whit a backgrounds, in this time only 2, but they are scaled to fit the iPad screen, the speed, whit only one is 60 FPS, when you draw the second this comming down to 30, estable, I think can be usefull for someone.

Gernnot cooment me about only render only the second frame, I think is this same thread, this little trick code: (I think have to make this mode, but i´m really not sure about this)


While true
BLA,BLA

BLA,
BLA

INC fps_counter,1
   IF fps_counter=2
SHOWSCREEN
   ENDIF
   IF fps_counter>2 THEN fps_counter=1
WEND

Note: whit this code the FPS, turns a little crazy, in some momoents tell yo 30 FPS, ans another 300 or more.



I only Draw 1 Frame Yes and another Not, and the speed is increased in the game.

For make the sprites to fit all the screen, I use streetchSprite command, yes the quality changes, but I think making probes about the image size, a little more great (original), and trying combinations about the needs of everyone, I think the FPS can sppedup, I don´t know if too much, or perhaps not. But seeying, whats happend me make 2 days, whit ths same images, my Ipad, don´t cross the 12 FPS barrier, and now is 30 FPS, what I think is playable

Best Regards,
Iván J.


Title: Re: About Speed on Ipad
Post by: ampos on 2010-Oct-22
No, you have to ignore all the draw commands in the "no display cycle". They are the ones that eats the fps, not the showscreen command. If you want to move a sprite in x axis:
Code (glbasic) Select

repeat
   inc x
   inc fpscounter
   if fpscounter=2
      drawsprite 1,x,y
      showscreen
      fpscounter=0
   endif
forever
Title: Re: About Speed on Ipad
Post by: mentalthink on 2010-Oct-22
oK, Ampos, thanks, I think was i made is wrong, things about not programmer, I will try what you sayme now, and in a few minuts, a tell how works.

Thanks.

PS: whats is the name´s of your app in the store, i like to try it . ;)

Iván J.
Title: Re: About Speed on Ipad
Post by: ampos on 2010-Oct-22
Have 2, SANDSCAPE and KRAKOUT. Sandscape is the one sent to appstore, but the version in betatest in the forum is not the finished one. Krakout is "in development"  :giveup:
Title: Re: About Speed on Ipad
Post by: mentalthink on 2010-Oct-22
HI, Ampos, ok I go to see how is your first game

About you tell me , the little code trick, works, very fine, but the resut is the same was I made , but I thinks your answer is more efficiently.

Best Regards,
Iván J.
Title: Re: About Speed on Ipad
Post by: ampos on 2010-Oct-22
Quote from: mentalthink on 2010-Oct-22
HI, Ampos, ok I go to see how is your first game

About you tell me , the little code trick, works, very fine, but the resut is the same was I made , but I thinks your answer is more efficiently.

Best Regards,
Iván J.

Pero que si quieres podemos seguir en castellano y dejar de hablar como los indios  :booze: