In all of the previous articles on diagonal movement, I only used 32×32 character sprites because they were readily available to me. Now the question is, what happens if you have character sprites that are larger than 32×32? We explore whether large sprites can be used with the Eight-directional Movement script.
The eight-directional movement script uses the RMVXAce standard for character sprite sheets. First, each character block will have 12 sprites arranged in a 3×4 format. As you have seen before, you would have one block for orthogonal movement, and another block beside it for diagonal movement.
Second, all sprites must be equal in size. RPG Maker doesn’t provide support for texture atlases and simply assumes the dimensions using simple calculations. As you can see, every sprite is 32×32.
Third, there are 8 character blocks per sheet, 4 per row. You would take your blocks above and add it into a larger sheet.
In total, there would be 8 rows and 12 columns, so you would do some math. If you had 32×32 characters, then your total image size would be
Width: 32 * 12 = 384 pixels
Height: 32 * 8 = 256 pixels
Applying Large Sprites
Suppose we were working with sprites that were 64×32 instead of the usual 32×32. You would do the same thing:
- Arrange your sprites in a 3×4 format with the appropriate directions
- Extend the image to the expanded size.
Now, the size of the expanded image is not going to be the same as before, because now we’re using 64×32 sprites. The calculations are the same, however, since you would just multiply the width by 12 and the height by 8 to get the number of pixels you need.
Width: 64 * 12 = 768 pixels
Height: 32 * 8 = 256 pixels
And so if you’re using 64×32 sprites, you would just resize your canvas to 768×256 and then you could just plug it into RPG Maker and let it do the rest.
Here is an example of a large sprite in action. I have mixed it in with the 32×32 sprites for comparison. No changes have been made to the script.
RPG Maker is quite flexible when it comes to character sprite sizes, as long as you follow the specifications. Your characters can be of any width or height as long as every sprite on the same image has the same dimensions. The eight-directional movement script specifies that your diagonal sprites will be placed next to your orthogonal sprites, so you could potentially have 4 actors per sheet. However, I would recommend having only one character per sheet because the other blocks may be used for other animations.
Spread the Word
If you liked the post and feel that others could benefit from it, consider tweeting it or sharing it on whichever social media channels that you use. You can also follow @HimeWorks on Twitter or like my Facebook page to get the latest updates or suggest topics that you would like to read about.