Skip to main content

Organizing Game Objects

  • Chapter
Learning C# by Programming Games

Abstract

In this chapter, we are going to look at the similarities between the different types of game object, and how we can express these similarities in C#. The main technique used for this is inheritance. Inheritance is a technique that is used to structure related classes in a hierarchy. We will show how to override methods in a subclass to provide specific behavior for that class. We will deal with access modifiers for class members. We will also introduce the concept of polymorphism, which allows calling the right version of a method automatically.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Egges, A., Fokker, J.D., Overmars, M.H. (2013). Organizing Game Objects. In: Learning C# by Programming Games. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36580-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36580-5_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-36579-9

  • Online ISBN: 978-3-642-36580-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics