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:
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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.
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.
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.
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
Rights and permissions
Copyright information
© 2018 Lee Stemkoski
About this chapter
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
DOI: https://doi.org/10.1007/978-1-4842-3324-5_3
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3323-8
Online ISBN: 978-1-4842-3324-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)