October 2016
Beginner
520 pages
10h 19m
English
One of the problems that has been quite pronounced in both projects so far is how long and unwieldy the code gets. OOP allows us to break our projects up into logical and manageable chunks called classes.
We will make a big improvement to the manageability of the code in this project with the introduction of an Engine class. Among other functions, the Engine class will have three private functions. They are input, update, and draw. This should sound very familiar. Each of these functions will hold a chunk of the code that was previously all in the main function. Each of these functions will be in a code file of its own, Input.cpp, Update.cpp, and Draw.cpp respectively.
There will also be one public function in ...
Read now
Unlock full access