Jump to content

Proper way to Layer images?


Adrian

Recommended Posts

I am designing a game where my Character can equip different weapons and gear. I have layered the character in Spriter (sometimes I am required to change an objects Z-order depending on the current frame) however the way my game will read the sprite sheets and layer the different equipment causes problems as sometimes different frames will require objects to be layered differently, so if the Shield is meant to be in front of my characters arm it will ALWAYS appear in front, even though some frames may require the Shield to appear behind.

 

I have temporarily fixed this issue by deleting a portion of the shield... however, I feel this way is inefficient as some gear or shields may be sized differently. My question is, is there any better way to do this? A suggestion could be an option in Spriter that will automatically "hide" the portion of the shield covered by other objects when the Shield is exported and given its own independent sprite sheet. Similar to what I have done manually in the image below.

 

I have attached an example: http://tinypic.com/view.php?pic=oavewk&s=8#.VXugkkYjhZo

 

Any help is always appreciated!

Link to comment
Share on other sites

This is a basic game creation question, and not specific to Spriter, if I understand it correctly.

 

I see two possible solutions...

 

1) Program your game to pay attention to the current frame of any particular animation and adjust z-order of the layers that make the animation accordingly.

 

2) (no programming needed) Have 2 Layers at all times for any object that changes z-order... for the shield there would be a "shield behind body" layer and a "shield in front of body" layer... each layer would either be blank or have a shield image as appropriate for any particular frame of any particular animation.

 

Make sense?

 

Cheers.
-Mike at BrashMonkey

Link to comment
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.

  • Recently Browsing   0 members

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