• 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!

Uneven pixels in game graphics

K

Krenzathal77

Guest
Not sure if this is something that I've done or it's just the nature of the beast.

Anyway, I have a PNG file which simulates old school CRT scanlines by just having a one pixel horizontal line every two pixels down. Then I reduce the alpha, and draw it over the view. It looks nice, but I noticed that in the game the scanlines look really uneven. Like some lines are two pixels thick and others look one pixel thick. I checked the PNG file and it's all even in there.

In some rooms I'm scaling them using xscale and yscale to half size, but it's the same whether it's set to half size or full size.

It was then that I also noticed that the actual in game graphics were like this too. I thought I had made a mistake in stretching the port which may have caused some distortion, but I have the view set to an arcade like 248 x 245, but the port is exactly 4 times that at 992 x 980.

The picture below illustrates what I mean. The circle on the lower right appears to show a normal pixel in the centre, but the one on the upper right seems to be half its height (they are meant to be even in size). The ellipse on the left shows the uneven scanlines.

I'm not quite sure what to do now so any advice would be grand.

Thanks.

 
S

Satori

Guest
Are you running your game full screen or in a window? I've never seen a TV or monitor that supports 992 x 980 as a standard resolution, so chances are that the Gamemaker engine is still scaling the view to fit your monitor/TV. (Or it could even be the monitor/TV doing the scaling).

Perhaps a better option might be to use a shader for the scanline effect. There are plenty of them available.
 

RangerX

Member
And what's your monitor's resolution?
What's your scaling code?
You have a scaling issue here. Either its the port (you really should scale the application surface instead, port often comes out wrong) and you might also have a scaling issue due to GameMaker fullscreening it in your monitor.
Also, what do you mean by "scale a room with image Yscale and Xscale" ?
You don't scale rooms buddy. And should scale either the object's graphics with those variables either.
 
K

Krenzathal77

Guest
Thanks for the replies. I was trying to base the dimensions off of the old arcade game resolutions, but I guess they used a different type of display.

I managed to get it sorted in Windowed mode but full-screen is still causing some distortions so I guess I have to re-think the vertical amount as it's obviously being scaled to fit.
 
Top