{"id":13530735,"url":"https://github.com/YAL-GameMaker/pixel-perfect-smooth-camera","last_synced_at":"2025-04-01T19:30:34.051Z","repository":{"id":111244024,"uuid":"320114462","full_name":"YAL-GameMaker/pixel-perfect-smooth-camera","owner":"YAL-GameMaker","description":"An example of pixel-perfect yet smooth camera for GameMaker Studio 2","archived":false,"fork":false,"pushed_at":"2020-12-10T01:03:50.000Z","size":36,"stargazers_count":35,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-02T17:36:31.416Z","etag":null,"topics":["gamemaker"],"latest_commit_sha":null,"homepage":"","language":"Game Maker Language","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YAL-GameMaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-10T00:25:09.000Z","updated_at":"2024-07-03T10:30:32.000Z","dependencies_parsed_at":"2024-01-03T04:08:03.338Z","dependency_job_id":"d0ea929c-94b3-4d92-8c96-3bb51d28cfa8","html_url":"https://github.com/YAL-GameMaker/pixel-perfect-smooth-camera","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/YAL-GameMaker%2Fpixel-perfect-smooth-camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAL-GameMaker%2Fpixel-perfect-smooth-camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAL-GameMaker%2Fpixel-perfect-smooth-camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAL-GameMaker%2Fpixel-perfect-smooth-camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YAL-GameMaker","download_url":"https://codeload.github.com/YAL-GameMaker/pixel-perfect-smooth-camera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700015,"owners_count":20819811,"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":["gamemaker"],"created_at":"2024-08-01T07:00:54.300Z","updated_at":"2025-04-01T19:30:33.503Z","avatar_url":"https://github.com/YAL-GameMaker.png","language":"Game Maker Language","funding_links":[],"categories":["Camera"],"sub_categories":["Recommendations"],"readme":"# Pixel-perfect smooth camera\n\nWhen designing traditional pixel-art games (in general and in GameMaker specifically), it is generally desirable to keep your camera pixel-perfect to avoid rotated pixels and reduce various other artifacts:\n\n![ppsc-1](https://user-images.githubusercontent.com/731492/101706746-77887580-3a92-11eb-9add-2a8d59bc1fb9.gif)\n\nThis, of course, comes with an unfortunate caveat: it can be very hard to make your camera movement look good - especially if small speeds and/or acceleration/deceleration are involved:\n\n![ppsc-2](https://user-images.githubusercontent.com/731492/101706719-650e3c00-3a92-11eb-996e-db442a774b89.gif)\n\nThis is a demonstration of an approach that allows you to escape this problem - by making the camera 1px wider and taller and having it draw to a surface, we are able to then offset this surface to make up for fractions in the camera coordinates:\n\n![ppsc-3](https://user-images.githubusercontent.com/731492/101706727-69d2f000-3a92-11eb-9c4b-10e3f93a061a.gif)\n\nAn alternate approach involves drawing a half-pixel (at the game's internal resolution) frame at the edges of the screen so that you can wiggle the game's default surface (`application_surface`) under it without making it apparent to the player.\n\n## Credits\n\n* Example by [YellowAfterlife](https://yal.cc)\n* Tileset and background taken from [\"Pixel Adventure\"](https://opengameart.org/content/pixel-adventure-1) by Pixel Frog\n* Inspired by Hyper Light Drifter camera  \n  (which likely uses the \"alternate approach\" described here)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYAL-GameMaker%2Fpixel-perfect-smooth-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYAL-GameMaker%2Fpixel-perfect-smooth-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYAL-GameMaker%2Fpixel-perfect-smooth-camera/lists"}