Object Oriented Game Development – Part 3
January 17, 2012 in C++, Code, Game Dev, OOP Game Dev, Projects, Tutorial
This post is a portion of my mini-series on Object Oriented Game Development using the Allegro 5 library. You can see all of the posts by going to http://fixbyproximity.com and clicking the “OOP Game Development” button at the top of this site.
Full Game Source Here
Videos in the Series:
- Object Oriented Game Development – Intro
- Object Oriented Game Development – Part 1
- Object Oriented Game Development – Part 2
- Object Oriented Game Development – Part 3
- Object Oriented Game Development – Part 4
- Object Oriented Game Development – Part 5
- Object Oriented Game Development – Part 6
- Object Oriented Game Development – Part 7
- Object Oriented Game Development – Part 8
Thanks mike for your vids, I love them!
But i have a question. Why do you use the init function instead of a second constructor that initializes the attributes of the class.
A second constructor would have required me to rebuilt the object as a brand new object. I could have deleted the old object and then set the new one, but I would have had to pass in the image again anyway as it would not have remembered the image from the previous object.
Thanks for your answer.
All i wanted to say is that we would use only one constractor that would also initialize the attributes with the one given by us.
Nevermind, after watching your vid for a second time, i found out that at start we cant load the image so thats why we use the init.