Sprite sheets in BlitzMax
BlitzMax Forums/BlitzMax Beginners Area/Sprite sheets in BlitzMax
| ||
I was wondering if BlitzMax can handle 2D sprite sheets. In other words, for a previous game I made a separate image for each character's animation and just made the animation strip "linear" in the sense that no images were stacked, the image was just a long strip. I was thinking of making more of a "matrix" 2D sprite sheet so that I can include all of the animations together as long as each frame has the same dimensions (or is there flexibility here?). Would BlitzMax just "wrap" around to the next row once the indexing goes beyond the image in the first row? abelian_grape |
| ||
LoadAnimImage? |
| ||
Yeah that's the function I was thinking about using. Is that function capable of doing what I described? abelian_grape |
| ||
According to the docs it does. Here is the blitz3D description of the command - which the blitzmax command references. http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimImage&ref=goto It loads from left to right, top to bottom. |
| ||
Is there any other way to animate images in Bmax? |
| ||
You could also just load it into a TImage and use the new DrawSubImageRect command. |
| ||
Would BlitzMax just "wrap" around to the next row once the indexing goes beyond the image in the first row? Do you mean if you have an image file with two rows of 8 images for example, and you request image 9 it goes to the first image of row 2? In that case, yes, I think that it does wrap automatically. |