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

Legacy GM Lines Appearing When Scaling?

FlutterBug

Member
So, in this thread, I figured out how to zoom out the camera while keeping the low resolution I wanted. It works great, except for, now, when it scales, it leaves these lines across the screen as it scrolls (the camera zooms out for a camera to pan up and then down across the stage, which is laid out vertically). You can see these lines in the screenshot below, one across the middle and a couple cut out of tiles near the bottom:

These flicker in and out as the camera scrolls in a really ugly fashion, and I would really like to fix them because the camera zooming works perfectly otherwise!

So far all I could think of was possibly the pixel buffer was too small in the texture group settings, but increasing that had no effect. What could be causing such artifacts when scaling, and can it be fixed? Thanks in advance!
 

Attachments

Phil Strahl

Member
I'm not certain whether it will work or not, but have you tired switching on "Edge filtering" in the afflicted sprites?
edge-filtering.png
The other thing that comes to mind would be trying to change the texture page in Options > Windows > Graphics Settings.
 

FlutterBug

Member
It's tiles having the problems, not sprites, and also, I am on Game Maker 1.4, which does not seem to have that option. Turns out the problem is just clamping, these tiles were getting really weird bordering in the texture page:
upload_2018-10-4_19-42-10.png
So I just have to go through and manually add bordering to tiles affected like this... time consuming and tedious, but worth it, heh. All future tiles, I can do this way to begin with and avoid the problem. I tested just with these tiles, and, doing the clamping myself, there is no longer lines showing up when scaling them. Sprites of course all get clamped correctly automatically, and so they all look fine, its exclusively tiles that have the issue. I'll have to rebuild all of my stages' tiles, but I think it will be alright. Backgrounds also have this issue though, and I am less sure what to do there.
 

FlutterBug

Member
Fortunately I caught this early, and so I only have a few stages to go through and fix, haha! If this was later on in development, I would just say to heck with it and just not do the camera zooming effect :confused:
 

FlutterBug

Member
Okay so I've figured out I don't need clamping, I fixed the problem with the backgrounds doing this by adding a blank space to the bottom of it, and setting "no cropping" in the texture page; basically I just need to avoid having it add pixels to the edges on tiles and backgrounds, since I am scaling to be smaller. So that makes this a bit easier to fix, but it's still gonna be a pain to fix all of my tiles, because no matter the change I will have to move them all back into place manually, heh.

EDIT: Looks like I need a little bit of both, I think the best solution will be to put all of the backgrounds and tiles into their own texture group, with no scaling or cropping, and a border width of 0, and do all of the clamping myself. This is doable, but will probably be a delay of a day or two on development just to get this done, heh.

EDIT again: I managed to fix the issue by rounding the values, basically forcing it always to be 16:9 aspect ratio.... not ideal because it limits how I can do the zooming a bit, but it's a lot better plan than redoing all the tiles, haha. For my next game project I'll do the tiles with manual clamping from the get-go.
 
Last edited:
N

NeZvers

Guest
Why force to 16:9? Slim chance but someone could have different aspect ratio, so little dynamic calculation beforehand would be better.
 

FlutterBug

Member
Why force to 16:9? Slim chance but someone could have different aspect ratio, so little dynamic calculation beforehand would be better.
That is already handled by Game Maker itself, I have it checked to "maintain aspect ratio", so on other aspect ratios, you just get letterboxed.
 

FlutterBug

Member
I wrote a small program (in GM) that will do this for you if you decide you need it done.
Oh, I would definitely like that! A major reason I wasn't keen on doing the whole manual clamping thing was the time required for, well, manually doing that haha. I was wondering if there was an automated way for it.
 
T

TimothyAllen

Guest
Oh, I would definitely like that! A major reason I wasn't keen on doing the whole manual clamping thing was the time required for, well, manually doing that haha. I was wondering if there was an automated way for it.
I uploaded the .exe to dropbox: https://www.dropbox.com/s/mcof5ahshlff7vf/BorderMyTiles.exe?dl=0

If you would prefer the source (gms2 file) then you will have to wait because its on an old hdd that I would have to hook up (need to get files off it anyway).

Its pretty easy to use, but if you have any issues, let me know.
 
Oh, I have had a similar issue with my backgrounds before. I fixed it by unchecking the tile horizontal and tile vertically in the texture settings.
 
Top