2D Sprite question

Started by
3 comments, last by njkt 18 years, 11 months ago
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?
--------------[Nico Projects]
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.
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
--------------[Nico Projects]
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
What we do in life... Echoes in eternity
thanks, that does help a bit :D
--------------[Nico Projects]

This topic is closed to new replies.

Advertisement