Welcome to the second of a multi-part series:
Creating Animation and Games: Chapter 2 Game Controllers
This series will dive into using Propeller microcontroller based systems to create your own graphics, animation, and video games. I'll assume that you only have a very basic knowledge of microcontroller programming and take you step-by-step from beginning with a single dot to the creation of several video games which will provide you great examples for getting started with your own ideas.
If you haven't read the previous chapter, go back and review it first with the link above then continue with this Chapter.
In the last chapter we introduced you to a few hardware options, introduced you to the Spin programming language, the Propeller Tool, and got you started working with the basics of the SLUG video driver for the Propeller.
This time we are going to take a look at game controllers and how to implement them into your game creation. Specifically, we'll be using the Wii controller connection (found on Propellerpowered VGAplus, VGAplus256, and Quickplayer Extreme products) and the PS/2 Keyboard. (found on VGAplus, Parallax Demoboard, and Human Interface Board) The game controller driver we are using actually supports several other possible controllers including NES, Parallax C3 NES, and N64 controllers without changing more than a single line of code,
By the end of this chapter, you should have a better understand of several Spin programming concepts as well establish the beginning of a simple game.
Let's jump right in!
First download the source code
for this Chapter and extract it to a new empty folder. We'll be working from that folder.