Difference between revisions of "Beginner C++ Game Programming Tutorial 7"
(→Solution Errata) |
(→Video Timestamp Index) |
||
Line 9: | Line 9: | ||
== Video Timestamp Index == | == Video Timestamp Index == | ||
− | + | * Intro [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=0m0s 0:00] | |
+ | * Introducing the Debugger [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=0m31s 0:31] | ||
+ | * Setting up the debugger [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=1m41s 1:41] | ||
+ | * Running in debug mode [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=2m25s 2:25] | ||
+ | * The call stack [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=2m45s 2:45] | ||
+ | * Finding debug windows [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=3m17s 3:17] | ||
+ | * Release vs Debug mode: assertions [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=3m50s 3:50] | ||
+ | * Autos [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=4m56s 4:56] | ||
+ | * Debugging second solution: setting your own breakpoints, stepping over and stepping into [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=6m38s 6:38] | ||
+ | * Locals [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=9m30s 9:30] | ||
+ | * Step out [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=10m39s 10:39] | ||
+ | * Continue [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=11m33s 11:33] | ||
+ | * Advice from Chili [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=12m10s 12:10] | ||
+ | * Chili's Dank Meta Nugs [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=12m45s 12:45] | ||
+ | * Homework [https://www.youtube.com/watch?v=h2l2D0ud7DY&t=16m35s 16:35] | ||
== Homework == | == Homework == |
Revision as of 08:10, 24 September 2019
Mr. DeBugger is a real sir.
Contents
Concepts Taught
- Using the Visual Studio debugger
Chili's Dank Meta Nugs
- Don't binge watch the tutorials--space that shit out
- Practice and experiment with C++ on your own initiative
Video Timestamp Index
- Intro 0:00
- Introducing the Debugger 0:31
- Setting up the debugger 1:41
- Running in debug mode 2:25
- The call stack 2:45
- Finding debug windows 3:17
- Release vs Debug mode: assertions 3:50
- Autos 4:56
- Debugging second solution: setting your own breakpoints, stepping over and stepping into 6:38
- Locals 9:30
- Step out 10:39
- Continue 11:33
- Advice from Chili 12:10
- Chili's Dank Meta Nugs 12:45
- Homework 16:35
Homework
There are three problems to solve in three separate solutions. The solutions are all based on the code used in the tutorial video (the code from the Tutorial 6 homework) Download the zip of the solutions below in the Downloads section.
- Assertion fails! Find the bug! Also, there's another bug hiding if you solve the first one. Try making the boxes collide and see what happens (or what doesn't happen...). Note that I don't talk about this second bug in the solution video. Check out the Solution Errata below for the answer.
- Assertion fails! Find the bug!
- Moving the cursor to the bottom of the screen is bad news bears...
The solution is given in this video.
Solution Errata
Read the below (click Expand) only after attempting the problem yourself.
In the solution video, we see that the bug in the second homework problem is actually the same bug as in the tutorial video. The reason for this is that Chili fucked up and put the bug he intended to go in the second problem into the first problem. So the first problem has two bugs, and the second problem only has the bug from the tutorial.
Now the bug in the second problem is something that Chili has mentioned before. It is a mix-up between the =
and ==
operators. Specifically, it is as follows (error on line 64 of Game.cpp):
colliding ==
OverlapTest( x_fixed0,y_fixed0,x_mobile,y_mobile ) ||
OverlapTest( x_fixed1,y_fixed1,x_mobile,y_mobile ) ||
OverlapTest( x_fixed2,y_fixed2,x_mobile,y_mobile ) ||
OverlapTest( x_fixed3,y_fixed3,x_mobile,y_mobile );