示例#1
0
文件: Game.cs 项目: nightwolf93/Bfly
        private void MainGameLoop()
        {
            DateTime time;
            TimeSpan spent;

            while (gameLoopActive)
            {
                if (gameLoopEnabled)
                {
                    try
                    {
                        GameLoopStatus = 1;
                        time           = DateTime.Now;
                        LowPriorityWorker.Process(); //1 query
                        spent = DateTime.Now - time;
                        if (spent.TotalSeconds > 3)
                        {
                            Console.WriteLine("Low priority Process worker took really long time to cycle!");
                        }

                        GameLoopStatus = 2;
                        time           = DateTime.Now;
                        LowPriorityWorker.ConsoleTitleWorker();
                        spent = DateTime.Now - time;
                        if (spent.TotalSeconds > 3)
                        {
                            Console.WriteLine("Low priority ConsoleTitleWorker worker took really long time to cycle!");
                        }

                        GameLoopStatus = 5;
                        time           = DateTime.Now;
                        RoomManager.OnCycle(); // Queries for furni save
                        spent = DateTime.Now - time;
                        if (spent.TotalSeconds > 3)
                        {
                            Console.WriteLine("RoomManager.OnCycle took really long time to cycle!");
                        }

                        GameLoopStatus = 6;
                        time           = DateTime.Now;
                        ClientManager.OnCycle();
                        spent = DateTime.Now - time;
                        if (spent.TotalSeconds > 3)
                        {
                            Console.WriteLine("ClientManager.OnCycle took really long time to cycle!");
                        }

                        GameLoopStatus = 7;
                    }
                    catch (Exception e)
                    {
                        Logging.LogCriticalException("INVALID MARIO BUG IN GAME LOOP: " + e.ToString());
                    }
                    GameLoopStatus = 8;
                }
                Thread.Sleep(gameLoopSleepTime);
            }

            gameLoopEnded = true;
        }
示例#2
0
        public Game()
        {
            this._clientManager    = new GameClientManager();
            this._clientWebManager = new WebClientManager();

            this._roleManager = new RoleManager();
            this._roleManager.Init();

            this._itemDataManager = new ItemDataManager();
            this._itemDataManager.Init();

            this._catalogManager = new CatalogManager();
            this._catalogManager.Init(this._itemDataManager);

            this._navigatorManager = new NavigatorManager();
            this._navigatorManager.Init();

            this._roleplayManager = new RoleplayManager();
            this._roleplayManager.Init();

            this._roomManager = new RoomManager();
            this._roomManager.LoadModels();

            this._groupManager = new GroupManager();
            this._groupManager.Init();

            this._moderationManager = new ModerationManager();
            this._moderationManager.LoadMessageTopics();
            this._moderationManager.LoadMessagePresets();
            this._moderationManager.LoadPendingTickets();
            this._moderationManager.LoadTicketResolution();

            this._questManager = new QuestManager();
            this._questManager.Initialize();

            this._hotelViewManager = new HotelViewManager();
            this._guideManager     = new GuideManager();
            this._packetManager    = new PacketManager();
            this._chatManager      = new ChatManager();

            this._effectsInventory = new EffectsInventoryManager();
            this._effectsInventory.Init();

            this._achievementManager = new AchievementManager();

            this._animationManager = new AnimationManager();
            this._animationManager.Init();

            this._notiftopManager = new NotifTopManager();
            this._notiftopManager.Init();

            DatabaseCleanup();
            LowPriorityWorker.Init();

            this.moduleWatch = new Stopwatch();
        }
示例#3
0
 /// <summary>
 /// Continues the loading.
 /// </summary>
 internal void ContinueLoading()
 {
     using (var queryReactor = Plus.GetDatabaseManager().GetQueryReactor())
     {
         uint catalogPageLoaded;
         PetRace.Init(queryReactor);
         _catalog.Initialize(queryReactor, out catalogPageLoaded);
         AntiPublicistas.Load(queryReactor);
         SongManager.Initialize();
         LowPriorityWorker.Init(queryReactor);
         _roomManager.InitVotedRooms(queryReactor);
     }
     StartGameLoop();
 }
示例#4
0
        internal void start()
        {
            using (IQueryAdapter queryReactor = CyberEnvironment.GetDatabaseManager().getQueryReactor())
            {
                uint itemsLoaded         = 0;
                uint catalogPageLoaded   = 0;
                uint navigatorLoaded     = 0;
                uint roomModelLoaded     = 0;
                uint videoPlaylistLoaded = 0;
                uint achievementLoaded   = 0;
                uint pollLoaded          = 0;

                this.BanManager.LoadBans(queryReactor);
                this.RoleManager.LoadRights(queryReactor);
                this.ItemManager.LoadItems(queryReactor, out itemsLoaded);
                Logging.WriteLine("Loaded a total of " + itemsLoaded + " item definition(s).");
                this.PinataHandler.Initialize(queryReactor);
                this.globalInventory = new InventoryGlobal();
                this.VideoManager.Load(queryReactor, out videoPlaylistLoaded);
                Logging.WriteLine("Loaded a total of " + videoPlaylistLoaded + " video playlist(s).");
                this.Catalog.Initialize(queryReactor, out catalogPageLoaded);
                Logging.WriteLine("Loaded a total of " + catalogPageLoaded + " catalogue page(s).");
                this.Navigator.Initialize(queryReactor, out navigatorLoaded);
                Logging.WriteLine("Loaded a total of " + navigatorLoaded + " official room(s).");
                this.RoomManager.LoadModels(queryReactor, out roomModelLoaded);
                Logging.WriteLine("Loaded a total of " + roomModelLoaded + " room model(s).");
                this.RoomManager.InitVotedRooms(queryReactor);
                this.AchievementManager = new AchievementManager(queryReactor, out achievementLoaded);
                Logging.WriteLine("Loaded a total of " + achievementLoaded + " achievement(s).");
                this.questManager.Initialize(queryReactor);
                this.PollManager.Init(queryReactor, out pollLoaded);
                Logging.WriteLine("Loaded a total of " + pollLoaded + " poll(s).");
                this.talentManager.Initialize(queryReactor);
                this.ModerationTool.LoadMessagePresets(queryReactor);
                this.ModerationTool.LoadPendingTickets(queryReactor);
                PetRace.Init(queryReactor);
                AntiPublicistas.Load(queryReactor);
                this.GetGroupManager().InitGroups();
                SongManager.Initialize();
                LowPriorityWorker.Init(queryReactor);
            }
            this.StartGameLoop();
            PixelManager.StartPixelTimer();
        }
示例#5
0
        private void MainGameLoop()
        {
            while (gameLoopActive)
            {
                try
                {
                    LowPriorityWorker.Process();
                    ClientManager.OnCycle();
                    RoomManager.OnCycle();

                    GroupManager.OnCycle();
                    AlfaManager.OnCycle();
                }
                catch (Exception e)
                {
                    Logging.LogCriticalException("[Otanix] @ Alerta de erro: ERRO MARIO INVALIDO NO LOBO DO JOGO: " + e.StackTrace + " - " + e.Message + " - " + e);
                }

                Thread.Sleep(gameLoopSleepTime);
            }
        }
示例#6
0
        /// <summary>
        /// Mains the game loop.
        /// </summary>
        private void MainGameLoop()
        {
            LowPriorityWorker.StartProcessing();

            while (GameLoopActiveExt)
            {
                if (GameLoopEnabled)
                {
                    try
                    {
                        RoomManagerCycleEnded   = false;
                        ClientManagerCycleEnded = false;
                        _roomManager.OnCycle();
                        _clientManager.OnCycle();
                    }
                    catch (Exception ex)
                    {
                        Logging.LogCriticalException(string.Format("Exception in Game Loop!: {0}", ex));
                    }
                }
                Thread.Sleep(25);
            }
        }
示例#7
0
        private void MainGameLoop()
        {
            LowPriorityWorker.StartProcessing();

            while (this.gameLoopActive)
            {
                if (Game.gameLoopEnabled)
                {
                    try
                    {
                        this.RoomManagerCycle_ended   = false;
                        this.ClientManagerCycle_ended = false;
                        this.RoomManager.OnCycle();
                        this.ClientManager.OnCycle();
                    }
                    catch (Exception ex)
                    {
                        Logging.LogCriticalException("Exception in Game Loop!: " + ex.ToString());
                    }
                }
                Thread.Sleep(25);
            }
        }
示例#8
0
        private void MainGameLoop()
        {
            while (this.gameLoopActive)
            {
                try
                {
                    if (gameLoopEnabled)
                    {
                        moduleWatch.Restart();

                        LowPriorityWorker.Process();

                        if (moduleWatch.ElapsedMilliseconds > 500)
                        {
                            Console.WriteLine("High latency in LowPriorityWorker.Process ({0} ms)", moduleWatch.ElapsedMilliseconds);
                        }
                        moduleWatch.Restart();

                        this._roomManager.OnCycle(moduleWatch);
                        this._animationManager.OnCycle(moduleWatch);

                        if (moduleWatch.ElapsedMilliseconds > 500)
                        {
                            Console.WriteLine("High latency in RoomManager ({0} ms)", moduleWatch.ElapsedMilliseconds);
                        }
                    }
                }
                catch (OperationCanceledException e)
                {
                    Console.WriteLine("Canceled operation {0}", e);
                }

                Thread.Sleep(500);
            }
            this.gameLoopEnded = true;
        }
        internal static void Initialize()
        {
            ServerStarted = DateTime.Now;
            //Console.ForegroundColor = ConsoleColor.DarkBlue;
            //Console.WriteLine("\n                                                                 ");
            //Console.WriteLine(@"        $$$$$$\    $$\                         $$\                ");
            //Console.WriteLine(@"       $$  __$$\   $$ |                        \__|               ");
            //Console.WriteLine(@"       $$ /  $$ |$$$$$$\    $$$$$$\  $$$$$$$\  $$\ $$\   $$\      ");
            //Console.WriteLine(@"       $$ |  $$ |\_$$  _|   \____$$\ $$  __$$\ $$ |\$$\ $$  |     ");
            //Console.WriteLine(@"       $$ |  $$ |  $$ |     $$$$$$$ |$$ |  $$ |$$ | \$$$$  /      ");
            //Console.WriteLine(@"       $$ |  $$ |  $$ |$$\ $$  __$$ |$$ |  $$ |$$ | $$  $$<       ");
            //Console.WriteLine(@"        $$$$$$  |  \$$$$  |\$$$$$$$ |$$ |  $$ |$$ |$$  /\$$\      ");
            //Console.WriteLine(@"        \______/    \____/  \_______|\__|  \__|\__|\__/  \__|     ");
            //Console.WriteLine("\n                                                                 ");
            //Console.ForegroundColor = ConsoleColor.DarkGreen;
            //Console.WriteLine(@"   © 2016 - 2017 - Todos os direitos reservados ao Thiago Araujo.");
            //Console.WriteLine(@"                                                                 ");
            Console.ForegroundColor = ConsoleColor.Gray;

            try
            {
                #region Starting
                Configuration = new ConfigurationData(Path.Combine(Application.StartupPath, @"Settings/configuration.ini"));

                UsersCache.Initialize();
                LowPriorityWorker.Init();
                APIexterna.InitStatus();
                LanguageLocale.Init();
                ChatCommandRegister.Init();
                PetLocale.Init();
                #endregion
                #region MySQL Configuration
                var starts = DateTime.Now;
                Logging.WriteLine("[Otanix] @ Conectando na database...");

                manager = new DatabaseManager(uint.Parse(GetConfig().data["db.pool.maxsize"]),
                                              int.Parse(GetConfig().data["db.pool.minsize"]));
                manager.setServerDetails(
                    GetConfig().data["db.hostname"],
                    uint.Parse(GetConfig().data["db.port"]),
                    GetConfig().data["db.username"],
                    GetConfig().data["db.password"],
                    GetConfig().data["db.name"]);
                manager.init();

                var timeUsed2 = DateTime.Now - starts;
                Logging.WriteLine("[Otanix] @ Conectado com sucesso na database! (" + timeUsed2.Seconds + " s, " + timeUsed2.Milliseconds + " ms)");
                #endregion
                #region Cycles Configuration
                starts = DateTime.Now;

                StaticClientMessageHandler.Initialize();
                ClientMessageFactory.Init();

                var timeUsed3 = DateTime.Now - starts;
                Logging.WriteLine("[Otanix] @ Iniciando os ciclos! (" + timeUsed3.Seconds + " s, " + timeUsed3.Milliseconds +
                                  " ms)");

                Game = new Game();
                Game.ContinueLoading();
                #endregion
                #region Connections Configuration
                ConnectionManager = new ConnectionHandeling(int.Parse(GetConfig().data["game.tcp.port"]),
                                                            int.Parse(GetConfig().data["game.tcp.conlimit"]),
                                                            int.Parse(GetConfig().data["game.tcp.conperip"]),
                                                            GetConfig().data["game.tcp.enablenagles"].ToLower() == "true");
                ConnectionManager.init();
                ConnectionManager.Start();

                Handler.Initialize(RsaKeyHolder.N, RsaKeyHolder.D, RsaKeyHolder.E);
                Logging.WriteLine("[Otanix] @ RSA Crypto iniciada!");

                if (GetConfig().data["mus.enable"].ToLower() == "true")
                {
                    MusSystem = new MusSocket(int.Parse(GetConfig().data["mus.tcp.port"]));
                }
                #endregion
                #region Last Process
                var TimeUsed = DateTime.Now - ServerStarted;
                Logging.WriteLine("[Otanix] @ ENVIRONMENT -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
                Console.Title = "Otanix Emulador ~ Versão privada por Thiago Araujo para " + EmuSettings.HOTEL_LINK;

                if (Debugger.IsAttached)
                {
                    Console.ForegroundColor = ConsoleColor.Blue;
                    Logging.WriteLine("[Otanix] @ Alerta: Servidor está em DEBUG, console ativado!");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else
                {
                    Logging.WriteLine("[Otanix] @ Alerta: Servidor não está em DEBUG, console desativado!");
                    Logging.DisablePrimaryWriting(false);
                }

                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("[Otanix] @ Alerta: Pressione alguma tecla para ativar o console de comandos.");
                Console.ForegroundColor = ConsoleColor.White;
                #endregion
            }
            catch (KeyNotFoundException e)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Logging.WriteLine("Avviso: controlla il file di configurazione, alcuni valori sembrano mancare.");
                Logging.WriteLine("Avviso: premere un tasto qualsiasi per terminare il programma...");
                Logging.WriteLine(e.ToString());
                Console.ReadKey(true);
                Destroy();
            }
            catch (InvalidOperationException e)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Logging.WriteLine("Avviso: impossibile avviare il programma, " + e.Message);
                Logging.WriteLine("Avviso: premere un tasto qualsiasi per terminare il programma...");

                Console.ReadKey(true);
                Destroy();
            }
            catch (Exception e)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Avviso: errore di avvio irreversibile, " + e);
                Console.WriteLine("Avviso: premere un tasto qualsiasi per terminare il programma...");

                Console.ReadKey();
                Environment.Exit(1);
            }
            Console.ForegroundColor = ConsoleColor.White;
        }
示例#10
0
文件: Game.cs 项目: nightwolf93/Bfly
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
            {
                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ban manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                //RoleManager.LoadRoles(dbClient);
                RoleManager.LoadRights(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Role manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                HelpTool.LoadCategories(dbClient);
                HelpTool.LoadTopics(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Help tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catacache -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Navigator -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                globalInventory = new InventoryGlobal();
                TimeUsed        = DateTime.Now - Start;
                Logging.WriteLine("Item manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitRoomLinks(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Room manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AdvertisementManager.LoadRoomAdvertisements(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Adviserment manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager = new AchievementManager(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Achievement manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadPendingTickets(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Moderation tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BotManager.LoadBots(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Bot manager manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalogue manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Sound manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");


                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                LowPriorityWorker.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Database -> Cleanup performed! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("Game manager -> READY!");

            DataSocket.SetupListener(42);
            DataSocket.Start();
        }
示例#11
0
文件: Game.cs 项目: TheNaked/Firewind
        private void MainGameLoop()
        {
            while (gameLoopActive)
            {
                DateTime startTaskTime;
                TimeSpan spentTime;
                startTaskTime = DateTime.Now;
                if (gameLoopEnabled)
                {
                    try
                    {
                        LowPriorityWorker_ended  = false;
                        RoomManagerCycle_ended   = false;
                        ClientManagerCycle_ended = false;
                        if (FirewindEnvironment.SeparatedTasksInMainLoops != true)
                        {
                            GameLoopStatus = 1;
                            LowPriorityWorker.Process(); //1 query
                            GameLoopStatus = 5;
                            RoomManager.OnCycle();       // Queries for furni save
                            GameLoopStatus = 6;
                            ClientManager.OnCycle();
                            GameLoopStatus = 7;
                            //groupManager.OnCycle();
                        }
                        else
                        {
                            if (LowPriorityWorker_task == null || LowPriorityWorker_task.IsCompleted == true)
                            {
                                LowPriorityWorker_task = new Task(LowPriorityWorker.Process);
                                LowPriorityWorker_task.Start();
                            }

                            if (RoomManagerCycle_task == null || RoomManagerCycle_task.IsCompleted == true)
                            {
                                RoomManagerCycle_task = new Task(RoomManager.OnCycle);
                                RoomManagerCycle_task.Start();
                            }

                            if (ClientManagerCycle_task == null || ClientManagerCycle_task.IsCompleted == true)
                            {
                                ClientManagerCycle_task = new Task(ClientManager.OnCycle);
                                ClientManagerCycle_task.Start();
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Logging.LogCriticalException("INVALID MARIO BUG IN GAME LOOP: " + e.ToString());
                    }
                    GameLoopStatus = 8;
                }
                spentTime = DateTime.Now - startTaskTime;
                if (spentTime.TotalSeconds > 3)
                {
                    Logging.LogDebug("Game.MainGameLoop spent: " + spentTime.TotalSeconds + " seconds in working.");
                }

                Thread.Sleep(gameLoopSleepTime);
            }
        }
示例#12
0
文件: Game.cs 项目: TheNaked/Firewind
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor())
            {
                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ban manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                //RoleManager.LoadRoles(dbClient);
                RoleManager.LoadRights(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Role manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catacache -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Navigator -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                globalInventory = new InventoryGlobal();
                TimeUsed        = DateTime.Now - Start;
                Logging.WriteLine("Item manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Room manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Ranking.initRankings(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("User rankings -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AdvertisementManager.LoadRoomAdvertisements(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Adviserment manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager = new AchievementManager(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Achievement manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadPendingTickets(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Moderation tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BotManager.LoadBots(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Bot manager manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetRace.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Pet system -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalogue manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Sound manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");


                //GuildsPartsData.InitGroups();
                //groupManager = new GroupManager(dbClient);


                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                LowPriorityWorker.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Database -> Cleanup performed! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("Game manager -> READY!");
        }