GameMaker offers you 2 choices. "Full Scale" and "Keep Aspect Ratio" if you look under the graphic tab of your target's global settings.
"Keep Aspect Ratio" will prevent any stretching to happen.
If you need to both never stretch + pixel perfect at all time, this needs some coding. I invite you to my tutorial (and the tutorials I am also linking) here if that's what you need:
https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/
I tried your first method which is what i am looking for, but so far my game just shows a black screen. hmmmm.
I tried your first method which is what i am looking for, but so far my game just shows a black screen. hmmmm.
Ok i got it to display now, but the X,Y pos of the surface is not in the center. seems to be more towards the bottom left corner?
UPDATE: okay so it displays well and perfectly in the center on windows but on my andriod it gets cut off sort of like this :
the big square is my andriod screen, and the little one is the surface.
the big square is my andriod screen, and the little one is the surface.
Update: okay for some reason on andriod the code doesnt seem to work at all, and its because Display_get_height/width funtion doesnt seem to work right. If i do ( if display_get_height()>10 { Game_end() }} <--- it doesnt do anything
Mod Edit: Quadruple post merged. Please use the EDIT button in future