In this tutorial we will give you an example of how to use classes to define extensible datatypes that help you better organize your code in a game project. For the sake of simplicity the game in question is a basic pong-like game where you move a green "paddle" with the mouse trying to keep the red ball in the playfield.