Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering LibGDX Game Development

You're reading from   Mastering LibGDX Game Development Leverage the power of LibGDX to create a fully functional, customizable RPG game for your own commercial title

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785289361
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Patrick Hoey Patrick Hoey
Author Profile Icon Patrick Hoey
Patrick Hoey
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. As the Prophecy Foretold, a Hero is Born 2. Welcome to the Land of BludBourne FREE CHAPTER 3. It's Pretty Lonely in BludBourne… 4. Where Do I Put My Stuff? 5. Time to Breathe Some Life into This Town 6. So Many Quests, So Little Time… 7. Time to Show These Monsters Who's the Boss 8. Oh, No! Looks Like Drama! 9. Time to Set the Mood 10. Prophecy Fulfilled, Our Hero Awaits the Next Adventure Index

Implementing map management with spawn points and a portal system

The next class represented in our top-level class diagram is MapManager, which can be found at core/src/com/packtpub/libgdx/bludbourne/MapManager.java. This class has helper methods for loading the TiledMap maps, as well as methods for accessing the different MapLayer, and MapObject objects in the layers.

MapManager

A class diagram that outlines the different attributes and helper methods is represented by the following diagram (Figure 10):

MapManager

Figure 10

The import classes are as follows:

package com.packtpub.libgdx.bludbourne;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.maps.MapLayer;
import com.badlogic.gdx.maps.MapObject;
import com.badlogic.gdx.maps.objects.RectangleMapObject;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.math.*;

import java.util.Hashtable;

We are going to be using TiledMap (TMX format) maps that will then be rendered to a Screen instance using the OrthogonalTiledMapRenderer class...

You have been reading a chapter from
Mastering LibGDX Game Development
Published in: Nov 2015
Publisher:
ISBN-13: 9781785289361
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime