will too many families decrease performance on mobile?

0 favourites
  • 9 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hi, there

    I found Family is very power, but I am wondering if I use too many families, it will decrease performance very much, or just a little?

    please help, thanks

  • In my experience, no. It's how you use them that matters.

    Always test on your target device as you develop the game, from the start. Don't wait til much later and find out its too slow.

  • Families have no effect on performance by themselves, only the things you do with them matter. But the fact you ask means you should probably read Optimisation: don't waste your time

  • Ashley

    is the same true for functions, groups and global variables? Does their mere existance affect performance on some degree, ore just their use?

  • Ashley thanks, and Ashley thanks for the article, learned a lot

  • Danwood - functions are just a definition of some work - the only thing they affect is memory usage by the size of them (example 1 function ~ 100bytes or more - depending on how big it is) - once they get used it could affect performance, but if you never use that function it only uses your memory waiting to be called. also depending on what is in that function you can have normal or horrible performance. functions should be used to do EXACTLY 1 job!

    example - "EnemyHealthCalculation" - enemy.hp = enemy.hp - someothervar.damage   
                                       - set enemy hpbar to some width 
                    - if hp <0  enemy destroy[/code:v9p1yxs3]
    and so on...
    global variables are just a memory place that is used across the application - (therefore word "global") you can access it from any sheet. they just use memory and do nothing. 
    and groups... groups are run all the time, and events in them are run each tick / unless the group is disabled, or if that group contains functions. 
    functions are run "on function 'nameoffunction' ", non depending if they are in group or not. but group is just used to make your code cleaner - you put similar stuff in one group and close it when you don't use it
  • is the same true for functions, groups and global variables? Does their mere existance affect performance on some degree, ore just their use?

    The entire engine is built with the philosophy that nothing has a performance impact unless you actually use it. Otherwise it would be nearly impossible to build large-scale games with decent performance.

  • saiyadjin


    Thanks guys, that's clear now. My team's working on a very large project with a massive event sheet, hundreds functions, families, variables etc. The main issue is the rendering, as Ash pointed out on the blog post, i was just curious if the mere scope of the game could also affect the performance, and that clears my doubts!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • why not split your stuff into more event sheets? having only one makes it hard to... organize

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)