Chapter 6. Working with Configuration Files

In this chapter, we're going to use a JSON configuration file to give enemies unique movement patterns and use an XML file to make our user interface text easily changeable. Adding movement patterns to enemies will make the game feel fairer to players instead of being purely random. This will also give us a way to easily add new content to the game without writing new code.

These two changes will also make the game updates and changes more accessible, allowing people who aren't programmers to work directly on the game.

Here's a rundown of the sections in this chapter:

  • JSON versus XML
  • Project updates
  • Understanding the JSON configuration file
  • Building the enemy spawner
  • Adding movement patterns to enemies
  • Updating ...

Get Haxe Game Development Essentials 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.