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

GameMaker [STILL UNSOLVED] Vector anti-aliasing for tiles and backgrounds?

A

alphabot

Guest
Hey!

Sorry if a similar question has been asked and answered before, but I've looked everywhere and really haven't seen anyone else with this problem.

In my current project, I am trying to use vector sprites for the first time ever (!). In order to get them to not look like jagged garbage, I've enable anti-aliasing and maxed it out. This works great for the sprites drawn by objects! However, the anti-aliasing has no effect on my tiles or backgrounds, and while I can theoretically draw backgrounds from objects, I can't really see a practicable workaround for all my tiles.

My question: Is there some way to get anti-aliasing to affect tiles and backgrounds in the same way that it affects the sprites I draw in objects?

For reference, my code to get my anti-aliasing is literally just these two lines
draw_enable_swf_aa(true);
draw_set_swf_aa_level(1);
Which works perfectly for regular sprites.
 
A

alphabot

Guest
Hrmmm, I thought that would work, but I've played around for a while and can't seem to get it to have any effect on the backgrounds :/
 
A

alphabot

Guest
I've played around a lot and still haven't managed to get anything to change the anti-aliasing of my backgrounds or tiles. The anti-aliasing of display_reset actually has no effect on any asset in my game, and the little documentation I've seen online makes me think it's just a function to adapt to a full screen resolution or perhaps something to do with 3D images.

I think part of the problem is that I'm not understanding how/when tiles and backgrounds get drawn by GM, but if I did I might be able to address this issue. I have reasoned that I could probably fetch the ID and location of every tile in the room when the room is created and then manually REdraw all the tiles in a controller object by cycling through them, but that sounds like a bigger drag on my game than just using objects instead of tiles for backgrounds.

If anyone has ever used vector sprites and figured out how to make backgrounds look decent (Surely someone has!) I'd appreciate some help! Or if someone could just sort of explain how/when tiles get drawn, maybe I could try to come up with some fixes on my own :)
 

Bingdom

Googledom
As far as I'm aware, display reset effects the whole screen. Doesn't matter what you draw on the screen and what resolution you have. (Might be wrong on this)

How are you using it? Do you have any custom shaders enabled? Maybe your hardware doesn't support it, what does display_aa say?
 
A

alphabot

Guest
My display_aa returns 14, so I think I have the hardware (might be wrong, but that's how I took it). No shaders at all.

As far as using it, I've placed it in the create event of various controller objects to try to get it to do something. Always as:

if display_aa > 6
{
display_reset(4, false)
}

I've played around with all the numbers in every combo. As a note, everything over 4 in display_reset slowed down my game to the point of non-function, so it was definitely trying to do something. Never had any effect on any assets tho :( Thanks for trying to help me out btw! V. appreciative

EDIT: Oh and I think you're right about display_reset affecting the whole screen. I was trying to say that it seems like maybe the aa part of display_reset isn't normal aa if that makes sense. Like it's only aa for certain things? Perhaps it doesn't work on swf? Tbh i have no clue though, I could find hardly any documentation on it online.
 
Last edited by a moderator:
Top