Duck Game pixel scaling

G

GlitchCrew

Guest
Hello!

I'm working on a pixel-styled game and I'm facing scaling problems. I want to make my game look like the Duck Game which has perfect pixel graphics. In Duck Game pixels of any sprite look perfect even if the sprite is rotated at certain angle and camera is zoomed in or out.

Any ideas how can I achieve this?

I have already tried upscaling my sprites (x2, x4, x8), porting view x2 from actual view in the room, setting application surface equal to current view width and height, but still it doesn't look like Duck Game scaling and pixels look distorted.

GMX: http://www.mediafire.com/download/98j1o0756ajbv9u/test.gmx.zip

EDIT: I have already turned off interpolation.

First picture - Duck game. Second - my game.

http://imgur.com/f84oNxU
http://imgur.com/ncrXfHW

EDIT: Here is the picture of rotated sprites in Duck Game:

http://imgur.com/HhjfMwm
 
Last edited by a moderator:
2

2Create

Guest
You probably need to turn off Interpolation Between Pixels in the global game settings.
I can't see your images, by the way.
 
  • Like
Reactions: Sam

RangerX

Member
I don't see any sprites being rotated in your Duck Game example.
In any case, nothing is wrong with your game there. If sprites doesn't pixelise like that in Duck Game, this indicates you their game is higher res than yours or they have some much better interpolation.
A way out of this (outside upresing your game) could be to have your sprite on a surface and rotate that surface. Some people must know how to make a shader maybe that could interpolate the rotated graphics better.
 
G

GlitchCrew

Guest
Hey RangerX,

I've added an example with rotated sprites in Duck Game, that's exactly what I want to achieve.

Thanks for your answer, I'll try to use it but I'm not sure that this is the exact solution.
 
S

SuperSlim

Guest
RangerX is right. You need to drastically increase the resolution of your game. Also you could try to make different sprites for each range of angles in your rotation. I would do this by rotating your original sprite in an image editor and putting a new layer on top of it where you would redraw the sprite. Hope I made sense!
 
G

GlitchCrew

Guest
Ok, here is the gmx. The example is really simple, code is commented.

http://www.mediafire.com/download/98j1o0756ajbv9u/test.gmx.zip

I tried to increase sprite and it looks great at x4 but at x2 (which is better for my case since I don't want my sprite to take a huge area of screen) it doesn't look very good. Increasing application surface changes sprite appearance but doesn't really help. Am I doing something wrong or is it just impossible to do in game maker? I believe that's possible because the guy who made Duck Game created perfect scaling but I just can't understand the concept behind his implementation. Can someone improve my code please? I'm really stuck...
 
Last edited by a moderator:

RangerX

Member
You're doing it wrong because you don't seem to grasp what is actually going on.
Your view size is the resolution of your game. The application surface size is the actual "on screen size" that your view is displayed at.

Now, what happens when a sprite is drawn at another angle than its original angle? The engine tries to draw it best it can but pixels are square, a sprite drawn at an angle might need more pixels to actually appear fine. The less pixels are available (lower res), the less your good your sprite will be drawn at an angle. The more pixels there is available, the best your sprite will be drawn at an angle.
In the duck game, the pixel size is not what you see on the sprites. Its just art. The actually resolution can be seen by the jaggies created by the sprite's rotation (which are alot smaller than in your game) and the reason why the jaggies are smaller is because the resolution, pixels available, are many more in that Duck game.

Now you have 2 solutions. None are easy.

1- You draw all the angled frames yourself and make them looking good. (your sprite rotation basically become an animation!)
2- Your scale up ALL your assets.
 
Top