O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

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

Joystick Commands

What do all gaming consoles have in common? A controller! From the Atari 2600 to the modern PC, the joystick (or controller) is the preferred input device for most video games. (Anyone who prefers W-A-S-D on a keyboard is delusional.) DB has a good selection of commands to control the joystick.

Analog versus Digital Input

Before you go on into the wonderful world of DB joystick commands, you need a little understanding of how a joystick works. There are two different types of joysticks—digital and analog. Each type works with a PC, but they generate the data in completely different ways.

An analog joystick is like most old-school mouse devices. It consists of two rollers that, when moved, calculate the distance that they are ...

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