Abstract
The extensions of the game Pong explore a fact that the number of sprites and their behaviors, as well as the complexity of the game could be dynamically changed during the game in execution. For example, the game Pong7 asks for two bouncing balls. What if a game asks for adding 10 or 100 sprites? We not only need new techniques but also require a stable software structure for accommodating these changes. Based on the inheritance, abstract class, abstract method, and polymorphism of OOP, a three-layer software structure is constructed as a template for developing video games in order to handle such requirements.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
[Meyer, B., 1998] Bertrand Meyer, “Object Oriented software Construction”, Prentice Hall, 1998.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Xu, Cw. (2018). A Three-Layer Software Structure for Games: A Game PongStruTwo. In: Learning Java with Games. Springer, Cham. https://doi.org/10.1007/978-3-319-72886-5_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-72886-5_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-72885-8
Online ISBN: 978-3-319-72886-5
eBook Packages: Computer ScienceComputer Science (R0)