Summary


This chapter demonstrated that inheritance is a valuable tool for game programmers. It saves you a huge amount of work as you write games by enabling you to reuse your code. In addition, inheritance lets you customize code that someone else providesas is the case with LlamaWorks2D. With inheritance, you save yourself a lot of effort by extending the game class I provide rather than writing one from scratch. You're being "successfully lazy" by "working smarter, not harder."

As you'll see in the next chapter, LlamaWorks2D makes heavy use of inheritance. In fact, without an understanding of inheritance, you really can't use LlamaWorks2D effectively. But now that you've seen inheritance in action, you're ready to start using LlamaWorks2D to write games. That's the subject of chapter 7.



Creating Games in C++(c) A Step-by-Step Guide
Creating Games in C++: A Step-by-Step Guide
ISBN: 0735714347
EAN: 2147483647
Year: N/A
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net