Question about graphics
Let's say you have a new enemy graphic. It's animated, and the size of the enemy is 40x40 pixels. Does it matter that the images of the enemies are 60x60 pixels, so that there is 20 pixels of white (transparency) around the sprites?
You don't see any difference in the game, because it's transparent, but does it affect hit boxes or anything like that?
You don't see any difference in the game, because it's transparent, but does it affect hit boxes or anything like that?
Well, when you set the boxes, i think the coordinates are reported to top-left corner of the image, so if the 20 pixels are to the right or below, it would make no difference, but if they are in the left, or top, it would.
It can affect hit boxes because they are measured from the edges of the whole image, so if it's an animated sequence it is easier for the image to be the same size for each frame (even though the sprite will change size) so the hitbox won't change shape.
The only other difference it would make that I can think of is that if you have lots of white space then cutting it off would make the file size smaller.
Edit: Whoops, hit boxes are measured from the depth dot, not the image itself. Thanks Cypry
The only other difference it would make that I can think of is that if you have lots of white space then cutting it off would make the file size smaller.
Edit: Whoops, hit boxes are measured from the depth dot, not the image itself. Thanks Cypry
Alright but let's say there are 10 white transparent pixels around the image at each side, so the upper left corner is also white. All the images are in the same size. Then I edit the hardbox in Dinkedit so it just affects the image itself - not the white borders.
Would the white borders still be a problem besides file space?
I'm asking because I now see I have a ton of graphics that work well in the game, but when I open them up in Paint I see they "float" in the middle of image with white around them. It would cost a LOT of time to properly align all the images...
Would the white borders still be a problem besides file space?
I'm asking because I now see I have a ton of graphics that work well in the game, but when I open them up in Paint I see they "float" in the middle of image with white around them. It would cost a LOT of time to properly align all the images...
Well, i don't think that would be a problem. If you really want to remove white spaces, I think I can write a program for you that would do that.
Done. Just tell me where to send it.
Man, you're fast! Please send it to: c.janssen86 @ gmail.com
Thanks.
Thanks.
Did you recieve the program? Did it work well?
Yeah, thanks! It works fantastically. A small nitpick is that it leaves 1 pixel open on the upper and the left side of the image, but that's not that big a deal. If anything, this saves me a LOT of work. Thanks again, you rock!









