PyGame window implementation.
Base window class.
Initialises PyGame, Creates a window, Runs a game loop which calls the update function of the derived class and presents the graphics to the window.
The Game class.
This is a window initialised with the a fixed temporary width and height and not full-screened. The start state is currently MainState as this is all we care about at this stage.
Later the state will be the very first part of the game, e.g. splash screen or menu.
When update is called on the state it will run a frame of that state and return either itself or when it is finished, either the next state to run or None.
A simple Input singleton.
It stores the current and last keys and can be queried to find whether a key is: up, down, just up, or just down.
Message system.
This was created to simplify communication between game objects. This is needed because communication will have to work over a network, the game world will exist on a server so a player will have to message the world for example to chop a tree down. It could tell the local tree object that it is chopping it down but perhaps another player has already chopped it down and the server hasn't told this client yet. The local tree would then tell the server to add chopped wood to the world making too much wood. this message system means a player would send a message "chop, xy" where xy is it's location. the server would see if a tree is at xy then tell it, it has been chopped.
there is also an example Listener.