User Tag List

Results 1 to 9 of 9

Thread: Performance improvement by scaling smaller objects?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question Performance improvement by scaling smaller objects?

    Currently in the game I'm making, everything is pretty much twice the size than what it needs to be. My characters size for example is 32x32 and sometimes 32x64 (It's an active with LOTS of different animation). This is four times the amount of pixels that is needed as I could resize the character to a size of 16x16 / 16x32.

    Performance wise, would it be better to rezise the object to 16x16 and then use the "set scale to 2 (quality = 0)"? Is the "set scale"-function CPU demanding?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    With sprites that size you won't get any RAM issues, so from that point of view, resizing them in the editor is not needed. Scaling is indeed a CPU intensive operation, so don't do it on loop. But for changing sprite size, it only has to be done once, which causes no issues. If you really need to resize sprites, which is really not ideal when doing pixel art, it is a better trade to leave your image rather larger and resize it down on runtime than the other way round. Scaling pixel art up sprite-based should never be done. Of course, you can scale up the whole canvas, but that should ideally be done integer only then. Having a larger image that is sized down on runtime will also give you better results if you need to rotate, as Fusion has just more pixel information to work with to generate the rotated image.

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the answer!

    I was messing around with the "replace color" function when I thought of this. I noticed that it was extremely demanding when doing lots of color replacements so that's when I thought it might have been a good idea to downsize the animation before the color replacements, so the color replacements wouldn't have to replace as many pixels.

    Why should upscaling never be done? I initially thought it was just as demanding as downscaling.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    It just looks bad if some objects are upscaled and others are not, every pixel in a pixel art game should be the same size. Performance wise, it makes no difference, and, of course, you save a little RAM when scaling small stuff up.

    Color replacing is always damn demanding, it does not depend on the number of pixels, I think, but on the number of used colors and individual frames. If you only do it once on frame load, you're fine tho.
    For FX and stuff like that I rather recommend using a color replacement shader. Also, color replacing will probably not be supported by Fusion 3, so keep that in mind if you're planning a long-term thing

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Okay, then I should probably downsize my character sprites and scale them to 2 once to save RAM?
    I was looking around for some color replacement shade but haven't found anything yet, can you recommend one?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    I would go with what fits your visuals best, with sprites that tiny you’ll never get any RAM issues. I only know the color replacer by Looki https://community.clickteam.com/threads/66199-Color-Replacer

  7. #7
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks again! I'll check it out!

  8. #8
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Yes! Certainly scaling is the way forward, granted you don't overdo it and quash your graphics.

    Here is an article about this and much more with the Fusion runtime... https://clickfusion.academy/clicktea...ry-management/

    Also for reference, scaling up an image is much better overall as you do use less RAM and utilise the processing better. It's not good to assume you won't run into any RAM issues, as you don't know how big the final game will be. If you end up using 200 of these sprites, you will start running into issues. It's all about optimisation and whether you need it at the small or large end of the spectrum, it's always good to continually work with the runtime rather than against it.

    Most PC's these days are equipped with at least 2GB RAM which is sufficient, I'd even go as far as to most PC's being equipped with 8-16GB RAM, overkill for any Fusion 2.5 project, however if the day comes where you want to export to mobile, you are porting your game into a whole new realm which you will regret not following optimisation from the start, which is why I highly recommend you always optimise your code and assets where possible...
    Want to learn Clickteam Fusion 2.5?




  9. #9
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thank you Danny!

    Scaling it is then, great article!

Similar Threads

  1. Performance question: Scaling/Stretch to Fill
    By Wodjanoi in forum Android Export Module 2.5
    Replies: 0
    Last Post: 11th February 2016, 11:06 AM
  2. World Scale Engine - Performance improvement needed
    By Fanotherpg in forum Guides, Tutorials, Examples, Widgets
    Replies: 2
    Last Post: 25th March 2014, 11:45 AM
  3. Performance improvement
    By Yos in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 29th May 2013, 04:44 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
  •