Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

For those using Game Maker...

A topic by Lucas Guimaraes created Oct 04, 2016 Views: 422 Replies: 4
Viewing posts 1 to 5
Submitted

Is the resolution determined by Port on Screen or View in Room?

Submitted

I believe it's the view, but I could be wrong as this is my first jam

Submitted

Here is a tutorial for ya. It will make your game exactly the resolution you want. So when you rotate objects, it won't add extra pixels to it.

http://diestware.tumblr.com/post/133416514160/pixel-perfect-camera-tutorial

Submitted

The resolution is determined by the view_wview / hview, but if you are scaling up by increasing view_wport/hport, then you will get inbetween pixels. It's better to use window_set_size(view_wview*scale,view_hview*scale); than to create subpixels the other way

Submitted

Here is how my camera works:

obj_camera

Create event:

//Scale multiplier
scale_mult = 5;

//View resolution
view_wview = 160;
view_hview = 144;

//Set view to the resolution multiplied by the scale multiplier
window_set_size(160*scale_mult, 144*scale_mult);

//Reset surface to apply modifications
surface_resize(application_surface,view_wview,view_hview);


Not required, but handy to modify the zoom while the game runs:

Step event:

//Inputs to modify zoom on the fly
key_zoom_plus = keyboard_check_pressed(vk_f9);
key_zoom_minus = keyboard_check_pressed(vk_f10);


if (key_zoom_plus)
{

///Camera code


scale_mult += 1;
scale_mult = clamp (scale_mult, 1, 6);

view_wview = 160;
view_hview = 144;

window_set_size(160*scale_mult, 144*scale_mult);

//Reset surface to apply modifications
surface_resize(application_surface,view_wview,view_hview);
}


if (key_zoom_minus)
{
///Camera code

scale_mult -= 1;
scale_mult = clamp (scale_mult, 1, 6);

view_wview = 160;
view_hview = 144;

window_set_size(160*scale_mult, 144*scale_mult);

//Reset surface to apply modifications
surface_resize(application_surface,view_wview,view_hview);
}


Hope it can help!