D
dodash
Guest
Hi!
I started working with Game Maker just the other day. So far the experience has been completely engrossing, I love it! And so I thought it would be a good idea to join this forum.
I am currently working on my very first project. It is still no more than an experiment really, where I get to play around and learn the basics of developing in game maker. However I do have some perfectionistic tendencies and there is one thing I just cannot stand, even for a play-around, first time project. Distorted pixels.
So basically what I have so far is one room, one controllable character and some other objects for scenery. The room is 3200x480 pixels and scrolls sideways as the character moves. I have set the view of the room to be 920x480 pixels. Eventually I will want it to be scaled up by a factor of 2 but for now this is fine. I have not changed any settings or used any commands related to resolution, scaling, etc.
What happens when I run the game is that it gets scaled up by 125%. The view is, as mentioned above, set to 920x480 but the game is displayed at 1200x600. I actually measured the pixels. In no way have I requested this scaling from the program and it's really killing my pixel art. The pixels are all blurred so some interpolation seems to be used. Why does this happen?
I have tried to change the view size to 80% of what I mentioned above to compensate for this scaling. Still blurred pixels. I also tried messing around with the application_surface using some surface commands. More specifically I used:
application_surface_draw_enabled(false);
surface_resize(application_surface,920,480);
on the create event of an object in the room and then
draw_surface_ext(application_surface,480,240,1,1,0,c_white,1);
on the step event of the same object. I read in a guide on this forum that you could do this to assure pixel perfect display. However, what happens with this when I run the game is that I get an error immediately that reads:
Trying to use non-existing surface.
at gml_Object_obj_spawner_StepNormalEvent_1 (line 3) - draw_surface_ext(application_surface,480,240,1,1,0,c_white,1);
I also tried using only surface_resize(application_surface,920,480); and this did nothing. The game ran as usual at 125% the size.
Does anyone have an idea on how to fix this? It need not be fancy by any means and if you could, please explain it simply. Most info on the internet about this is way to complex for me to understand and implement, hence me writing here.
Thanks in advance!
EDIT: After looking further at the game global settings I discovered a box reading "Interpolate colors between pixels". When I unchecked it, my problem was almost solved. Now all my sprites are pixel perfect and the game is displayed with the right dimensions. However, my background is still blurred, as if it had been scaled down to half it's size and then scaled back up leaving the pixels all blurred. The background in the editor looks fine and in the room editor it also has full resolution. It's only when I run the game that this happens. Note that I have also removed all code relating to the application_surface and what not.
I started working with Game Maker just the other day. So far the experience has been completely engrossing, I love it! And so I thought it would be a good idea to join this forum.
I am currently working on my very first project. It is still no more than an experiment really, where I get to play around and learn the basics of developing in game maker. However I do have some perfectionistic tendencies and there is one thing I just cannot stand, even for a play-around, first time project. Distorted pixels.
So basically what I have so far is one room, one controllable character and some other objects for scenery. The room is 3200x480 pixels and scrolls sideways as the character moves. I have set the view of the room to be 920x480 pixels. Eventually I will want it to be scaled up by a factor of 2 but for now this is fine. I have not changed any settings or used any commands related to resolution, scaling, etc.
What happens when I run the game is that it gets scaled up by 125%. The view is, as mentioned above, set to 920x480 but the game is displayed at 1200x600. I actually measured the pixels. In no way have I requested this scaling from the program and it's really killing my pixel art. The pixels are all blurred so some interpolation seems to be used. Why does this happen?
I have tried to change the view size to 80% of what I mentioned above to compensate for this scaling. Still blurred pixels. I also tried messing around with the application_surface using some surface commands. More specifically I used:
application_surface_draw_enabled(false);
surface_resize(application_surface,920,480);
on the create event of an object in the room and then
draw_surface_ext(application_surface,480,240,1,1,0,c_white,1);
on the step event of the same object. I read in a guide on this forum that you could do this to assure pixel perfect display. However, what happens with this when I run the game is that I get an error immediately that reads:
Trying to use non-existing surface.
at gml_Object_obj_spawner_StepNormalEvent_1 (line 3) - draw_surface_ext(application_surface,480,240,1,1,0,c_white,1);
I also tried using only surface_resize(application_surface,920,480); and this did nothing. The game ran as usual at 125% the size.
Does anyone have an idea on how to fix this? It need not be fancy by any means and if you could, please explain it simply. Most info on the internet about this is way to complex for me to understand and implement, hence me writing here.
Thanks in advance!
EDIT: After looking further at the game global settings I discovered a box reading "Interpolate colors between pixels". When I unchecked it, my problem was almost solved. Now all my sprites are pixel perfect and the game is displayed with the right dimensions. However, my background is still blurred, as if it had been scaled down to half it's size and then scaled back up leaving the pixels all blurred. The background in the editor looks fine and in the room editor it also has full resolution. It's only when I run the game that this happens. Note that I have also removed all code relating to the application_surface and what not.
Last edited by a moderator: