How to easily make a Sprite Sheet?

Discussion and feedback on Construct 2

Post » Tue Sep 30, 2014 1:43 pm

Hi. I've created a bunch of individual PNG's that all animate nicely...but how does one actually go about actually easily creating a sprite sheet? (which I assume is the better way to go about bringing in 25 + images)

I have found a tutorial on here that describes using Photoshop and grid lines...however other game engines out there seem to use a program called 'Texture Packer'

Only trouble is it doesn't have an option for Construct 2 in the settings.

Does anyone have a recommended workflow for creating Sprite sheets...and what factors does one need to keep in mind in terms of not 'bogging' our games down?

Thanks for any advice!
B
3
Posts: 5
Reputation: 187

Post » Tue Sep 30, 2014 1:46 pm

No need to build sprite-sheets beforehand (in fact, you can't). Import your image frames into C2 and it'll generate optimized sprite sheets automatically when you export.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Tue Sep 30, 2014 1:55 pm

ErekT wrote:No need to build sprite-sheets beforehand (in fact, you can't).

You can import sprite sheets by right-clicking in the animation frames panel and selecting import frames -> from sprite strip.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Tue Sep 30, 2014 2:04 pm

Yeah sprite strips can be imported, but all the animation frames need to have the same width/height and to be evenly spaced. You can't import optimized sprite sheets at the moment, at least as far as I know.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Tue Sep 30, 2014 2:24 pm

Ooh, okay I see what you mean. Right on then.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Wed Oct 01, 2014 6:05 am

Thanks for the replies...much appreciated.
So really there is no advantage in using a Sprite sheet? I'd just been watching a number of tutorials and they'd been using Sprite Sheets so figured maybe this was a more efficient method or something.

Many of the sample files also seem to feature sprite sheets.

Anyway importing the individual png's worked perfectly...and is easier.

Is there any reason at all people would create Sprite Sheets?
B
3
Posts: 5
Reputation: 187

Post » Wed Oct 01, 2014 6:30 am

I use spritesheets all the time. It's much more convenient way of work for me than importing single pngs. I use GIMP and FUSE LAYERS plugin. The only thing I'm missing in Construct (my animations are heavy) is lack of "ghosting" between frames, so I could see the image point a frame after or before the current.
B
42
S
14
G
6
Posts: 154
Reputation: 5,581

Post » Wed Oct 01, 2014 6:47 am

I think there is a plugin for C2, that makes sprite sheets (with uneven width/height) possible...? Can't remember where I saw it though, and I have no need for it as of yet...

Sprite sheets are efficient in that they require far less file calls, than if they were loaded in separately.

Imagine that you have 100 sprites, which is quite a small number anything but the simplest casual games; now imagine 100 file calls to either buffered RAM, or even worse; the hard drive. If these 100 sprites were consolidated into ONE file (the sprite sheet), you'd gain a lot in performance from lesser file calls in and on itself.

But any file has a header; and that header takes up space. Imagine that the header for each file, is an average of 5 kilobytes. Now multiply it with 100, and that's the extra overhead you get from not using a sprite sheet.

And it gets worse: If you're making an online game, then your server delivers the content; which means your server will have to fetch the 100 files. As most servers features traditional hard drives (magnetic), the search time is very high (compared to SSD's) and your 100 files will have a noticably increased load time, compared to if they were 1 sprite sheet.


But here's the thing about Construct 2:

All sprite animations are automatically consolidated into a sprite sheet - no matter if you pulled them into Construct 2 as separate files or as a sprite strip. Go take a look at the exported files; you'll see what I mean. And that's pretty clever.

My first game in Construct 2, has 35 graphics files, but these contains several automated stripe sheets, and they actually consolidate a little more than 50 extra graphics files - so without this smart feature of C2, my game would have contained a little less than 100 sprites.
B
12
S
2
Posts: 80
Reputation: 816

Post » Wed Oct 01, 2014 11:48 am

Thanks very much for the information jakobdam and rozpustelnik.

My guess was that Sprite Sheets made things more efficient...but is great to hear Construct 2 is clever enough to do this.

I'm trialling using Crazy Talk Animator to make my own sprites...and so being able to import a folder of them with a simple 'Select All' makes the whole workflow incredibly simple.

I'd made other Sprites in Corel Draw...but was just struggling with how to easily get them all easily aligned into a Sprite Sheet...for some reason even after even distribution I was still getting alignment issues, think I'll just stick with the individual file exports for now.

Some other game engines like Unity do offer integration plug ins with 'Texture Packer'...but I'm not sure whether this would be useful for Construct or not.

Anyway thanks again for the replies!
B
3
Posts: 5
Reputation: 187

Post » Wed Oct 01, 2014 12:02 pm

Some other game engines like Unity do offer integration plug ins with 'Texture Packer'...but I'm not sure whether this would be useful for Construct or not.

I think it would. So much quicker to tweak entire sprite sheets if you need to than individual frames. Especially for pixel art, where things like color-swaps for different enemies are common.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest