Jump to content

Virtual Centering for Sprites? Animations look like crap


Garo
 Share

Recommended Posts

Hey, looking for a way to set the centers for each frame of my sprite atlas. The centers are currently automatically calculated based on the image size.

My images are cropped to have no transparency, which might make no difference, but my animations look awful since the sprites jitter so much between frames.

As my knowledge goes, this is handled on a framework basis. Is there a Phaser program to help me make/decide the real virtual centers/offsets for my sprites? And then how are they loaded into Phaser?

Link to comment
Share on other sites

The sprites all are cropped to maximum with no extra transparency on any side. Then they are packed with TexturePacker for an atlas, but TexturePacker isn't the problem. It's because one frame of a run sprite will be 15px wider because of say hair flowing, and cause a 7.5px push forward for that frame.

It seems like I have to set the body sizes or offsets for each frame due to the images being different sizes. Is the only solution to add transparency to frames to ensure they're of equal size?

Link to comment
Share on other sites

Yeah that's definitely the lamest option that would cost the most time... From what I hear from the Phaser discord and other game devs is that this is usually handled by the framework or an animation editor provided by the framework.

Is there any such editor or program you know of that I can use to pad and center these sprites to match their intended animations? Having to do it in MS Paint or Photoshop would suck

Link to comment
Share on other sites

That's how they're supposed to have been animated in the first place. You don't create an animation by making loads of tiny little frames and hoping for the best. If you animate something in Aseprite or Flash and export the frames they'll all be the same size, correctly aligned, and then the atlas software will take care of the offsets and trimming.

The only time this doesn't work is if you're just using some sprite sheets found on a web site, like those you usually see ripped from old arcade/console games where they just dump all the frames in a row and don't care about actually playing it back.

What package did you use to make the animations in the first place?

Link to comment
Share on other sites

Ha, yeah, that's actually exactly what I did. I used a janky electron app to rip the sprites out of sheets from the web. Each frame is just an imagine file named like walk0, walk1, walk2, etc.

So can I recreate the animations with a tool like Aseprite? Do you know of a better program or solution for this?

Link to comment
Share on other sites

Yeah thanks a lot dude, I looked up Aseprite based on your first mention and found it to be super useful for this. It takes TIME to get everything aligned, and was a pain to compile, but definitely works.

And I don't know how to make GIFs, so Aseprite it is

Link to comment
Share on other sites

Fair enough, I just meant it's the same process (when creating a gif from frames) of having to meticulously place every frame by hand, and keep testing to make sure the animation plays back smoothly. It's a pain in the arse :) but there's really not any other option if the source frames aren't set-up correctly in the first place.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...