Abstract
This chapter will introduce many of the major features of the LibGDX library. It will illustrate how to use them in the process of creating a game called Starfish Collector , where you help the player’s character, a turtle, swim around the ocean floor while looking for a starfish. A screenshot of this game in action appears in Figure 2-1. At first, you will create a basic, functional game. Following a motivational discussion of object-oriented design principles, you will rewrite parts of this project using some of the LibGDX classes to improve the organization of the code. Future chapters will revisit this example and use it as a basis to introduce new game-design principles and features of LibGDX.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Running faster than this is usually unnecessary, because most computer display hardware is incapable of displaying images at a greater rate than this.
- 2.
A later section in this chapter will demonstrate how to organize code more intuitively so that the update and render stages are handled by separate methods.
- 3.
The source code for LibGDX is currently hosted on GitHub at https://github.com/libgdx/libgdx .
- 4.
The design choice to have y increase toward the top, while consistent with mathematical conventions, is the opposite of most computer science coordinate-system conventions, which place the origin point (0,0) at the top-left corner of a window so that the y value increases toward the bottom.
- 5.
Technically, if your program features a background graphic that covers the entire screen area, then this step is not necessary.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Lee Stemkoski
About this chapter
Cite this chapter
Stemkoski, L. (2018). The LibGDX Framework. In: Java Game Development with LibGDX. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3324-5_2
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3324-5_2
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)