I Rework My Resolution Code For The Thousandth Time

I Rework My Resolution Code For The Thousandth Time

Subscribers:
6
Published on ● Video Link: https://www.youtube.com/watch?v=4VvKqHy3AWs



Duration: 3:05
20 views
1


When I first started putting res code in my project, I was only intending to support 3 aspect ratios - 16:9, 21:9, and 32:9. They're the most common, and frankly, the easiest to figure out the math on.
But no, I wanted to have everything! 4:3. 16:10, 1:1 (Do these even exist?), and the original Gameboy, just because. I'm aware there are some resolutions that I've missed, but at this point really don't care.
Oh, and portrait modes; 9:16, 9:21. and 9:32. Nothing can ever be easy.

So, I changed how my script calculates things, ideally, it will use the monitor's height to determine the game window's smallest width and height, as well as the camera's dimensions, by dividing the monitor's height by some arbitrary number. I do the camera and window separately because I like the camera to be zoomed out, while the GUI is the same size as the window (fullscreen).

Since the GUI matches the monitor's width and height, this had an unforeseen side effect when using 4K monitors - which I am all for. The massive zoom out is nice, but then I felt I had to give the player's an option for zooming the camera in and out, which I did.
I also discovered that the code for my camera object is so old that I've been destroying it and recreating it every room because doing that solved a problem back in GM1.

Also, managed to get the mouse to interact with every menu in the game currently - such a pain.




Other Videos By Ji'aska Coding


2020-09-04GM2: Ideal Base
2020-06-20Key Remap WIP
2020-06-19I Rework My Resolution Code For The Thousandth Time
2020-06-06Menu Rework
2020-04-26Skyrim: Death Hound Family Pet
2020-04-24Skyrim: A Sin
2020-03-21New Art 2
2020-03-12New Art 1
2020-03-10Weird Screen Tearing
2020-03-06Random Update
2020-03-05Stupid Res Check
2020-03-04Player UI
2020-02-28Return Res
2020-02-27Glitchy Co op Camera
2020-02-26Enemy WIP 3: Projectiles and Switches
2020-02-19Enemy WIP 2
2020-02-18Enemy WIP
2020-02-06Day Cycle Update
2020-02-06Day and Cycle
2020-01-26Everything So Far
2019-12-24Main Menu WIP



Tags:
Games Design
Game Maker
Game Maker 2
Resolution
16:9
21:9
32:9
16:10
4:3
1:1
Gameboy
Camera Zoom
4K Support