Sign in to follow this  
njkt

2D Sprite question

Recommended Posts

Hi, Well i was wondering about something, it's probably pretty simple for you guys but anyways... I was looking at sprites from chrono trigger that I was debating on using for a simple game im making (to learn alot more about how it all works and such) and i noticed the size difference in various sprites and i was wondering how that would work?

Share this post


Link to post
Share on other sites
do you mean that the sprites of an animation have a different size?
i guess that would be possible with some dynamic code and a definition somewhere (either in the code or in a special file) how big the sprites are, so the blitting code always knows the right part of the bitmap it should blit.

Share this post


Link to post
Share on other sites
heres an example of what i mean

http://tsgk.captainn.net/?d=sheetinfo&s=SNES&sh=chronotrigger_magus_sheet.png


http://tsgk.captainn.net/?s=SNES&d=game&g=Chrono%20Trigger&c=Enemies

Share this post


Link to post
Share on other sites
Yeah, they are different sizes but they should all be in some sort of invisible grid setup except for that big picture in the top left, so what you got to do find is the width of the image then count all the sprites in a row and divide by the width by number sprites, do likewise with height and number of sprites in a column. This should give you two even numbers which should be the width and height of each sprites grid sort of thing... Kind of confusing yes. If not you can just cut up all the pieces yourself.

If you mean the different characters sprites are different sizes then just past a paramter to your sprite blitting function or better yet use a class for each character that holds there image and sprite spacing.
Hope that was helpful if not obscure :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this