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.

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

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.

(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.