Skip to main content

The LibGDX Framework

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

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.

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

Access this chapter

eBook
USD 16.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.

    Running faster than this is usually unnecessary, because most computer display hardware is incapable of displaying images at a greater rate than this.

  2. 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. 3.

    The source code for LibGDX is currently hosted on GitHub at https://github.com/libgdx/libgdx .

  4. 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. 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

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). 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

Publish with us

Policies and ethics