Sign in to follow this  
adamyall

Sprite Sheet Animation Questions (Frame Size, Pingpong Animation)

Recommended Posts

I'm new to using Phaser, and I'm really excited to dig deeper into it. I followed the simple platformer tutorial and looked through the examples.
 

I then began work on adding new sprites and spritesheets to the game, and I'm running into issues.

 

1. I'm using Shoebox to generate spritesheets exactly like the one found in the multiple anims/seacreatures example. In Shoebox, I use the pivot point tool to set the centroid of each sprite.

http://renderhjs.net/shoebox/spritePivots.htm

This adds padding to the input png sprites, but when I generate the spritesheet, the padding is cropped, and instead there are the frameX, frameY, frameWidth, and frameHeight parameters in the spritesheet's XML.

Ideally, I would just be able to set my anchor to (.5,.5) and the sprite would use the pivot correctly. However, it seems that pivot only respects width and height, not frameWidth and frameHeight. How can I utilize frameWidth and frameHeight in phaser, esp. in relation to setting the sprites anchor?

 

2. Is pingpong animation looping supported by Phaser yet? The only mention I have found of it was from back in September. This would be a really good feature to have access to.

 

3. Is there a "Snap to nearest pixel" option for sprites and animations?

 

 

FrameWidthTest.zip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.