How to format sprites?

tyler8101

Villager
Member
Joined
Jun 30, 2019
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Hi.

I am having trouble trying to figure out how to format sprites. The entire process is confusing and I can't really find any help on formatting them, especially if they are bigger than the normal 32 x 32 (or whatever the size is).

I am trying to make a sprite sheet of this object, but every attempts ends up with a piece of it out of frame.

I really dont understand how the engine divides the image into parts, the whole process is really confusing and I'm kind of getting a little annoyed trying to figure it out. :frown:
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Each sprite is divided in twelve (12) parts (3 columns and 4 rows). If you name your sprite with a leading $ the sprite sheet will be divided considering that you have a single sprite in it, if you name it without the leading $, the engine assumes that you have 8 sprites in that said sheet and calculates its size considering those 8 sprites divided in 4 columns and 2 rows.

The final result is:
$filename -> 3x4
filename -> 12x8

Take a look at RTP files to get a better grasp on this explanation if there are still things that you do not understand. In your case, since you have a single object, you might want to name your file with a leading $. Considering its size being 39x81, the final result should be a file that is 117x324.

EDIT: however, there is still one thing you have to consider when doing this. The engine automatically centers the sprite horizontally, which means that if your sprite is more than 32 pixels wide, it will be centered, leaving an equal amount of pixels to the right and an equal amount of pixels to the left of your grid square.

In your case, your sprite is 39 pixels wide. Since 39-32=7 the engine is unable to align the sprite properly (7/2=3, but 3*27≠7). The easiest way to have your sprites aligner properly is to have their width being an even number, otherwise you will have to calculate how the engine is going to center it beforehand.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
The best way to get the numbers is to start with the cell size, which means the single object size that will be used and visible on the computer screen. The default for Ace is 32x32 for the cell, but ANY size can be used here.

Your object is 39 × 71 Pixel in size. For a single sprite you need it 3x4 times, which results in a total picture size of 117x284 for the spritesheet, with an $ to indicate that it is a single sprite sheet. I suggest you don't make it a spritesheet unless you have several other objects of exactly the same size.

Within the sprite, your object needs to be placed exactly inside the 39x71 grid - the frames you have only happen if there is a pixel space between the cells.

Contrary to @Heirukichi above it is NOT absolutely required to have an equal amount of pixels on both sides. The engine can work with uneven placement. However if you want to fit specific, pixel-based positions, then you need to experiment on placement to see if you need to add a pixel line to the left or to the right to get it to the correct position. Keep in mind that this needs to be added to the CELL, not the entire sprite - that means three different pixel lines at each grid border. Messing this up can cause jitter on the event if it moves.

What you also need to keep in mind is that the sprite will only displayed in full in the game itself - NEVER in the editor.
And that is correct that way, because if a larger sprite were to be displayed in full size in the editor, you would have no way to see or select the regular tiles next to it. And that would make working on the map impossible.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Contrary to @Heirukichi above it is NOT absolutely required to have an equal amount of pixels on both sides.
I never said it does require the number of pixels to be equal on both sides. What I said is that in case of an odd number, it is mathematically impossible to have an equal amount of pixels on both sides.
However if you want to fit specific, pixel-based positions, then you need to experiment on placement to see if you need to add a pixel line to the left or to the right to get it to the correct position
This is exactly what I said, maybe you missed this part, but I was saying exactly the same thing there:
Heirukichi said:
The easiest way to have your sprites aligner properly is to have their width being an even number, otherwise you will have to calculate how the engine is going to center it beforehand.
Being the easiest way does not mean another way does not exist. Anyway, thanks for the clarification on how it shows in the editor, I completely missed that part.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top