Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Slowness on Windows phone (looks big texture related) — Gideros Forum

Slowness on Windows phone (looks big texture related)

kussakovkussakov Member
edited September 2015 in General questions
Hi Guys,

We are very actively trying to port our Gideros apps for windows phone (as I said in other posts)

So we compiled them and ran then on the windows phone.
I have the latest "Blu" (Snapdragon 200 - Quad core - 1.2 GHz - A7) as a test device. Has the same resolution as iPhone 6.

All our apps are slow.
One is very slow and almost unplayable (even the main menu - not too many sprites, no physics)
(Compiled app or Gideros Windows phone player - no difference - same slowness)

Before you say "garbage collect, memory, variables, etc." - it is 100% NOT that :-)


Looks like having big textures (like background layers) kills the thing.

Also having more than 50-60 sprites also slows down the game.

Two of the apps have 3 BG layers - big textures. One has two BG layers.
If I remove them - the app plays normally on windows phone(if there are not too many sprites).

I haven't noticed such slowness on iOS and Android devices unless they are very old.

At first I thought that the latest "Blu" is just slow (since it is cheap), but I downloaded several games with many sprites and backgrounds and they do not appear slow.

Any tips?

P.S.
For reference (in case you are interested) the apps are:
* "Pin Peg" - 3 BG layers/parts
* "Phyzzlets" - 3 BG layers (main menu has 2 layers and big buttons)
* "Air Ping Pong" - 2 layers (BG and pipes/table) (Called "Air ping pong Saga" on the Apple Store)
All apps are available on both Apple Store and Google play

Comments

  • SinisterSoftSinisterSoft Maintainer
    edited September 2015
    If you can make a demo with the images so John, Arturs or Nico can see the problem with source code/data then that would make it easier to spot the problem.

    It doesn't have to use your game gfx, any gfx will do as long as the problem can be demonstrated.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • OK. I will try.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • kussakovkussakov Member
    edited September 2015
    Here is an example.
    Not very elegant since I put it together for 5 min using Gideros Jumping balls example.

    Play at the same time to a windows phone and another player (say Windows desktop or iPhone 6) - you will see the slowness immediately by monitoring/comparing the speed of the wheel and the balls.

    Note 1: The project has bigger and smaller textures (see beginning of main.lua to change). Since Blu is not very high resolution our app chooses to use the smaller textures, but it is still slow.

    Note 2: tap to add more balls

    Hope that helps.

    Vlad
    zip
    zip
    SlownessDemo.zip
    455K
  • john26john26 Maintainer
    edited September 2015
    @kussakov: there is a workaround you can try, which sacrifices smoothness for speed. use application:setFps(-60) or -30 and see how that goes. It might at least make the game playable.
  • kussakovkussakov Member
    edited September 2015
    I am using 2015.08.
    I tried with -60. The apps become jumpy and you miss some of the action...

    Is there a recommended maximum texture size that can be processed relatively smoothly on slower devices?
    Making the textures smaller will reduce the quality of the graphics and will only partially solve the slowness caused by too many sprites, but at least will make the game more playable.

    Also is there a way to print the real FPS on the phone player?

    P.S.
    Just wanted to say: Thank you guys for taking the time to help us with all our problems! I know that the money we collected at the Kickstarter does not cover that. Thanks a lot! You are the best! ^:)^
  • Are the texture sizes a power of 2, if not then could you try that. Also try with power of 2 square textures (both l and h the same).

    If this speeds things up for yo then please let us know.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • kussakovkussakov Member
    edited September 2015
    They are not.
    I will try that, but what do you mean the size is power of 2 if the texture is not square? Width is power of 2 and height is a power of 2(like 1024x512, 64x256, etc.)?
    In that case I will need even bigger images to support high res devices...

    By the way: I tried with filtered and unfiltered textures - no much difference.

    Should I try tile map for background image instead of just a big texture bitmap. Do you think this would help?
  • kussakovkussakov Member
    edited September 2015
    OK. I tried with "power of 2 textures".

    Attached is a new example.

    Results(using power of 2 textures):

    - Indeed it seems to improve speed if the textures are smaller or equal to 1024x1024.(main.lua in the example is with the smaller textures)
    However if I add just 20 ball sprites(tap 3 times) - it slows down on windows phone (no physics).

    - If the larger textures (2048x2048 & 1024x2048) are used (commented in main.lua) it is still slow.

    Edit:
    I wanted to run Windows Phone Application Analysis and post the CPU,FPS,etc, results here. But "Start Windows Phone Application Analysis" is disabled/grayed out. Is it enabled for you? I can only run the simple diagnostic tool that shows CPU that the app is using. Looks like it maxes out one of the CPU cores and does not really use the other 3...
    zip
    zip
    SlownessDemo1.zip
    614K
  • Currently I think it only used a single thread on Windows Phone.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    Well Gideros is indeed single threaded on all platforms, thats not something specific to WP...
  • kussakovkussakov Member
    edited September 2015
    In case someone is interested. This is what I see as where CPU usage goes on my Windows Phone with the sample application.
    See attached image...

    And one more thing: One of the apps does not have very large background layers, but gets slow with more than 50 sprites.
    cpu_usage.JPG
    1155 x 1057 - 259K
  • hgy29hgy29 Maintainer
    By the look of your CPU usage, it looks like the issue is your GPU. Most of the app run time is spent in 'external code' (>60%), i.e. OS code, and from where the code is called I can say it is DirectX code.
    The time spent may not be actual processing time, in fact it is most probably wait time: Gideros waits for the GPU to be ready most of the time.

    It would have been instructive to get GPU profiling, but VS diagnosis tools are not really good. Lets hope they will improve. Maybe we could find some sort of GPU benchmarking app to get some figures about performances ?
  • Visual studio comes with "Windows Phone Application Analysis" tool, that does comprehensive analysis.
    But as I said above, for me this tool is grayed out/disabled. I have no idea why that is. Is it enabled for you?

    About the CPU:
    I understand that Snapdragon 200 is a crappy processor, but many other games I downloaded do not show any slowness while processing hundreds of sprites, animations, effects, etc. That is the reason I started this thread in the first place. If all other apps were slow I wouldn't care.
Sign In or Register to comment.