2/17/08

SceneCamera class nears completion

Here is a video demonstrating the features of the SceneCamera class as it nears completion:


direct link

All SceneCameras will by default perform a translation of the subject (e.g., follow it's X/Y position), and all SceneCameras have the ability to scale (zoom in/out). In addition to these two default behaviors there are two optional properties to specify camera style.

Rotate with subject: If this property is True, it causes the SceneCamera to lock rotation with its subject. This creates a camera style whereby the subject appears fixed and the entire Scene rotates. In the video, the SceneCamera on the right side rotates with it's subject. The SceneCamera on the left side has this property set to False, creating an opposite effect (the Scene appears fixed and the subject rotates).

Clamp to Scene: If this property is True, the SceneCamera is not permitted to exit the perimeter of the Scene. In the video, the left side has this property set to True, and it is False on the right side.

Finally, there is a 3rd SceneCamera moving around the perimeter of the Screen to demonstrate the "game object" nature of SceneCameras. Like a Sprite, a SceneCamera can easily be any size, and can move around the Screen without disturbing it's ability to view a subject.

What I will be adding next is a property for Chase lag, so the SceneCamera can be given a variable amount of imprecision when following its subject. Once this is done, the SceneCamera class should be adequately functional.