Summary

In this chapter, we learned the Entity Component System model for managing the entities in order to populate our world with NPCs. We learned how to implement collision detection with these entities and also how to implement logic to make the NPCs selectable by the player via mouse picking. We also learned how these NPC characters can spawn from certain points on the map (spawn points) specified in their JSON property file and move around on the map on their own (basic AI). As part of this chapter, we also refactored the MapManager class in order to give us the flexibility to generate map-specific entities and events.

In the next chapter, we will begin to look at GUI development including inventory and HUD layouts with skins. We will also ...

Get Mastering LibGDX Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.