• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Smooth pixel art rotation in surfaces?

(Sorry for the bad English) Hello, I need to rotate pixel art and make them look smooth, I know this can be done using "surface_resize (application_surface, x, y)", but the surface I need to resize is not the application surface, try to use surface_resize but nothing changes

example, i draw some shadows in another surface and the player in the application surface:

example.png
 
Do you need to rotate the character or the whole view?

If you want to rotate the whole map you can use camera_set_view_angle
Hi, sorry for not explaining it well, basically this is my problem (left) and this is what I want (right):

I've seen that this can be done but you have to draw the instances in application_surface, but what i need is draw them on a surface created by myself, these are examples of my results:

-Drawing the instances in application_surface without rescaling:
1631703710623.png

-Drawing the instances in application_surface with rescaling:
1631713229532.png

-Drawing the instances on a surface created without rescaling:
1631713555654.png

-Drawing the instances on the surface created with rescaling (nothing changes):
1631713644982.png

Sorry for the delay in responding, my gamemaker had stopped working for some reason
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
This happens because the application surface has a higher pixel density than the actual camera. So for every "game" pixel, the app surface is drawing 4 or 9 or whatever. This gives the effect of "rotating pixels" and a smoother looking line in sprites. Not sure how you'd get around this as even if you create a larger surface and scale stuff up, it's going to have to be scaled back down again to draw it to the screen... Which will give you the same issue.
 
D

Deleted member 13992

Guest
People generally make that "smooth pixel rotating" by keeping the camera size and viewport size the same, and scaling all art assets/sprites/etc individually. So instead of keeping your camera at 640x360 and having the viewport size 1920x1080, you make both 1920x1080, and stretch each sprite/tile/asset 3x. Unfortunately, that means all the math you've done for a 640x360 game also needs to be "scaled up".

There may be another way that I'm not aware of.
 
I got it, it's kind of hard to explain so I'll probably explain it later for people who have the same question, for now, thanks for the help
 
Top