Difference between revisions of "Beginner C++ Game Programming Tutorial 5"

From Chilipedia
Jump to: navigation, search
(Video Timestamp Index)
Line 8: Line 8:
  
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==
* Intro [https://youtu.be/UREKHWvg9ko&t=0m0s 0:00]
+
* Intro [https://www.youtube.com/watch?v=UREKHWvg9ko&t=0m0s 0:00]
* A few remarks on drawing pixels outside window bounds [https://youtu.be/UREKHWvg9ko&t=1m19s 1:19]
+
* A few remarks on drawing pixels outside window bounds [https://www.youtube.com/watch?v=UREKHWvg9ko&t=1m19s 1:19]
* Debug configuration, assertion failures [https://youtu.be/UREKHWvg9ko&t=2m4s 2:04]
+
* Debug configuration, assertion failures [https://www.youtube.com/watch?v=UREKHWvg9ko&t=2m4s 2:04]
* Comparison operators [https://youtu.be/UREKHWvg9ko&t=3m11s 3:11]
+
* Comparison operators [https://www.youtube.com/watch?v=UREKHWvg9ko&t=3m11s 3:11]
* Logical operators [https://youtu.be/UREKHWvg9ko&t=12m41s 12:41]
+
* Logical operators [https://www.youtube.com/watch?v=UREKHWvg9ko&t=12m41s 12:41]
* Homework [https://youtu.be/UREKHWvg9ko&t=19m0s 19:00]
+
* Homework [https://www.youtube.com/watch?v=UREKHWvg9ko&t=19m0s 19:00]
  
 
== Homework ==
 
== Homework ==

Revision as of 23:37, 22 September 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.

Download Links

See also