function engine_init()
    GAME.engine = GAME.engine or {}
    GAME.modules = GAME.modules or {}
    local obj = GAME.engine

    function obj:next(module)
        GAME.module = module
        GAME.module:init()
    end
    
    function obj:init()
        self:next(GAME.modules.menu)
    end
    
    function obj:event(e)
        GAME.module:event(e)
    end
    
    function obj:loop(t)
        GAME.module:loop(t)
    end
    
    function obj:paint()
        GAME.module:paint()
    end
end