This page goes with my game blog here: http://abbergames.blogspot.com/. These are the individual pieces to my game framework.
The Animation interface is the base
for all animation types. I have an AnimatedFrame which stores how long that
frame should be displayed. Also you will find an AnimationFactory which takes
the grunt work and builds an Animation for you. Java
animation source files.
The Motion interface is the base for all motion types. The
motion framework is simplier than the animation. You will find a MotionFactory
which takes the grunt work of building a motion with it's animations. Java motion source
The Sprite is the base of the sprite framework. There is a BaseActor which implements a very basic sprite, giving one a starting point for building their own sprites. There is also a SpriteFactory which creates either a Decor or Actor. The user will need to add motions to the Actor. Java sprite source files.
The Movement interface is the base for
all Movement types. The movement framework is has some basic movement
classes defined. A time base movement, that the sprites movement is
based on the the time in the game. A key input movement, where movement
is from key inputs, and a mouse movement. This also contains the ToTileMovement.
Java movement source files.
The ToTile Test app can be downloaded Here.
The InputMonitor is the center of the framework. It receives all input from either the AWTEvent or the Component. Most of my code uses the Component for the bases of the input. This allows the coordinates to match with the visual output. Such as a panel (canvas) within a frame. The component would be the panel (canvas), not the frame. Java input source files.
The GameMap is an abstract class that contains all the sprites and map layout. It delegates the update to the sprites, and rendering to the rendering classes. The MapRenderer is an interface and the base for all rendering classes. It contains the screen size any background elements that are excluded from the map, such as a solid black color. Java Map and Renderering source files.
The GameTimer is an abstract class and ment to be created as an anonymous inner class within the game frame (or canvas). The frame holds the map and links the input manger to the sprites and map. Java frame and timer source files.
The GameComponent is the base class
for the components framework. It extends the Sprite class, giving it a draw
method. Any Font based text is stored in the GameText class, which handles
calculations for its size. The GameComponent has code to handle alignment
for it, both vertically and horizontally. Game Components
Updated Game Components source files
The Sound is the interface for all types of sound elements. It requires an Audio, with is a wrapper of the basic java sound class. The Audio class encapsulates the basic sounds down to a play, stop, pause and resume. methods that are used by the sound classes. The AudioFactory simplifies the loading of sounds and returning an Audio file to be used with the Sound classes. The sound class are for more broad features, from simply playing the sound once, playing a random sound to looping the sound over and over. Additional Sound can be created by extending the BaseSound class, which give basic features. Sound source files