Difference between revisions of "Beginner C++ Game Programming Tutorial 5"
From Chilipedia
(→Homework) |
(→Concepts Taught) |
||
Line 5: | Line 5: | ||
* Boolean operators (<code>&&</code>, <code>||</code>, <code>!</code>) | * Boolean operators (<code>&&</code>, <code>||</code>, <code>!</code>) | ||
* Using parentheses to change order of evaluation (effectively changing what an operator works on) | * Using parentheses to change order of evaluation (effectively changing what an operator works on) | ||
+ | * Collision (overlap) detection of rectangular regions | ||
== Video Timestamp Index == | == Video Timestamp Index == |
Revision as of 13:42, 13 July 2017
Comparison and Boolean logic operators. Operators galore! Make if
statements great again! Let the int
dick measuring contests begin!
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
Video Timestamp Index
Coming soon!
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.