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.

Download

Download NowName your own price

Click download now to get access to the following files:

BGP_CH_7_Linux.zip 10 MB
BGP_CH_7_Source.zip 19 kB

Comments

Log in with itch.io to leave a comment.

Deleted 97 days ago

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.