Skip to main content

Extending the Framework

  • Chapter
  • First Online:
Java Game Development with LibGDX
  • 1968 Accesses

Abstract

In the previous chapter, you learned about some of the basic features and classes available in LibGDX and created a game called Starfish Collector. You also practiced good software development habits by gathering code that supports commonly needed functionality into a class named ActorBeta (which extends the LibGDX Actor class). However, the Starfish Collector game is still “rough around the edges”; some of the shortcomings of the version from the previous chapter include:

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Notes

  1. 1.

    Throughout this section, we are assuming that movement is on a flat, two-dimensional surface. If movement were occurring in three-dimensional space, then three values would be required to specify position and velocity.

  2. 2.

    Although LibGDX contains an Ellipse class, there are no classes or methods in LibGDX that perform collision detection with ellipse shapes; however, Polygon objects do have such functionality available.

  3. 3.

    The interval extends from 0 to 6.28 because mathematical functions typically use radian measure for angles rather than degree measure. 6.28 radians roughly corresponds to 360 degrees, which represents a full rotation around the origin, which we need when calculating the values of points all the way around the ellipse.

  4. 4.

    This method (and the one that follows) will be defined as static because there is no reason to call it from an instance of a BaseActor.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Lee Stemkoski

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Stemkoski, L. (2018). Extending the Framework. In: Java Game Development with LibGDX. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3324-5_3

Download citation

Publish with us

Policies and ethics