Chapter 2. Building a New Game

In this chapter, we're going to start building our game. We'll start by exploring some of the fundamental Haxe syntaxes that we'll be using. After this, we'll make a new HaxeFlixel project, make a few changes, and work on getting some simple gameplay in place that will serve as the base to build on.

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

  • The Haxe syntax
  • Setting up a new HaxeFlixel project
  • Adding the background and basic UI
  • Making enemies
  • Instantiating enemies and adding interaction
  • Creating the end screen
  • Restarting the level
  • Implementing the game timer

The Haxe syntax

Haxe is a very easy language to learn, so we'll be go over the basic syntax now and build on what we know as the book progresses.

At its core, Haxe ...

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.