Explaining the ratio formula and obtaining the proper camera screen space

In the lecture around 6:30, Ben explains the camera size is 7.5 units, but he needs to figure out the proper camera size so it fits around the image (800x600)…

I get that the camera size is the distance from the center to the edge, so the true play area is 15 units (7.5 camera x 2)

He begins to explain the play space is 16 units, (where there was 16 bricks and each brick was 1 unit as explained in a previous lecture)

and the aspect ratio is 4:3 so we need to figure out how high it is.

Here is the part I’m having trouble figuring out how he got the formula:
16/4 * 3

We want to divide our games play area, 16 by 4, which is the height ratio, and then multiplly it by 3 which is the width ratio…

What is the logic behind this? Is there a page or link somewhere that can help explain more screen ratio conversions? I would really like to understand this on a fundamental level. Thanks in advance!

-Steve Macintyre

1 Like

I forget which lecture it is, but there is one with a blackboard style slide and Ben goes through some examples and math on how this is calculated.

I’ll see if I can find the lecture number for you…


Updated Tue Apr 10 2018 10:22

Hi Steve, found it. The lecture I was referring to actually comes later in the course, but it may be worth just watching this one now if you have an interest and then jumping back.

It’s section 7, lecture 144 “Ratio Math Primer”.

It’s geared around the Glitch Garden game the content is relevant to your question.

Hope this helps :slight_smile:

3 Likes

Oh, awesome! Thanks! That will help immensely, much appreciated!

2 Likes

No problem :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms