I am working on a pixel art project in GameMaker 2 with native resolution 428x240. In order to enable "subpixel" rending, I am trying to increase the resolution of my application_surface, but keep my view at its native resolution.

I am trying to increase the resolution of my application_surface by two, but keep my view at the native resolution. I have tried a few different things, but no matter what I do, I can't get it to work consistently.

Here is what I tried most recently:

surface_resize(application_surface, native_width * 2, native_height * 2);
camera_set_view_size(view_camera[0], native_width, native_height);

This works, but when I change rooms, the view resets to the size of the application surface, resulting in something like this:

enter image description here

It seems like every time you change rooms, the view size gets reset to the size of the application surface.

I tried iterating through all rooms and setting their view size to my native resolution on launch, but it doesn't seem to help.

How can I prevent the view from changing sizes on room change? I want to lock it at my native resolution.

  • \$\begingroup\$ I might be obvious, but have you tried using a persistent object? \$\endgroup\$
    – Lollo
    Dec 17, 2019 at 18:46
  • \$\begingroup\$ Are you sure you want sub-pixel rendering? Might undercut the style if it's supposed to look like a pixel art game. This is not meant to be a sure thing; your answer could very well be "yes" and that's cool because it's your project. :) \$\endgroup\$
    – Almo
    May 15, 2020 at 20:08


You must log in to answer this question.

Browse other questions tagged .