User Tag List

Results 1 to 6 of 6

Thread: does using sprite sheet improve performance in fusion 2.5?

  1. #1
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question does using sprite sheet improve performance in fusion 2.5?

    Hello everyone!

    I heard that using sprite sheets can greatly improve game performance. Is it true for ct fusion 2.5? I'm asking because for me it's easier to make and import separate frames,rather then to deal with sprite sheets. However if it does improve frame stability and such, than I'm eager to adjust to new ways.
    In case it's important to know, I'm planing to develop commercial adventure game in 1920*1080 with many art objects and animations.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think sprite sheets will speed anything up in terms of performance. All of your graphics and animations need to be chopped up via the sprite editor anyway. If anything Sprite Sheets speed up the importing of animations, but you can do just as well with image sequences in my experience. In any case, each Fusion runtime has its own image handling routines that don't care if the source was from a sheet or single image. In fact, if you look at the png files created by the HTML5 runtime, Fusion creates its own optimized sprite sheet with all your images in it.

    I guess my point is that the whole idea behind using Fusion is to let it handle the dirty work of things like animation optimization and sprite sheets while you focus on the game logic and layout. Obviously you need to exercise some discretion in the size of your images as it relates to performance, but whatever you give Fusion it'll do the best it can with it, regardless of whether it was a sprite sheet or a series of png files.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is an post from the Fusion 3 Development Blog about Sprite Sheets and how they're currently used and their future in Fusion 3. It seems to echo that all the sprite sheet handling is done "under the hood" and isn't anything you need to worry about as a Fusion user.

  4. #4
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, that's great to hear! Another reason to use Fusion. Thank you for info Christian_Wheel !!

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    Melbourne
    Posts
    1,706
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Christian_Wheel View Post
    In fact, if you look at the png files created by the HTML5 runtime, Fusion creates its own optimized sprite sheet with all your images in it.
    Does it combine images from different Active Objects into the same PNG? Or does it just combine multiple frames/directions/animation sequences from within the same Active Object?

    I find that blog post very interesting, but still somewhat unclear. I get the impression that while using Sprite Sheets might not make a difference, consolidating multiple Active Objects into one Active Object might. So, to look at the example given in the blog post:

    There are cases though where sprite sheets give no real benefit and that is unfortunately when you have a very diverse set of different objects you want to draw and you use the typical sprite sheet approach mentioned first in this blog post.
    From the graphics API’s perspective it will typically only have to draw a very few number of sprites from each sprite-sheet for every texture switch it does. This is because the “logical” organization of your sprites doesn’t correspond very well to the order of how your sprites are drawn.
    If your game for example draws these sprites in order:

    * Hero
    * Sword
    * Enemy
    * Grass tile
    * Earth tile

    Then it would switch to a new texture almost every draw call:

    * hero.png
    * weapons.png
    * enemy.png
    * ground.png
    * ground.png
    This to me suggests that I shouldn't have separate Active Objects for ground textures and earth textures. Instead, I should try and combine those images (and anything else that is a stationary item that follows the frame) into a single Active Object. I would imagine that lumping them into the same Active Object (different frames, different directions, or different animation sequences) would encourage Fusion to lump them together when it makes its own sprite sheets under the hood. And since those things (stationary items that follow the frame) are probably likely to be drawn at the same time, that would likely result in less texture-swapping at runtime.

    It sounds like this sort of thing won't be necessary for Fusion 3, since it will be smart enough to figure out what's been drawn and when, and consolidate them into sprite sheets using a clever algorithm. But in the case of Fusion 2.5, we probably need to give it some helpful nudges (eg. bundle things we think might be drawn together in the same Active Object, to encourage Fusion to bundle them at runtime). However, it's hard to know exactly what would be the best practice, without knowing exactly how Fusion 2.5 works (I'd be keen to hear about what those HTML-runtime PNGs look like!)

    Any thoughts on this?

    I'm particularly interested in this because, at the moment, my game's graphics are highly split up among many actives. For example, as you can see below, a simple square platform is actually comprised of 14 individual Active Objects. If I have a screen full of these platforms, that could possibly involve hundreds of texture switches instead of just one!

    Last edited by Volnaiskra; 18th May 2017 at 03:53 AM.

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The HTML5 runtime exports one giant png spritesheet with all your actives in it, at least in the small HTML5 projects I've created. Quite possible that it makes more spritesheets if you have more than a certain number of sprites. The PNG specification uses a 31-bit unsigned integer with an extra zero bit to store its pixel dimensions, which makes the pixel width/height limit 2^31-1 pixels, and it's hard to imagine exceeding that in a fusion game with any kind of performance, but again, I don't know the inner workings.

    If you would like to put together a sample frame with some actives in it, I'd be happy to post the PNG(s) that the HTML5 runtime spits out.

Similar Threads

  1. Clickteam please improve PERFORMANCE of MMF2 games ASAP
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 138
    Last Post: 12th February 2017, 06:05 AM
  2. Replies: 9
    Last Post: 18th April 2015, 02:07 AM
  3. How can I improve screensaver performance on Win 7
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th November 2010, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •