How to make a spritesheet?

Place to get help with not working mods / modding interface.
Post Reply
iUltimateLP
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Sun May 24, 2015 4:41 pm
Contact:

How to make a spritesheet?

Post by iUltimateLP »

Hello guys, I created with Piskel those 33 frames (https://drive.google.com/file/d/0B_kkwi ... sp=sharing), but when I try to put them in a sprite sheet, it always fails in visual in the game. The animation is not on one place its like the machine hovers above the ground and you see transitions. Can anybody explain how to make a correct spritesheet out of those frame images and whats the right config for?
Thanks!

Lollipop
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 24, 2015 8:57 am
Contact:

Re: How to make a spritesheet?

Post by Lollipop »

I haven't used piskel myself yet, but I have been able to gather some information from the files from the assembling machine 1.

First, the code part:
you can find the file here in this path:
data\base\prototypes\entity\demo-entities.lua

If you use N++, then you can use ctrl+f to search to the assembling machine.

In case you can't find it, here is the important part:
Important code
This part shows the size of the graphic is 99x102. This should be the size of your graphic.
frame_count is the number of frames the animation consist of, in your case 33 frames, judging from the number of pictures you use.
I have no idea what the line_length or shift does, I would recommend that you experiment with it, or use the number from the assembling machine, as it looks like you use the same frame size.

Regarding the sprite sheet part, I would recommend mimicing the assembling machine, perfect grid with one pixel in between. I have no idea how to make piskel do it for you, but you can do it with a normal image program with transparency.
Paint wont work as it makes transparent backgrounds black because it doesn't support the alpha channel. If you try then you get a black box around your sprites.

I hope this helped you out :)

iUltimateLP
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Sun May 24, 2015 4:41 pm
Contact:

Re: How to make a spritesheet?

Post by iUltimateLP »

Lollipop wrote:I haven't used piskel myself yet, but I have been able to gather some information from the files from the assembling machine 1.

First, the code part:
you can find the file here in this path:
data\base\prototypes\entity\demo-entities.lua

If you use N++, then you can use ctrl+f to search to the assembling machine.

In case you can't find it, here is the important part:
Important code
This part shows the size of the graphic is 99x102. This should be the size of your graphic.
frame_count is the number of frames the animation consist of, in your case 33 frames, judging from the number of pictures you use.
I have no idea what the line_length or shift does, I would recommend that you experiment with it, or use the number from the assembling machine, as it looks like you use the same frame size.

Regarding the sprite sheet part, I would recommend mimicing the assembling machine, perfect grid with one pixel in between. I have no idea how to make piskel do it for you, but you can do it with a normal image program with transparency.
Paint wont work as it makes transparent backgrounds black because it doesn't support the alpha channel. If you try then you get a black box around your sprites.

I hope this helped you out :)
Hey! I already fixed it, I reduced the frame amount to 16 and then had the spritesheet exported from piskel which is 2048x128 px wide (16 frames * 128 px per frame), and that worked out, but thanks I will come back to your help for the future!

Post Reply

Return to “Modding help”