O'Reilly logo

Haxe Game Development Essentials by Jeremy McCurdy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the splash screen

Let's make the first screen that players will see when the game starts. Since it is the first thing they see, we'll add some small touches that will help get players excited about playing the game. We'll add the background image with our main character, pogo, and the star graphic that will go behind it, and some text instructions to prompt players to continue the game.

We'll animate these things on screen in a very simple sequence using some tools that HaxeFlixel provides to improve the feel of games. We'll also add an old-school blinking effect to our input prompt.

Adding imports

To start, open MenuState.hx and add these import statements:

import flixel.util.FlxColor; import flixel.effects.FlxFlicker; import flixel.tweens.FlxTween; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required