How far can I go with html5 and C2, performance-wise

  • this is my 640, 360 layout size

    imgur.com/a/AO8ow

    and this is relatively the size of a level i want to have, i'll have a bout 4-5 levels like this thats all

    imgur.com/a/SXPWm

    filled with sewers below and apartments above ground, so fairly full visually - apartments have individual platforms, sewer too, 2-3 parallax layers on background, about like 40 npcs

    the game's gonna be for desktop, can i make this in C2 without final product being low fps and such? i wonder

    would also love tips, tricks and tweaks to not have such a thing, im very noobish so

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BiffanyPFH

    The number of levels doesn't matter with regards to performance, just the content of each level.

    I'm getting 60fps in the desktop game I'm working on, and that has:

    • 16384 x 4096 levels, with Characters around 48 x 64 to give you an idea of the level size
    • 6 layers: 3 background/parallax, playable layer, HUD layer and Menu layer
    • 30-80 NPCs with Platform Behaviour (for movement)
    • 40-80 other objects (e.g. boxes, barrels) with Platform Behaviour (for gravity, when terrain destroyed below)
    • 3000-4000 destructable sprites (a Tilemap might have been better if performance was bad)

    A few tips that helped me get good performance:

    • Use Triggered events (ones with green arrow) instead of regular events where possible
    • Similarly, use Timer behaviour or Functions to call certain actions at certain times rather than constantly checking for the right conditions
    • Use Groups, so you can disable/enable a whole bunch of events as needed
    • Use Spritefonts instead of Text if you need to update something frequently, as updating Text every tick will impact performance
    • Destroy objects outside the layout (i.e. in the margins), a platform object falling into eternity will drop your performance
    • Disable collisions when not needed e.g. only the surface of my destructable terrain has collision turned on to start, I turn it on for each terrain piece when it's exposed or made accessible
    • Disable platform behaviour when not needed e.g. I only turn platform behaviour on for my enemy units when they are on screen
  • BiffanyPFH

    a platform object falling into eternity

    lmao

    thanks for the thorough answer, very valuable to me

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