Game Developers Diary 3: Getting in Control

In the last chapter we created a pretty cool scene with movement and sound.

Today we will take a look at the most important UI interface for games ever: Controls. Until now, our scene was pretty static, with the camera flying around wildly on a kind of weird, prescripted path.

Let’s implement some controls, to steer the camera on a spherical path around the main cube. Imagine a sphere around the cube and the camera as a kind of bubble on the outside of that sphere; always looking into the center. The user can choose to fling the camera-bubble along the latitude and longitude of this imaginary sphere, as well as shrink or grow the sphere itself (make the radius closer or wider).

We want to end up with a program, where the user is able to control the scene via a Gamepad, the keyboard or the mouse as he chooses.
Continue reading