Since the last few questions I asked turned out to have butt easy solutions, I am delegating myself to the beginner's forum!
In a nutshell, I am making a high-res (640 x 360) game using AGS v3.4.0.6. And all the high-res fonts I import look horrible:
(http://www.wadjeteyegames.com/temp/UV-sammy-text.png)
This is "DejaVu Sans" imported at 14 point size. I've experimented with antialiasing (makes it look 10x worse), different sizes, and dozens of different fonts and they all look like variations of this. I'd really like a smooth, high-res font to match my high-res game. Am I just choosing the wrong fonts? If so, can someone recommend a font/size configuration that will look nice?
Much appreciated!
-Dave
This is a problem with engine scaling, I think. I resized it down from 1280x720 to 640x360 again and the text looked fine:
[imgzoom]https://dl.dropboxusercontent.com/u/50882197/art/GameStuff/unscaled.PNG[/imgzoom]
(Could you try looking at your game running at 1x scaling?)
I also made an empty project and imported the same font and text into a standard resolution - 640x400, and scaled that up to 1280x800:
[imgzoom]https://dl.dropboxusercontent.com/u/50882197/art/GameStuff/640x400_text.PNG[/imgzoom]
And it looks fine. I'm thinking it has to do with the scaler not playing well with custom resolutions.
Your entire screenshot looks like it's being unevenly scaled, with subpixels everywhere. I'm not sure why this would be, especially because 1280x720 is an even double of 640x360. But there is DEFINITELY a lot of uneven pixelation going on.
Dave, could you clarify, what the actual display resolution is? Screenshot is 1280x720, but it looks like it was cropped a bit (maybe it's just how room background looks).
You will get gfx mode information by pressing Ctrl+Alt+V in game.
Dang it. You're right. It DID get compressed. Here's the fullscreen version, taken just by screencapping my screen:
(http://www.wadjeteyegames.com/temp/UV-sammy-text2.png)
It's scaled up to "maximum fit" using the nearest neighborhood filter. The original resolution is 640 x 360.
The text is readable, but is still quite pixelly. I've worked in high-res projects before and the text has always been smooth. For some reason, I can't get that effect again.
Quote from: Dave Gilbert on Wed 13/01/2016 00:41:43
The text is readable, but is still quite pixelly. I've worked in high-res projects before and the text has always been smooth. For some reason, I can't get that effect again.
Try checking "Anti-alias TTF fonts" in the General Settings.
Quote from: Dave Gilbert on Wed 13/01/2016 00:41:43
It's scaled up to "maximum fit" using the nearest neighborhood filter. The original resolution is 640 x 360.
Since 3.4.0 there is a setup option to stretch game to maximal fit without keeping aspect ratio (unproportionally). This may "skew" game image. Could it be that you did that?
It looks like your using the anti-aliasing filter, which in my experience warps fonts too much to be unpleasant to the eye. You might have to shop for a font that looks good with the filter. Although, IMHO, I think using such a filter on a WadjetEye game would be a shame...
@Dave Gilbert: Don't hesitate to convert a TTF font into a sprites font to be able to slightly rework it. It used to be a pain, but nowadays there are several tools that allow you to do it properly, and to preserve international characters. Have a look at the "Fonts" article in the wiki.
Hmm. In taking a look at the settings, I noticed an option called "Alpha Blending Style" which was set to "Classic." I changed it to "Proper alpha blending" and now it looks nice!
(http://i.imgur.com/Zkop7re.png)
Not terribly happy with the font, but now that I know I can have proper alpha-blended sprites I can experiment properly. Thanks for the help!
For the record: the alpha-blending style has to do with additivity (when you draw a pixel with transparency on top of another pixel with transparency), which was half-baked in older versions of AGS (it worked as designed, but that was rarely the behaviour instinctively expected by the developper). I can't see why that would fix your fonts issue, but hey, hurray!
Hm. You are right. It might look better because today I am testing the game on a smaller monitor! I changed the alpha-blending style back to "classic" just to make sure and I can't tell the difference.
So it looks like the issue is monitor/scaling related?
I am baffled why my questions use to remain ignored :(
Question One:
Quote from: Crimson Wizard on Tue 12/01/2016 23:37:45
Dave, could you clarify, what the actual display resolution is? <...>
You will get gfx mode information by pressing Ctrl+Alt+V in game.
Question Two:
Quote from: Crimson Wizard on Wed 13/01/2016 00:56:55
Quote from: Dave Gilbert on Wed 13/01/2016 00:41:43
The text is readable, but is still quite pixelly. I've worked in high-res projects before and the text has always been smooth. For some reason, I can't get that effect again.
Try checking "Anti-alias TTF fonts" in the General Settings.
It's kinda hard to help people when you cannot understand if they actually tried what you suggested or not.
Hi Crimson. Sorry. In the original post I said that the anti-aliasing looked even worse, so I didn't use that. The first image I posted was accidentally shrunk (force of habit when creating screenshots!), which is why it looks even worse than it actually did. The second image was completely untouched and is actual size at 1920 x 1270.
Quote from: Dave Gilbert on Wed 13/01/2016 15:16:02
Hi Crimson. Sorry. In the original post I said that the anti-aliasing looked even worse, so I didn't use that.
Oh, my apologizes, you meant fonts antialiasing; for some reason I thought you were talking about using anti-aliased scaling filter.
So, do I understand it right, that your problem is not that the font letters get "skewed", but that font looks pixelated in hi resolution?
Quote from: Monsieur OUXX on Wed 13/01/2016 14:19:09
For the record: the alpha-blending style has to do with additivity (when you draw a pixel with transparency on top of another pixel with transparency), which was half-baked in older versions of AGS (it worked as designed, but that was rarely the behaviour instinctively expected by the developper). I can't see why that would fix your fonts issue, but hey, hurray!
Aplha blending mode can make the difference if you have transparent / translucent GUIs - in such cases the anti-aliased font may loose anti-aliasing on the final image.
Quote from: Crimson Wizard on Wed 13/01/2016 15:25:23
Quote from: Dave Gilbert on Wed 13/01/2016 15:16:02
Hi Crimson. Sorry. In the original post I said that the anti-aliasing looked even worse, so I didn't use that.
Oh, my apologizes, you meant fonts antialiasing; for some reason I thought you were talking about using anti-aliased scaling filter.
I am referring to the "anti-aliased TTF fonts" option in the settings menu, if that makes it clear!
QuoteSo, do I understand it right, that your problem is not that the font letters get "skewed", but that font looks pixelated in hi resolution?
Yes, that seems to be the case. On my smaller laptop screen, it looks fine. On a bigger monitor, it looks pixelated.
I must say that the situation looks rather confusing.
When I look at your screenshots, one the second screenshot you posted (http://www.adventuregamestudio.co.uk/forums/index.php?topic=53111.msg636528627#msg636528627), font looks definitely pixelated.
However, on your third screenshot (http://www.adventuregamestudio.co.uk/forums/index.php?topic=53111.msg636528652#msg636528652) it looks like it has anti-aliasing: if you zoom image in, you will notice grey "smooth" pixels around white font pixels.
Thing is that simple nearest-neighbour game scaling cannot achieve such effect: it just adds more pixels of same color, it cannot smooth image.
So either there are difference in game options, or difference in the scaling filter you used in the last case.
I am leaning towards game options, because the details of the rest of image look identical.
I'm confused as well! The only difference between them is that the third was taken on a smaller monitor. I don't know if that effects anything or not.
And good god you were RIGHT. I checked and anti-aliasing WAS on. Apologies again! For some reason, the anti-aliasing looks just fine on my small monitor but is completely unreadable on the larger one. (I'm in the cafe on my laptop right now or else I'd post a screenshot of what that looks like).
OK. I am playing with this some more and I think I can provide more detail.
Original art is 640 x 360 resolution.
Using the Nearest Neighbor filter
Scaling is "Max Fit"
In windowed mode, the display resolution is 1280 x 720
Desktop Resolution is 1600 x 900
The font is good old "Arial."
Here is a screencap with Anti-Aliasing OFF. As you can see, the font looks very pixellated.
(http://www.wadjeteyegames.com/temp/UV-soGoth.png)
Here is the same with the Anti-Aliasing ON. The font is very fuzzy and not clear. It doesn't look so bad here, but in full screen mode it's REALLY bad.
(http://www.wadjeteyegames.com/temp/UV-soGothAA.png)
Any light shedding is appreciated. :)
Hey Dave
It's only a suggestion. Use 854X480 resolution for your game. It's complete 16:9 too.I think so you can get clear font with it.
Quote from: Dave Gilbert on Wed 03/02/2016 15:54:59
Here is the same with the Anti-Aliasing ON. The font is very fuzzy and not clear. It doesn't look so bad here, but in full screen mode it's REALLY bad.
Still, can you tell what display resolution it runs in fullscreen?
You can see resolution info if you press Ctrl+Alt+V in game.
Is this the info you're looking for?
(http://www.wadjeteyegames.com/temp/UV-info.png)
Dave, you took this screenshot while running windowed mode :D.
It is like a month while I am trying to know your fullscreen mode you run the game in, because I was curious what kind of ratio the filter uses.
I now feel like in tech support hell. :D
Anyway, I think I realize what you mean by "looking terrible".
Let me explain how this works. AGS scales WHOLE game image to the final display resolution.
This means that the fonts are first drawn at resolution 640 x 360 (using as much smoothness as it is required at that small resolution). And only then the whole picture is getting scaled up.
Of course, its getting very pixelated, because even the "smoothing" half-grey pixels added for anti-aliasing are enlarged proportionally. So the font's anti-aliasing looses its effect.
At this moment, I cannot think of any workarounds, except you maybe could try using Anti-aliased scaling filter (works only in Direct3D mode), but I am not sure if that will help.
Sorry! I had included the desktop size in my list of stats but it must have gotten a bit lost in the muddle.
I play my game using two monitors. The control-V monitor size from which the two "goth club" screenshots were taken is 1600 x 900. On my larger monitor, the results are 1920 x 1080 (and the text looks the same- blurry with anti-aliasing on, heavily pixellated with it off).
Here's another example of how the text looks with anti-aliasing on. The font is "monaco" and it is being displayed on a GUI with a transparent background on my 1920x1080 monitor:
(http://www.wadjeteyegames.com/temp/UV-transfont.png)
Calin Leafshade's spritefont renderer is something I am also looking into, but it doesn't appear to be able to render fonts to a GUI. So unless there is a workaround for this, my best bet is to probably just play around with non-antialiased fonts until I find something I can live with.
Thanks for the help and dealing with my apparent idiocy!
Quote from: Dave Gilbert on Thu 04/02/2016 11:34:13
Calin Leafshade's spritefont renderer is something I am also looking into, but it doesn't appear to be able to render fonts to a GUI.
Does.
Quote from: Dave Gilbert on Thu 04/02/2016 11:34:13
Sorry! I had included the desktop size in my list of stats but it must have gotten a bit lost in the muddle.
I play my game using two monitors. The control-V monitor size from which the two "goth club" screenshots were taken is 1600 x 900. On my larger monitor, the results are 1920 x 1080 (and the text looks the same- blurry with anti-aliasing on, heavily pixellated with it off).
Dave, your desktop resolution is not important... I mean, it is, but it is not an obvious answer. The game may be stretched to whole resolution, but it may also have black borders around it to prevent proper aspect ratio, and that may affect the looks of the game.
I was not asking for a screenshot, because I know that making screenshot in fullscreen does not always work; I was asking to merely quote the information displayed in that Ctrl+V text box in fullscreen mode.
Anyway, that's just to elaborate on what I was asking about before.
I think I clearly understand the general problem you have with fonts.
I never used SpriteFont plugin, but unless it allows to draw text on top of
after-scaled game frame, I honestly cannot see how it may improve the situation.
In AGS the text is never a separate object, it is always drawn on something else, like GUI, for example, and that happens before the scaling takes place.
You are correct. I tried the plugin and had the same issues. I will just try and find pixelly fonts I can live with. Thanks for the attempted help! :)
Question about this, was the font rendering somehow changed from AGS 3.2 to newer versions? I was considering an Android port of my game IWWHIIWWHITOMIROTPG, but running the game with AGS 3.3.0 or later the fonts become unreadable. The game was built with AGS 3.2, and it seems AA was turned off. I lost the source some time ago though. Is there a way to disable TTF font AA from the CFG? And any reason why 3.3.0 and later would be forcing it when it wasn't being used in 3.2?
Edit: Actually... I think AA must have been enabled in the game settings, but 3.2 just wasn't applying it to the speech for some reason. :/ When dialog options are rendered (3.2 engine) there is visibly AA, but it isn't applied to speech or GUI labels. I think since I do not have the source I can use a custom engine build for this app that just brute-forces AA to be off. Not ideal, but it's the best I can think of since I don't have the game source.
Quote from: monkey0506 on Fri 05/02/2016 05:16:39
Question about this, was the font rendering somehow changed from AGS 3.2 to newer versions?
From the Changes.txt:
Quote
VERSION 3.2, June 2010
<...>
- Added support for anti-aliased TTF fonts in all situations where they weren't
previously supported.
Quote from: monkey0506 on Fri 05/02/2016 05:16:39
Is there a way to disable TTF font AA from the CFG? And any reason why 3.3.0 and later would be forcing it when it wasn't being used in 3.2?
This seem to be a case of backwards compatibility. If you are able to deduce where AA was not applied prior to 3.2, then you can add compatibility patch, which disables AA for these cases if the game format version is lower than 3.2.
Also, since 3.3.0 I was adding special "overriding" options to the config, that modified game's behavior. Their current list may be found here: https://github.com/adventuregamestudio/ags/blob/master/OPTIONS.md
If really needed, disabling TTF anti-aliasing option could be added as well.
The game was made using a pre-release version of 3.2, in December of 2009. I don't know if it really warrants a general-purpose patch. That would require going back and trying to determine where AA was or wasn't being applied, and adding a lot of branching to the code. I don't think that this would really (reasonably) be the "expected" behavior... this game shouldn't have had AA enabled in the first place, being made at 320x240 resolution. Thank you for the response though.