• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Graphical glitch, inaccurate rendering

P

Pix3M

Guest
An image I made for my last thread on figuring out how to wrestle with UTF-8 characters:



Look at that big T on the bottom-left. If you have a good eye, you can probably guess which other letters are rendered incorrectly. I use sprite-based fonts, and often my text will be incorrectly rendered so individual characters may have a pixel row/column shaved off, or have a row/column doubled up.

I know this is a hardware issue because I experienced this only after I installed a new GT730 where previously, my graphics card was built into my A8 5600k CPU and I never had this issue. Another person I know who experiences this glitch has a GTX 980

I have no idea where to start. I have a Windows 7 64bit home edition blah blah...
 

RangerX

Member
Could be multiple things. Let's get out an easy one out of the way:

what's your game's resolution (view size) vs the resolution your display the game at? (monitor's resolution)
 
P

Pix3M

Guest
It's variable. It is rendered at 320x240, then scaled up according to in-game settings.
 

RangerX

Member
Ok, if the game is scaled up by what ends up being a fraction number instead of an integer value, there can be graphical problems like you see on the T and R letters there. However, it would not only be text, any sprite or background of whatever could get deformed.

Another possibility is that the code you use to make the letters move, if it ends up the letter is drawn at some fraction position "x 33,46 and y 45,428" (fictive position here of course), its possible that yet again you get deformation.

There might also be other reasons. Is the font used at native size?
 
P

Pix3M

Guest
It is at native size, and scaled only at an integer. Not only that, but this issue isn't limited to my font, sometimes random background tiles are incorrectly rendered one pixel too high but I don't have a screenshot to show yet :/

Really, there is likely nothing wrong with the code. It's my graphics card that's behind this behavior
 

RangerX

Member
Definetely. Certain models of graphics card are more "unstable" if I can put it that way and when there's graphics that aren't at a "power of two" size, they sort of mess up.
Are you certain you got the lastest drivers for that card?
 
P

Pix3M

Guest
I should have the latest drivers, resized my sprites to be 16x16, my type is still rendered incorrectly :/
 
P

Pix3M

Guest
So, I think I found an acceptable workaround.

I threw all my font spritesheets into its own texture group, which I set to not crop. So far my graphics card doesn't make the mistake of shaving off random rows of pixels so far. Eh, good enough :p

EDIT: In fact, the issue seems to dissappear completely
 
Last edited by a moderator:
Top