Author Topic: About Speed on Ipad  (Read 3154 times)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
About Speed on Ipad
« 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.



Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10762
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: About Speed on Ipad
« Reply #1 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.

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 925
  • 96A285CC
    • View Profile
    • my youtube channel
Re: About Speed on Ipad
« Reply #2 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/

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: About Speed on Ipad
« Reply #3 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
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Millerszone

  • Dr. Type
  • ****
  • Posts: 307
  • www.smashedfly.com
    • View Profile
    • Smashed Fly
Re: About Speed on Ipad
« Reply #4 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.
« Last Edit: 2010-Oct-21 by KidNovak »
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Offline Millerszone

  • Dr. Type
  • ****
  • Posts: 307
  • www.smashedfly.com
    • View Profile
    • Smashed Fly
Re: About Speed on Ipad
« Reply #5 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.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Offline Qube

  • Mr. Polyvector
  • ***
  • Posts: 157
    • View Profile
Re: About Speed on Ipad
« Reply #6 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

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4160
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: About Speed on Ipad
« Reply #7 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)
I came. I saw. I played.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: About Speed on Ipad
« Reply #8 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

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: About Speed on Ipad
« Reply #9 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.



Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: About Speed on Ipad
« Reply #10 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
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: About Speed on Ipad
« Reply #11 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.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: About Speed on Ipad
« Reply #12 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:
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: About Speed on Ipad
« Reply #13 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.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: About Speed on Ipad
« Reply #14 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:
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE