Author Topic: Default speed of android devices  (Read 15853 times)

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Default speed of android devices
« on: 2011-Oct-03 »
No matter what i set in the LIMITFPS function, my HTC legend has an average FPS at 47 with the most simple loops.
ex:


WHILE NOT KEY(1)
   GOSUB ShowFPS
   SHOWSCREEN
WEND




SUB ShowFPS:
   dtime=GETTIMER()
   FPS = ((1000/dtime)+FPS)/2
   delay=delay+dtime
   IF delay>1000 // 1/2 sec
      delay=0
      fps_draw=FPS
   ENDIF
   PRINT "FPS: "+fps_draw, 0 ,0
ENDSUB // SHOWFPS

Any thought about this ?
Is there an fixed framerate on some android devices ?

Also my ASUS eee Pad Transformer only shows black and white on the screen with glb apps.
"Sugar makes the world go 'round. Caffeine makes it spin faster."

MrTAToad

  • Guest
Re: Default speed of android devices
« Reply #1 on: 2011-Oct-03 »
Quote
ASUS eee Pad Transformer only shows black and white on the screen with glb apps
It wouldn't happen to be a cheap system, would it ? 

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Default speed of android devices
« Reply #2 on: 2011-Oct-03 »
Nope

http://www.asus.com/Eee/Eee_Pad/Eee_Pad_Transformer_TF101/

NVIDIA® Tegra™ 2 1.0GHz dual-core CPU

Fast.

The phone with slow framerate is an HTC Legend:

http://www.gsmarena.com/htc_legend-3141.php
"Sugar makes the world go 'round. Caffeine makes it spin faster."

Offline Falstaff

  • Mr. Polyvector
  • ***
  • Posts: 148
    • View Profile
Re: Default speed of android devices
« Reply #3 on: 2011-Oct-03 »
In my testing with an asus transformer, I found that anything relating to CREATESCREEN/USESCREEN would not work. Whenever I tried to draw a sprite created with CREATESCREEN, nothing would display. Unfortunately that is how I tried to do the scaling in my game. As soon as I took that code out, it would work fine.. of course it'd only take up a tiny 320x480 portion of the display. Unfortunately I don't have the device anymore to do further testing.. but it seemed like the other drawing commands such as DRAWSPRITE, DRAWANIM, and STRETCHSPRITE, all seemed fine.

It also seemed like the time trial overlay wasn't rendering properly. I don't know why, but frankly considering my main target platforms are iOS and Android.. if things aren't working better for Android by the time my first title is released, I may have to look into other competing multi-platform game dev SDK's..

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10746
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Default speed of android devices
« Reply #4 on: 2011-Oct-04 »
It's the drivers. Android devices differ so much in divers capability it's a true joy (NOT).
See the log output what it says about "framebuffer support".

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Default speed of android devices
« Reply #5 on: 2011-Oct-05 »
This is my first android project, and I can't find any log output, or ... I don't know where it is or how to generate it.
Anyway - I have other games on it that HAVE to be a lot faster, and accelerated.
"Sugar makes the world go 'round. Caffeine makes it spin faster."

MrTAToad

  • Guest
Re: Default speed of android devices
« Reply #6 on: 2011-Oct-05 »
Yes, CREATESCREEN/USESCREEN as well as SPRCOLL are dodgy...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10746
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Default speed of android devices
« Reply #7 on: 2011-Oct-05 »
in the compiler/platform/andoird/bin is a _view_log.bat file to show the log of the android debug list.

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Default speed of android devices
« Reply #8 on: 2011-Oct-05 »
This is my log-output:


I/SDL     ( 4429): Starting up OpenGL ES 1.1
I/glbasic ( 4429): SDL_SetVideoMode seems to be 1
I/glbasic ( 4429): get accurate timer - 1st call
I/glbasic ( 4429): flip - 1st call
I/glbasic ( 4429): BGRA ext NOT supported

I/glbasic ( 4429):
   GL_AMD_compressed_3DC_texture
   GL_AMD_compressed_ATC_texture
   GL_ARB_texture_env_combine
   GL_ARB_texture_env_dot3
   GL_ARB_texture_mirrored_repeat
   GL_ARB_vertex_buffer_object
   GL_ATI_compressed_texture_atitc
   GL_ATI_texture_compression_atitc
   GL_EXT_blend_equation_separate
   GL_EXT_blend_func_separate
   GL_EXT_blend_minmax
   GL_EXT_blend_subtract
   GL_EXT_stencil_wrap
   GL_OES_EGL_image
   GL_OES_blend_equation_separate
   GL_OES_blend_func_separate
   GL_OES_blend_subtract
   GL_OES_compressed_ETC1_RGB8_texture
   GL_OES_compressed_paletted_texture
   GL_OES_draw_texture
   GL_OES_extended_matrix_palette
   GL_OES_framebuffer_object
   GL_OES_matrix_palette
   GL_OES_point_size_array
   GL_OES_point_sprite
   GL_OES_read_format
   GL_OES_stencil_wrap
   GL_OES_texture_cube_map
   GL_OES_texture_env_crossbar
   GL_OES_texture_mirrored_repeat

I/glbasic ( 4429): Texture size limit: 1024
I/glbasic ( 4429): init fbo
I/glbasic ( 4429): 2D VP
I/glbasic ( 4429): OGRB init [OK]
I/glbasic ( 4429): Cptn
I/glbasic ( 4429): Network
I/glbasic ( 4429): Input
I/glbasic ( 4429): Window mode
I/glbasic ( 4429): Create DXin
I/glbasic ( 4429): sdl_grab
I/glbasic ( 4429): reptr
I/glbasic ( 4429): getexe
I/glbasic ( 4429): cd
I/glbasic ( 4429): set cdir to: /data/data/com.yourcompany.tilescroller
I/glbasic ( 4429): exepath=curdir= /data/data/com.yourcompany.tilescroller
I/glbasic ( 4429): set cdir to: files
I/glbasic ( 4429): Init Finalized
I/glbasic ( 4429): Rbow::SetScreen( 480,320)

"Sugar makes the world go 'round. Caffeine makes it spin faster."

MrTAToad

  • Guest
Re: Default speed of android devices
« Reply #9 on: 2011-Oct-05 »
i wonder if C performed is knobbled by the operating system ?

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Default speed of android devices
« Reply #10 on: 2011-Oct-05 »
Anybody else with bad Android experiences ? Or is it my setup.
I just can't believe that 2 of 2 android devices fails :(
Perhaps it's not production-ready for android yet ?

Anybody with apps and positive response on android market ?
Perhaps links to andoid glb-apps that i can test on my devices ?
"Sugar makes the world go 'round. Caffeine makes it spin faster."

MrTAToad

  • Guest
Re: Default speed of android devices
« Reply #11 on: 2011-Oct-05 »
Here are mine :

https://market.android.com/publish/Home#AppEditorPlace:p=com.unmap.spotstheboardgamedemo

https://market.android.com/publish/Home#AppEditorPlace:p=com.unmap.usefulcodeviewer

https://market.android.com/publish/Home#AppEditorPlace:p=com.unmap.vectoreditor

My phone is a "generic" Android machine and is very slow for everything.  So far, I haven't got what could be regarded as a proper device yet.

I've had one response out of a total of 445 downloads...  And also have had 0 error reports...

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3925
    • View Profile
    • Space Fractal
Re: Default speed of android devices
« Reply #12 on: 2011-Oct-05 »
SHOWSCREEN is sometimes strange on Android ans seen its doing a lots of things as well, which is why I have set my app to run with 25fps (not 30fps, but its not a problem with that kind of game I doing here), but I do also have many tiles drawed and still works nice on a Sony Xperia Phone (which I have dedicated to been the default test phone with full graphics details).

You can try to set some MS timers before and check again after SHOWSCREEN as well general loop, so you can checkout howlong time in MS its take to perform the task. Its better doing that way than a regular FPS check and is much more precision.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Default speed of android devices
« Reply #13 on: 2011-Oct-06 »
Some GOOD NEWS :)

I have almost no penalty drawing sprites.

fps goes from 46.5 to 44 when drawing 3 sprites the size of 480 x 320 (each).

It seems like you have right about showscreen doing a lot of stuff on android.

What fps do you guys set as limit on handhelds ?
Is the iPhone faster ?
"Sugar makes the world go 'round. Caffeine makes it spin faster."

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3925
    • View Profile
    • Space Fractal
Re: Default speed of android devices
« Reply #14 on: 2011-Oct-06 »
Newer android is faster in some cases.

In my project I use 25fps for both iOS and Android (except iPad 2 and iPhone 4s get 50fps). on desktop its 50fps (i usu pal speed this time).

I not set to 60fps due timing issues and animations is set useable for 25...

Os. I have around 500 tiles drawn on screen with layers (but its possible disable some details on android, which is a good practice).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.