Any point to using fixed sized sprites?

0 favourites
  • 4 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Back in the day, I would always make sure that a set of sprites in an animation had the same fixed dimensions. So if I had a run animation (for example) consisting of four sprites, I would set each sprite's canvas size to be equal to the size of the sprite in the animation with the largest size, which usually resulted in some transparent margins.

    Mostly I did this to make sure that when I was rendering the animation to screen, it ensured that the animation was fixed in place since the origin was usually top-left. It also made it easier to draw sprites via a source rectangle since I usually drew the sprites from a single sprite sheet at run-time.

    With Construct's ability to import a set of images and crop the transparencies, is there any point to using identically fixed-dimensions for each sprite in an animation? It feels like since I can set the origin point to the same absolute location across a set of frames that I don't have to worry if each frame in a given animation has varying sizes. Additionally, like most people using Construct, I use a separate platform sprite for purposes of collision detection.

    What does everyone else think?

  • I almost always use fixed size sprites because they're easier to manage, especially when it comes to hotspots & image points. They're also great for when you have multiple layers to your sprite (i.e. armor in Megaman X). Aside from that, unless I'm using a separate 'base' object for collisions, I'll use them for consistent collision polys.

    Only when I'm 100% confident the object is finished and I won't have to change anything will I crop the sprites...but in many cases it hardly makes a difference anyway.

  • Tokinsom

    Thanks for the reply! Hmmm, I didn't really think about the implications of hotspots. Do you import a single sprite sheet png file into a Construct sprite object and let Construct cut it up by fixed dimensions? Or do you import each frame from a separate file?

    For a while I also tried to use my animation sprite as my collision sprite as well, but if you attempt to apply bounding box to an entire animation where the frames are slightly differently sized (even by a few pixels), the box gets messed up by fractional values. That's why I switched my collision poly over to my invisible base "object controller" with platform behavior.

    Just so I understand you correctly, after the import and as a result of using fixed size sprites for an entire animation, you'll have some transparent borders that might extend a few pixels? Do you usually make the origin point the bottom of the sprite or does it depend?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Correct. There is usually some transparent space left over but to me its not a big deal...I dont develop for mobile and primarily make retro games so I'm not worried about a little extra vram.

    I put the hotspot at the bottom middle for everything except menus and backgrounds and stuff..those go at the top left.

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