moving event processing into gameengine