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

From Chilipedia
Jump to: navigation, search
(Download Links)
 
Line 23: Line 23:
  
 
== Download Links ==
 
== Download Links ==
* [https://wiki.planetchili.net/ Tutorial 6 Code] (WORK IN PROGRESS)
+
* [https://planetchili.net/downloads/apworks/6/Beginner%20Tutorial%206%20Code.zip Tutorial 6 Code]
* [https://wiki.planetchili.net/ Tutorial 6 Homework Solution Code] (WORK IN PROGRESS)
+
* [https://planetchili.net/downloads/apworks/6/Beginner%20Tutorial%206%20HW%20Code.zip Tutorial 6 Homework Solution Code]
  
 
== See also ==
 
== See also ==
 
* [[Beginner C++ Game Programming Tutorial 7|Next in series (Tutorial 7)]]
 
* [[Beginner C++ Game Programming Tutorial 7|Next in series (Tutorial 7)]]
 
* [[Beginner C++ Game Programming Series]]
 
* [[Beginner C++ Game Programming Series]]

Latest revision as of 12:56, 12 October 2019

How to make member functions. That is all.

Concepts Taught

  • Declaring and defining member functions
  • Function return values

Video Timestamp Index

  • Intro 0:00
  • Current code recap 0:26
  • Making our first function (very emotional moment) 1:18
  • Refactoring, making our function more versatile, function parameters 4:46
  • Revisiting collision test code because of all the touching 8:21
  • More refactoring, collision function 9:20
  • More boxes 14:17
  • Homework 16:57

Homework

There are two levels of difficulty.

  1. Create a function(s) to limit the targeting box to within the screen drawing region.
  2. Same as above, but you are not allowed to use the x_mobile and y_mobile member variables directly in the bodies of the functions.

The solution is given in this video.

Download Links

See also