Book Image

Mastering LibGDX Game Development

By : Patrick Hoey
Book Image

Mastering LibGDX Game Development

By: Patrick Hoey

Overview of this book

Table of Contents (18 chapters)
Mastering LibGDX Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

LevelTable


While completing quests that we learned to implement in Chapter 6, So Many Quests, So Little Time…, and defeating legions of monsters on the battle field, the player will receive experience points for helping out the local NPCs and making BludBourne a better place overall. For the purposes of this chapter, a simple leveling system was developed to reward and communicate to the player that they are in fact progressing as their character develops.

The first part for handling the leveling is to develop the attributes that will change according to the different levels. LevelTable is a POJO class that represents all of these attributes for a level, including all the accessor methods. The following class diagram (Figure 10) represents the LevelTable class (which can be found at core\src\com\packtpub\libgdx\ bludbourne\battle\LevelTable.java):

Figure 10

The primary attributes that we care about for BludBourne, and which could be easily extended by you for your game, are the current level...