Banner

Applying Window sizes

Posted on 2023-10-22 07:08:00
Deciding on the window resolution and its size is an important factor in creating games. Here is a small tutorial on how you can switch between landscape and portrait modes.

For this, we take the view_width and view_height and work out the aspect-ratio of the window. Basically this is the ratio of its width to its height. For example, landscape mode has an aspect ratio of 16:9 as depicted in monitors and Tvs, wheras portrait mode has a ratio of 4:3 as depicted in phones and mobile devices.

Comments
No comments have been posted, yet. Log in to post comments.