How to disable Room background image scaling / anit-aliassing

Started by nims, Sat 11/04/2015 14:19:06

Previous topic - Next topic

nims

Hi,

I am using the new 3.4 alpha to create a 1920x1080 game and amd running into something I don't really understand. I've imported a background image, which looks in the editor like this (a small area):

In editor

But when I run this room in my game, it all looks blurry:

In game

I am thinking that some kind of scaling or anti-aliasing is going on, so I tried to disabled it using:
Code: ags
  game.disable_antialiasing = 1;


But that doesn't do anything.

I then tried to use the following:
Code: ags
  
player.ManualScaling = true;
player.Scaling=100;

Which made the character look better a little, but also there was some artifact at the bottom.

I would like to know how to fix this. The map resolution matches the game resolution and both are 1920x1080. Any help or links to the right references are appreciated.

nims

Small update. When running the game in full-screen modus, it seems to not do this. So it is related to Windowed mode, which doesn't completely seems to fit. So I need to run the game using CTRL+F5 and then it seems to work.

Is there any way to prevent this scaling in windowed mode? Because It makes the game ugly.

Crimson Wizard

#2
Quote from: nims on Sat 11/04/2015 14:28:36
Is there any way to prevent this scaling in windowed mode? Because It makes the game ugly.

You physically cannot remove scaling if you run in a window that is smaller than your game size.
BTW, I answered this just couple of days ago: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51974.0

You may try setting anti-aliasing scaling filter in setup, but I am not sure how much that would improve things.


E: It would hypothetically be possible if AGS supported automatic converting room into scrolling room instead of scaling it down, and/or replacing gfx for low-res mode, but it does not have such features now.

nims

It is a good idea to make the room scrollable. Is it possible to do this from code? I think I prefer scrollable instead of this kind of scaling.

Crimson Wizard

Quote from: nims on Sat 11/04/2015 17:27:40
It is a good idea to make the room scrollable. Is it possible to do this from code? I think I prefer scrollable instead of this kind of scaling.
AGS does not support changing game size at runtime now. It also does not provide means to get actual display resolution from script.
Thing is that hi-resolutions themselves are very new to AGS (only added in WIP 3.4 version). So this feature is only discussed now.

nims

Ok thanks. Seems that since I am running on Alpha, I am getting the kinks :). Where can I find all the discussions on the alpha version? I am happy to give my input on it as well. Especially since I am using it to create a FullHD game on it :).

But I am still curious if there is a way to make a room scrollable in any way.

Crimson Wizard

Quote from: nims on Sat 11/04/2015 23:19:40
Ok thanks. Seems that since I am running on Alpha, I am getting the kinks :). Where can I find all the discussions on the alpha version? I am happy to give my input on it as well.

Release thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51050.0
Discussion: http://www.adventuregamestudio.co.uk/forums/index.php?topic=49969.0

Quote from: nims on Sat 11/04/2015 23:19:40
But I am still curious if there is a way to make a room scrollable in any way.

The room gets scrollable if its larger than game resolution. Thats base AGS feature.
Also see http://www.adventuregamestudio.co.uk/wiki/Room_functions#SetViewport

nims

Thanks for the tip. I've found a simple work-around which seems to work quite well. I changed my Game resolution to 1920 x 1020 in the general setting. Made sure NOT to resize all the existing backgrounds. It then looks very good, and since the scrolling is so limited it will not actually happen so much, but when it does it is not strange at all. When running on full screen, there is a very small black border at top and bottom, but since this is only 20px, it doesn't look strange at all.

So I think this is a good tip for everyone that want to avoid scalling in Full HD, when someone is playing it in windowed mode :).

SMF spam blocked by CleanTalk