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

The battle system implementation


There are many moving parts in implementing a battle system for an RPG, but we will walk through the implementation step by step, starting with a high-level overview of the relationships between the new classes for this chapter and delving into specific details when warranted.

We will start with the following screenshot (Figure 1), which represents the battle screen when a player encounters a monster in BludBourne:

Figure 1

The classes that make this interaction from Figure 1 happen are outlined in this chapter, taking you step by step in its implementation. There are some extra features, such as consuming health potions, which are discussed in further detail as well. The following class diagram (Figure 2) represents the relationships between the new classes for the implementation of our battle system:

Figure 2

The grey-colored classes represent classes that we have already discussed in the previous chapters, and are added to fully describe the relationships with...