A simple platform game engine in AS3