First draft of game engine