• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

GMS 2.3+ Space Between Sprites Issue

Hello1423

Member
Hello, I am trying to figure out if there is any way for me to prevent the tiny spaces between sprites that appear when I rotate them around things together.

Here is an example of the issue:
1610207446772.png
There is a vertical line of space just to the right of the center green circle.
1610207522643.png
For context, this is a spaceship composed of sprites that can all rotate around that small red circle (I have not implemented center of mass yet).


The space between sprites issue happens all over the ship after rotating for a bit. I assume that this is because of some background rounding issues or imprecision with the base drawing system that gamemaker uses. The only perfect solution I can think of is by making the entire ship one sprite by drawing things to a big surface and then converting that into the sprite. However, surfaces cannot reliably get as big as the large ships I would like to support.

Is there any other fix you can think of?
Thank you for any help!
 
However, surfaces cannot reliably get as big as the large ships I would like to support.
Say whaaa? I really doubt it, and IF it would be the case, you can always split it in multiple surfaces and stitch them together back up afterward.
On the matter of your sprite and rotation, however, this is part of the nature of the beast, in a way. Pixel art is going to distort to some extent when rotating. There's some things you can do to help, but keep in mind that good artists and programmers design stuff around that from the start.
Do you scale your sprites, your viewport, what is the color interpolation settings? I'm pretty sure it won't be that noticeable once you fine-tune the game and add stuff to keep the player's eyes distracted, tho...
 

Hello1423

Member
Stitching them together afterward will lead to the same issue I am having now with sprites though. As for surface size, on my machine, the maximum size is about 8150x8150, but I have heard they can be quite a bit smaller and it is not good to rely on something so machine-dependent like max surface size.

I think that this is a different issue than the classic pixel art when rotating type thing. This is just an imperfection with the location each sprite is drawn when rotated, it is not exact enough for this resolution so when the locations are off by just a tiny bit there is space in between sprites.

None of the sprites are scaled, the camera does change with zooming(the issue is more obvious with zooming in), but the viewport is always 1920x1080. Color interpolation is turned off.

Yeah I am hoping for that but imperfections like this really irk me at an early stage of the game like this.
 

Hello1423

Member
Also, it is particularly noticeable in this game because of how the space and which sprites have space in between them change with movement, which leads to flickering making the imperfections more obvious.
 
At that resolution, it really shouldn't be that bad...
How are you making and exporting your sprites? Have you double checked the exports settings in the app for the good resolution, DPI and this kind of stuff? It's really easy to miss it in Inkscape and some programs, sometimes.
But just to be clear, you say your ship doesn't fit on the surface that's 8150*8150, so I'm looking at a sprite in the size of 8000x8000+ just for the ship?
And for the flickering effect you mentionned, a clever use of color palettes can greatly reduce that. Research "Color Vibration".
What is Vibration?
One of the primary phenomena that emerges out of bold and highly saturated color schemes is a seemingly “vibrating” color, an occurrence wherein the edges of two directly adjacent colors appear to merge, blur and glow, giving the illusion of motion.
 

Hello1423

Member
The ship in the screenshots is about 1600 pixels wide, so that isn't too far away from my limit all things considered with how I would like considerably larger ships. And I think the max surface size on other machines with less vram can be much smaller, so I would definitely not want it tied to max ship size.

How are you making and exporting your sprites? Have you double checked the exports settings in the app for the good resolution, DPI and this kind of stuff? It's really easy to miss it in Inkscape and some programs, sometimes.
I have made all of my sprites just in gamemaker, I am not sure what sort of things you think I should check. The sizes of all of my sprites work perfectly, and normally everything looks fine. It is just when precise locations for where things are drawn issues appear with sprites being drawn a bit too far apart at times.

The ship in the screenshots does easily fit in the max, but one that is much larger would not fit.

I haven't heard of color vibration before, but from what I can understand now it does not seem to address my issue. My issue is all about how at certain points you can see whatever is behind sprites in between them when the sprites should be perfectly lined up next to each other. It seems to me like color vibration is more about which colors to put next to each other.
 
The ship in the screenshots is about 1600 pixels wide, so that isn't too far away from my limit all things considered with how I would like considerably larger ships. And I think the max surface size on other machines with less vram can be much smaller, so I would definitely not want it tied to max ship size.



I have made all of my sprites just in gamemaker, I am not sure what sort of things you think I should check. The sizes of all of my sprites work perfectly, and normally everything looks fine. It is just when precise locations for where things are drawn issues appear with sprites being drawn a bit too far apart at times.

The ship in the screenshots does easily fit in the max, but one that is much larger would not fit.

I haven't heard of color vibration before, but from what I can understand now it does not seem to address my issue. My issue is all about how at certain points you can see whatever is behind sprites in between them when the sprites should be perfectly lined up next to each other. It seems to me like color vibration is more about which colors to put next to each other.
I think I misunderstood you, I thought you were talking about the distortion when you rotate, which is totally normal.
Now that I clearly get your problem, I'm thinking maybe mipmaps? Have you tried toggling it/adjusting it in the texture page option? From what I understand now, this sounds like it could be the source of the problem
 

Hello1423

Member
I toggled on mip maps from the texture page window and I couldn't find any change. However, I think now that the issue is much more widespread than just with the precision of where sprites are drawn. It seems like rotation messes with the drawing system in gamemaker everywhere in weird ways. Here is an example:
Visual bug 1.gif
Disregard the low quality from the gif, but look at how the corners of the sprite on the edge of the green part move. There is no animation to the sprite at all but when rotating the drawing of the sprite messes up. I think it might be this sort of issue that leads to things like space appearing between sprites when there is no reason for it.

This is a very frustrating bug because it seems like there is no reason for it and is just something messed up with the engine itself. It doesn't do well with rotations.
 
Top