Pre-load Character Animation (Android)

  • #1, by darren-beckettMonday, 27. July 2015, 10:23 5 years ago
    Pre-loading of character animations does not have any affect on Android.

    The first play of the animation is slow, it then plays at fullspeed until you play another animation, it then has to reload the first animation and is slow again on the first play.

    Great Poster

    351 Posts


  • #2, by SimonSMonday, 27. July 2015, 11:24 5 years ago
    All mobile devices don't allow preloading, because of the limited RAM. Consider using webp and such. What device are you using ?

    Thread Captain

    1380 Posts

  • #3, by darren-beckettMonday, 27. July 2015, 12:57 5 years ago
    All images get converted to WebP during the build/export process.
    I've tested it on the HTC One.
    I also tried to increase the sprite cache size from 40mb to 100mb, but this didn't seem to help.

    Great Poster

    351 Posts

  • #4, by sebastianMonday, 27. July 2015, 13:57 5 years ago
    what are the sizes of the graphics you want to animate?

    Thread Captain

    2337 Posts

  • #5, by afrlmeMonday, 27. July 2015, 14:12 5 years ago
    We recommend implementing webP graphics manually, as opposed to using the convert option in the build game system.

    Other things to take note of when exporting for mobile platforms:
    * what is the game default resolution? We recommend using a smaller resolution like 1024x768 - the higher the resolution the slower it will run.

    * frame limiting (try not to use too many animation frames for mobile platforms)

    * animation / fx removal (remove unnecessary animations & openGL shader effects for mobile versions, as they will further slow down your game).

    etc. etc.

    Mobile platforms don't have as much power as computers, so if you've designed the game initially for windows or mac, then it's possible that it might not run so well on mobile platforms, due to various factors. It's all about optimization.

    P.S: it's actually possible to check which platform the game is running on via the VS Lua player function getProperty(), check it out on the wiki.

    Imperator

    6846 Posts

  • #6, by darren-beckettMonday, 27. July 2015, 14:17 5 years ago
    I've just tried increasing the sprite cache to 300mb and that is enough to retain the sprite animations in memory.
    Note: I don't know what side affects this might have on mobile devices

    But without being able to pre-load the animations at the beginning of the scene, the first play of each animation is too slow.

    This scene requires 3 character animations, each animation is:
    33 WebP frames 800x600 (27k each) = 892k total

    Great Poster

    351 Posts

  • #7, by darren-beckettMonday, 27. July 2015, 14:23 5 years ago
    My original game is targeted at 1366x768 (Windows) and i'm exporting this to Android and using the 'Compress Graphics' option.
    Most mobiles have Full-HD screens, the HTC One runs the game perfectly (Once the animations have loaded).
    I just need the ability to pre-load the required animations at the beginning of the scene.

    Great Poster

    351 Posts

  • #8, by SimonSMonday, 27. July 2015, 14:23 5 years ago
    That's waaay too big. You need to calculate the real dimensions. So have 800x600x4bytes (RGBA) x 32 = 61MB.

    Thread Captain

    1380 Posts

  • #9, by darren-beckettMonday, 27. July 2015, 14:32 5 years ago
    It does run perfectly once loaded

    Great Poster

    351 Posts

  • #10, by afrlmeMonday, 27. July 2015, 15:33 5 years ago
    The point was that mobile screens & tablet screens are pretty small, so it's irrelevant whether or not they have HD capabilities as smaller resolutions will still look pretty clear instead of wasting vram, cpu whatever with larger resolutions.

    For mobile platforms it's all about sacrificing stuff that isn't super important or relevant to the game.

    SimonS (above) posted a link to this article in which one of the Daedalic dev team explain the difficulties in porting your game over to mobile platforms. It's illogical to expect a pc / mac game to run on a mobile platform without having to make changes. Ideally for me the best (but most time consuming) method would be to have a separate project file in which you recreate everything from scratch using smaller resolution, less animation frames, webp images for scene backgrounds, static object sprites, animations (character, cursor, environment) & so on. You could actually just copy the original master ved & replace all the graphics & adjust the way system & interaction polygons to save time.

    Imperator

    6846 Posts

  • #11, by darren-beckettMonday, 27. July 2015, 15:37 5 years ago
    Thanks, i'll check out the article.

    Would the 'Scale Resolution' option help?

    Great Poster

    351 Posts

Write post