Quick Technical Sprite question

0 favourites
  • 8 posts
From the Asset Store
A challenging game that needs quick responses!
  • I understand that Construct 2 will automatically attempt to consolidate all the Sprites to 512x512 Spritesheets.

    But say that you have a Sprite that is--for whatever reason--1 pixel wide by 1024 pixels tall. I assume that Construct 2 does not attempt to split this image up. If it did, it could theoretically be packaged into a 32x32 square, but I doubt that's what Construct 2 does.

    So, what does happen? Does it instead create a single 1024x1024 Spritesheet, attempting to put the other Sprites in it as well? Or gasp, does it create a 1024x1024 Spritesheet exclusively for that object?

    In this situation, it would make sense to break the Sprite into two Sprite objects, one lower one pinned to the top one, but that seems a bit excessive.

    Any ideas?

  • creating a 1x1024 sprite sounds highly inneficient. A simple 32x32 sprite with a gradient could achieve the same result,

    faster and cheaper on the CPU.

  • California

    Yes, the 32x32 sprite sounds like it'd be faster, but a single 32x32 Sprite can't do everything a 1x1024 Sprite can. For instance, if you wanted to have a gradient that vertically spans the entire color wheel with 1024 different hues.

  • I'm curious about this too.

  • Well, you could test it with an export and see what happens...

    Just did and it makes a 1x1024 file.

  • You'll get a 1x1024 file, which some GPUs (including most mobile ones) will place in memory on a 1024x1024 surface because they can only deal with square power-of-two sized images. For this reason, you should avoid this type of thing if possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • a gradient that vertically spans the entire color wheel with 1024 different hues.sounds like you are designing a very colorful game <img src="smileys/smiley36.gif" border="0" align="middle" />

    Honestly, I still don't know why would you want a 1024h sprite.

    BTW, try using 9-patch.

  • Thank you for the responses, that's nice to know.

    So you're saying that because of the graphics chip and VRAM on some devices, it might be faster to break the 1x1024 image down into a 32x32 image, where the gradient is arranged in a tabular way, i.e. to have the first 32 pixels from the top of the gradient as the first row, and so on; to then make the Sprite object, add the art as a spritestrip with 32 rows and columns;

    to then generate 1024 instances of this object, placing each next frame below the previous.

    Am I right?

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