News for hackers. Stuff that matters.
Re:I still use Flash in 2022 by rogual on Wednesday December 21, 2022 @10:55AM (#34082303)
I can't know ahead of time the exact aspect ratio the player will run the game at. 16:9 and 16:10 are the most common on today's monitors, but the game might be running in a window, or fullscreen on an unusual monitor.

If I just made the game at a fixed 16:9 ratio, it'd leave empty space at the edges of any window that isn't exactly 16:9. Same if I chose 16:10 or any fixed aspect ratio.

By supporting a range of ratios between 16:9 and 16:10, I maximize the number of window sizes that the game will display nicely in without any empty space (black bars) at the sides.

The best way, I thought, to support a range of aspect ratios was to define two rectangles in the scene, having the minimum and maximum ratios supported, and interpolate the camera rectangle between them.

Hope that makes sense!

Re:I still use Flash in 2022 by RulerOf on Wednesday December 21, 2022 @12:55PM (#34084019)
I really appreciated the visualization you provided for that.