Jump to content
  • Advertisement
Sign in to follow this  

2D Sprite question

This topic is 4742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!