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

From Chilipedia
Jump to: navigation, search
(Homework)
Line 2: Line 2:
  
 
== Concepts Taught ==
 
== Concepts Taught ==
* <code>while</code> loop
+
* References
* <code>for</code> loop
+
* Passing by reference
* <code>do</code> ... <code>while</code> loop
+
* Const correctness (redux)
* Preincrement <code>++x</code> and postincrement <code>x++</code> operators
+
  
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==
Line 11: Line 10:
  
 
== Homework ==
 
== Homework ==
# Write a routine to draw a rectangle on the screen.
+
# Move the drawing code for Dude from Game into the Dude class.
# Make it so that you can control the position of the rectangle with the arrow keys and the size of the rectangle with the WASD keys. For info on querying keyboard input for alphanumeric keys, see the section "Virtual Key Codes" on [[Keyboard (Chili Framework)#Virtual_Key_Codes|this page]].
+
# Make a second DrawRect function that takes a single point (top left corner) and the dimensions as parameters.
  
 
The solution is given in a future video.
 
The solution is given in a future video.
Line 22: Line 21:
 
== See also ==
 
== See also ==
 
* [https://www.patreon.com/planetchili Planet Chili Patreon]
 
* [https://www.patreon.com/planetchili Planet Chili Patreon]
* [[Beginner C++ Game Programming Tutorial 11|Next in series (Tutorial 11)]]
+
* [[Beginner C++ Game Programming Tutorial 12|Next in series (Tutorial 12)]]
 
* [[Beginner C++ Game Programming Series]]
 
* [[Beginner C++ Game Programming Series]]

Revision as of 12:48, 20 October 2016

In this video we learn how to loop our shit. Fuckoff copy and paste. Die in a gasoline fire (just kidding, don't leave me baby!)

Concepts Taught

  • References
  • Passing by reference
  • Const correctness (redux)

Video Timestamp Index

Coming soon!

Homework

  1. Move the drawing code for Dude from Game into the Dude class.
  2. Make a second DrawRect function that takes a single point (top left corner) and the dimensions as parameters.

The solution is given in a future video.

Downloads

See also