Does Chrome NWjs support non-power-of-two sizes?

0 favourites
  • 7 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • referring to this blog post

    https://www.scirra.com/blog/112/remembe ... ory?page=7

    I realize Ashley was referring to mobile systems but does this at all apply to desktop Chrome (NWjs)?

    "Many mobile systems don't support images which are not a power-of-two size (e.g. 32x32, 64x64, 128x128...). To work around this images will be placed in memory on a power-of-two size texture big enough to fit it. In this case the 1920x1080 image will be placed on a 2048x2048 sized texture in memory!"

    Do I need to be cautious of power of two sizes? or rather does it waste memory having a non-power-of-two size?

  • Try Construct 3

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

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

    In fact you would have to scale sprites down a pixel in order to get any benefit as exports add padding to the spritesheet.

  • newt so I would get a benefit from downscaling? I don't understand what you mean.

    I was thinking for desktops C2 would NOT place images in memory on a power-of-two size texture big enough to fit it.

  • If you import sprites that are power of two, they will not end up being power of two on the sprite sheet as the exporter adds a 1 pixel border to avoid tiling issues.

    Im saying that type of management is arbitrary.

    Pick a scale, go with it.

    Power of two won't be an issue on modern machines, circa 2007 and current.

    The only issue is max texture size, which is usually above 2k.

  • The only issue is max texture size, which is usually above 2k.

    okay makes sense..

    so if my sprite is 65x65 and has 30 frames I'm not wasting any memory. excellent.

  • Well 30 frames might push things a bit.

    That is to say if you have a bunch at the same time.

    That's why iso rts's are so hard. 16 frames for 8 directions gets out of hand quickly.

  • Well 30 frames might push things a bit.

    That is to say if you have a bunch at the same time.

    That's why iso rts's are so hard. 16 frames for 8 directions gets out of hand quickly.

    I'm not talking about performance, I'm just talking about wasting memory.

    Although now that you mention it I do have 400 sprites currently using 30 frames of looping animation. Hoping to decrease the number of frames, but it runs okay right now in tests. A steady 60 fps. If the number goes above 800 I start to have issues, so I make sure to cap it at 400.

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