Difference between revisions of "Intermediate C++ Game Programming Tutorial 5"
(→Source Code) |
|||
Line 12: | Line 12: | ||
[https://github.com/planetchili/intlo GitHub Repo for tutorial]<br /> | [https://github.com/planetchili/intlo GitHub Repo for tutorial]<br /> | ||
[https://github.com/planetchili/Memesweeper GitHub Repo for homework (Memesweeper)] | [https://github.com/planetchili/Memesweeper GitHub Repo for homework (Memesweeper)] | ||
+ | |||
+ | == Downloads == | ||
+ | [http://www.gutenberg.org/files/2600/2600-0.txt War and Peace] | ||
+ | [http://www.gutenberg.org/ebooks/5348.txt.utf-8 Ragged Dick] | ||
== Homework == | == Homework == |
Revision as of 14:02, 24 June 2017
In this video we learn about dynamic memory allocation / heap allocation / free store allocation / whatever the fuck you wanna call it. What is this shit you ask? Watch the goddamn video! I gotta pack.
Topics Covered
- The three storage classes: automatic, static, and dynamic
- Allocating and freeing memory for objects/variables with
new
anddelete
- Allocating and freeing memory for arrays with
new []
anddelete []
Video Timestamp Index
Source Code
GitHub Repo for tutorial
GitHub Repo for homework (Memesweeper)
Downloads
Homework
Modify Memesweeper so that the array for the field is dynamically allocated depending on play field selection by the user at the beginning of the game. After a game over, the game should be able to return to the menu so that the user can play again without restarting the application.
A menu system and UI has already been implemented for you, all you need to do is figure out how to handle the output from the menu, and then modify the game engine to use dynamic allocation and to reset the field after every game.