Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block camilacanhete

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
camilacanhete / room.gml
Created Jun 9, 2018
GameMaker: Studio mobile display setup (keeping aspect ratio without black bars)
View room.gml
/* Paste this script inside your room creation code */
view_wview[0] = floor(global.viewWidth);
view_hview[0] = floor(global.viewHeight);
view_wport[0] = global.maxWidth;
view_hport[0] = global.maxHeight;
view_xview[0] = (global.idealWidth / 2) - (floor(global.viewWidth) / 2); //csantos: center-align view width
view_yview[0] = (global.idealHeight/ 2) - (floor(global.viewHeight)/ 2); //csantos: center-align view height
display_set_gui_size(view_wview[0], view_hview[0]);
You can’t perform that action at this time.