Difference between revisions of "Beginner C++ Game Programming Tutorial 5"
From Chilipedia
(→Download Links) |
(→Download Links) |
||
Line 21: | Line 21: | ||
== Download Links == | == Download Links == | ||
− | * [https:// | + | * [https://planetchili.net/downloads/apworks/5/Beginner%20Tutorial%205%20Code.zip Tutorial 5 Code] |
− | * [https:// | + | * [https://planetchili.net/downloads/apworks/5/Beginner%20Tutorial%205%20HW%20Code.zip Tutorial 5 Homework Solution Code] |
== See also == | == See also == | ||
* [[Beginner C++ Game Programming Tutorial 6|Next in series (Tutorial 6)]] | * [[Beginner C++ Game Programming Tutorial 6|Next in series (Tutorial 6)]] | ||
* [[Beginner C++ Game Programming Series]] | * [[Beginner C++ Game Programming Series]] |
Latest revision as of 12:55, 12 October 2019
Comparison and Boolean logic operators. Operators galore! Make if
statements great again! Let the int
dick measuring contests begin! Also, collision detection between rectangles, which is useful for stuff.
Concepts Taught
- Comparison operators (
>
,<
,==
,>=
,<=
,!=
) - Boolean operators (
&&
,||
,!
) - Using parentheses to change order of evaluation (effectively changing what an operator works on)
- Collision (overlap) detection of rectangular regions (in the homework)
Video Timestamp Index
- Intro 0:00
- A few remarks on drawing pixels outside window bounds 1:19
- Debug configuration, assertion failures 2:04
- Comparison operators 3:11
- Logical operators 12:41
- Homework 19:00
Homework
Draw two targeting boxes, one controlled with the arrow keys and one stationary, and have the color of the mobile targeting box change whenever the targeting boxes overlap.
The solution is given in this video.