{"id":21711859,"url":"https://github.com/robotoskunk/gms2_safezone","last_synced_at":"2026-01-04T09:05:57.580Z","repository":{"id":115177700,"uuid":"349618635","full_name":"RobotoSkunk/gms2_safezone","owner":"RobotoSkunk","description":"A script that adds multi-resolution support for Game Maker Studio 2","archived":false,"fork":false,"pushed_at":"2021-03-20T04:09:27.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T16:44:45.082Z","etag":null,"topics":["gms2","multi-resolution","multiresolution","script"],"latest_commit_sha":null,"homepage":"https://robotoskunk.com","language":"Game Maker Language","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobotoSkunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-20T03:38:49.000Z","updated_at":"2024-12-31T16:56:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bcc45b1-8a6b-485a-88b4-635aad13d465","html_url":"https://github.com/RobotoSkunk/gms2_safezone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotoSkunk%2Fgms2_safezone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotoSkunk%2Fgms2_safezone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotoSkunk%2Fgms2_safezone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotoSkunk%2Fgms2_safezone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobotoSkunk","download_url":"https://codeload.github.com/RobotoSkunk/gms2_safezone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244666757,"owners_count":20490312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gms2","multi-resolution","multiresolution","script"],"created_at":"2024-11-25T23:30:12.036Z","updated_at":"2026-01-04T09:05:57.552Z","avatar_url":"https://github.com/RobotoSkunk.png","language":"Game Maker Language","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GMS2 - RobotoSkunk's Safezone\nA script that adds multi-resolution support in Game Maker Studio 2.\nThe script adjusts the GUI surface and the application_surface to suit the resolution you have set.\n\n## Installation\n[Go to the folder where the script is located](https://github.com/RobotoSkunk/gms2_safezone/blob/main/src/scripts/rs_safezone/rs_safezone.gml) and add it to your project, then configure the project to support window resizes and keep the aspect ratio (important).\n\n## How to use\nJust call the script inside a single object in the step event to start working.\nThe function returns the aspect ratio of the current resolution.\n\nAdditionally, it automatically generates four read-only global variables to use:\n* **rs_ideal_width** - The new width given by the script.\n* **rs_ideal_height** - The new height given by the script.\n* **rs_actual_width** - The current width of the game window.\n* **rs_actual_height** - The current height of the game window.\n\nThe arguments that the function takes are the following\n```gml\nrs_safezone(width, height, [quality])\n```\nWhere...\n* **width** - Width of the safe zone.\n* **height** - Height of the safe zone.\n* **\\[quality]** - The quality of the application_surface.\n\n### Example\n```gml\n//Inside a step event\nrs_safezone(1280, 720);\ncamera_set_view_size(view_camera[0], rs_ideal_width, rs_ideal_height);\n```\n\n## Bugs\nUse sensible aspect ratios because Game Maker will return a surface error if you use dimensions that Game Maker doesn't support.\nThese errors are very random and there is no concrete way to know when one will come out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotoskunk%2Fgms2_safezone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotoskunk%2Fgms2_safezone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotoskunk%2Fgms2_safezone/lists"}