ABSTRACT

Static, singletons, and game managers are all tools to help keep artists code under control. They help create reusable systems—things that artists want to be available to them in multiple levels, and throughout their game. The designation static means that this no longer belongs to any one instance of artists RobotFriend, but rather with the RobotFriend class as a whole and is shared amongst all RobotFriend objects regardless of when they are created. Static methods can accept input parameters, change static variables, and return values. A singleton is used to create a class that can only have one instance at a time. It is useful for things like keeping track of information needed in multiple levels or running music in a game. Game managers are a kind of singleton that artists use in games. They are a game programming design pattern used to create an object to manage state, functionality, and information across levels.