Chapter 7 of Beginning Game Programming teaches developers how to handle player input using a game controller.

This example creates a UFO that the player can fly around with either the D-Pad or Left thumbstick on a controller. The player can also press the A button (or equivalent) to instantly warp to a random spot on the screen.

Please note, this game has only been found to work with controllers in the Chrome Browser. Firefox currently does not work. You can use the keyboard in Firefox. WASD to move, SPACE to warp.

PlatformsLinux, HTML5
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorE. Zachary Knight
Made withOpenFL
Tagsdemo, haxeflixel, html


Download NowName your own price

Click download now to get access to the following files: 10 MB 19 kB


Log in with to leave a comment.

(1 edit)

I looked at the engine you used : Openfl. is it drag and drop engine or you have to know a language to make a game ?

Hey, didn't see this question. I had been away for a while. Openfl is a programming library for the Haxe Programing language. The game engine I use, HaxeFlixel is built on the features of OpenFl that allow for cross platform game development.