• 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 Draw two object at different resolution

Flaick

Member
Hi guys, is it possible to draw on two surfaces with different dimensions/resolution?

I have my game at 640x360, but i wanna draw some elements at higher resolution. I can achieve this using the GUI. For example i have two sprites, one 32px other 96px; if i draw the one to application_surface and other to GUI (resized to 1920x1080), the second will looks quite same dimensions but more detailed.

Code:
On creation room (or another object):
Code:
display_set_gui_size(1920,1080);
Object with 96px sprite, Draw GUI event:
Code:
draw_self();
Is this doable with a second surface instead using GUI? I've tried but didn't work:
Object with 96px sprite, Draw event:
Code:
if !surface_exists(surf) {
   surf = surface_create(1920,1080);
}
surface_set_target(surf);
draw_self();
surface_reset_target();
draw_surface(surf,0,0);
view_surface_id[0] = surf;
 
Top