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