• 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 [GM8] Tile spacing issue when scaling viewport

WMCD

Member
Hey all, so I've done my searching and am sad to learn that while I was gone the old forums archive was deleted, along with the thread I used to look to for this solution!

A common issue in GM8/GM8.1?/Pro? is spacing appearing between tiles when scaling the viewport, even if all scaling is perfect (i.e. a 640x480 room view scaled 2x to be a viewport of 1280x960 on-screen when playing). I took too long a break from GM and now no longer remember the couple of lines of code I picked up in a very, very old forum post that fixed this. It was like 2-4 lines of code and dealt with view/port setting IIRC. It was my magic bullet D:

Any knowledge on fixing this? Thanks in advance!
 

TheouAegis

Member
Hey all, so I've done my searching and am sad to learn that while I was gone the old forums archive was deleted, along with the thread I used to look to for this solution!

A common issue in GM8/GM8.1?/Pro? is spacing appearing between tiles when scaling the viewport, even if all scaling is perfect (i.e. a 640x480 room view scaled 2x to be a viewport of 1280x960 on-screen when playing). I took too long a break from GM and now no longer remember the couple of lines of code I picked up in a very, very old forum post that fixed this. It was like 2-4 lines of code and dealt with view/port setting IIRC. It was my magic bullet D:

Any knowledge on fixing this? Thanks in advance!
I don't know about what lines of code you're referring to, but if you subtract 1 pixel from your port width and port height, the lines should disappear at 2x, 3x and 4x scale. My laptop hated GM8's surfaces, but YellowAfterlife's suggestion should work too. The nice thing about using a surface is it also encourages you to stop using draw_text(), draw_sprite(), or draw_background() every step, because there's no need to draw every step when rendering to a custom surface.

Alternatively -- I was not a fan of it and never used it -- you could use Tile Champion, which adds a buffer around each of your tiles, so when GM scales the tiles, it adds the buffer into the empty areas. But mine and Yellow's suggestions are better than Tile Champion.
 
Top