0 Favourites

Sprite sheets

  • Is there any support to bring in an entire sprite sheet as opposed to individual images? The videos I have seen seem like it is always the latter. I want to do something like this (from Impact.js):

    // Create an AnimationSheet with the blob.png file.
    // Each frame is 16x16 px 
    var animSheet = new ig.AnimationSheet( 'blob.png', 16, 16 );
    
    // Create an animation using the AnimationSheet.
    // Display each frame for 0.2 Seconds. The Sequence 
    // is [2,3,4] and the Animation stops at the last 
    // frame (last parameter is true)
    var jumpAnim = new ig.Animation( animSheet, 0.2, [2,3,4], true );
    [/code:1vwetyxi]
  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You can already sprite sheets ; C2 tries to guess the sizes/rows/columns, but you can force the slicing to make it match your sheet

  • Thx for the response, that is good to hear, I was poking around the docs but it did not jump out at me - can you point me to how you do it? It is just through the add sprite utility but you add the entire sheet? How do you see where C2 guesses at the slices?

  • add sprite > sprite editor > animation window > right click > import frames > from sprite strip

    I believe that's what you're after

  • Nope. Technically you can do this with 3rd party plugins that weren't meant for it but..eh.

    I think C3 is switching to spritesheets over individual frames. More versatile and efficient.

  • I fail to understand the difference ?

    Import a sprite sheet, slice as needed to separate all the frames, move/remove frames or adjust speed if required, and we have an animation good to go -

    what am I missing that doesn't satisfy the initial request, i.e. importing a sheet to build animations

  • Refeuh Check out pyxel edit or SuperPowers game engine. They animate by "focusing" cels on a spritesheet/grid instead of slicing a sheet into individual images. This is far more efficient and lets you swap the source sheet on the fly for multiple characters or whatever, among other things.

  • Spritesheets over individual frames. More versatile and efficient. That is true but I really do like individual frame approach cause it's far more easier to set image points.

    If you make you sprites correctly then you can import them all, set image point on first frame, hit "apply to all frames", crop frames and you are done. When you work with entire sprite sheet then it's not that easy and will require a bit more time to set it all up.

    But my biggest issue with C2 and individual frames are actually collision polygons. If you want small object with hugh collision area then you will need to make and export 512x512 image with just 32x32 sprite in it :/ Yeah making separate sprite just to do collision checks for each object in the game is kind of idiotic xD

    btw Tokinsom Do you know some more about SuperPowers game engine? Wondering how they games perform on different devices. They are using NW.js for desktop and Intel XDK for mobiles as well

  • Shoebox is an app to make spritesheets easy, and split it in individual frames too. If you need to manipulate something before importing.

    I was wondering along the C2 history if it anyday become compatible with Shoebox, but C2 seems to be more in the patterned side, while Shoebox is more versatile occupying blank areas and shuffling the pattern.

  • This is all very helpful. I am not as well versed in C2 as all of you so maybe that is why I can't get this to work:

    add sprite > sprite editor > animation window > right click > import frames > from sprite strip

    I only see the animation window when the sprite editor is open. It starts with "default" and there is no place I can right click for the import. Is that only a paid feature?

  • Right click on the "Animation Frames" window not "Animation"

  • Tokinsom : oh, I see what you mean ! Thanks for clarifying Keep the sheet itself as a resource, instead of processing it and slicing it into frames directly on import. Indeed that makes resource management, especially animation updates, easier.

    Though I think OP is mostly after building an animation from a spritesheet, regardless of the slicing, instead of manually importing one frame at a time, which is clunky and time consuming. Something C2 is capable of.

    As for efficiency and performance, frames are packed into texture atlases when exporting anyway, so delaying the processing or not should be negligible.

  • ""As for efficiency and performance, frames are packed into texture atlases when exporting anyway, so delaying the processing or not should be negligible.""

    True but now C2 is importing a sheet, slicing, and then putting it all back into a sheet on export, so why bother XD; All this really does is give you extra space for image points and let you crop...meanwhile drastically increasing preview times and bloating your project with thousands of images & folders.

  • Tokinsom yeah, I agree the whole thing could be a bit more streamlined ! And I do like the idea of keeping sprite sheets internally to make resource management easier. Plus it shouldn't prevent the user from editing individual animations, re-ordering frames, adding image points, etc. all these would just need to be kept as metadata in parallel of the sheets. Maybe for C3

    Though I do see a point in re-slicing/re-packing the sprites ; automatic processing of large amount of resources can usually lead to better results than manual management. For example maybe several sprite sheets can be recombined into a single texture atlas, maybe some animation frames are unused and can be dropped from the export while keeping them at edit time, etc.

  • i did often read about slow preview times with many sprites but thought it cant be so worse..

    now i got to a point where its just ridiculous, in a project with 600 24*24 Sprites (one sprite object, so would be one spritesheet) and 200 16*16 (another spritesheet, so we would have two now), a total size of 50kB, its faster to export the game, find a failure, fix the the failure, export again and run the game compared to just previewing it, the preview is at that time at ~50% loading.

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