Jump to content

Spent

Members
  • Posts

    9
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Spent

  1. First of all I want to thank all of you guys taking part in this thread. Your advices are very helpfull to me. I appreciate it. Here is what I will do first 1. I am forgetting about every unit in it's own thread. 2. Move input to a separate thread I think I can do it in a separate thread since, for key/mouse handling, I use array of booleans and I check if specific key is true in this array. 3. I didn't thought about that gamedata is a critical section, this wil be next to take in consideration. Here is some pseudo/C#/C++ code for the three threads // 1st thread: Handles kbd & mouse Thread threadInput = new Thread(); threadInput.Priority = ThreadPriority.Normal; // 2nd thread: Handles Updating gameData Thread threadUpdateEnvironment = new Thread(); threadUpdateEnvironment.Priority = ThreadPriority.Normal; // get elapsed time // if (game.isPaused()) continue; // buildings updateAI(elapsedTime); // loop units updateAI(elapsedTime); // 3rd thread: render world Thread threadRender = new Thread(); threadRender.Priority = ThreadPriority.BellowNormal; // condition for fps limitation to 50 fps // render for GraphicDevice
  2. Its good to hear that. Now lets make this Thread to be exactly for this forum by asking the question. I need an advice about game design, especially the main loop. All the books I found are about single threaded game desing. Lets start with the good old known main loop while (MessageMgr.PeekMessage()) { game.UpdateEnvironment(); game.RenderEnvironment(); } Would it be better if the rendering part and input/update part are separated in two threads? Is this doable? - one thread for the rendering - and another for input(keyboard/Mouse) and game environment And on game start threadUpdateEnvironment.Start(); threadRenderEnvironment.Start() and at the end threadUpdateEnvironment.Abort(); threadRenderEnvironment.Abort(); Further more could the enviroment thread be with higher priority than the render thread. For example in this case if game is running slow, graphics may skip some "things" but actual game would be running without delays. (since my graphic part realy is baad at this moment) Third thing is what if I make a thread for every unit to handle its AI calculation so that every unit have its own thread for UpdateAI() like functions. In this way AI part foreach(unit unt in i_units) un.UpdateAI(msecs) will be excluded from the usual UpdateEnvironment() method Is this even a right approach to do this? I ask this because in this forum there are people that know way much more that me, about performance and threading.
  3. Hello there, friends, Is it appropriate to ask a question in this forum not regarded to mangos, instead regarding game design and programming in C++? Regards, Spent
  4. I had this problem recently when I build the project. Rebuild worked for me. Regards, Spent
  5. No, cache is still with 3.3.3 content, since I copy+update my 3.3.3a client. A good reminder anyway , but items appeared with the "old" Cache folder.
  6. Of Course, a good comunity is a helpfull one. Still have no clue what was the cause for this issue. After couple of unsuccessfull attemps with different revisions(all were the latest ones) I tried again with rev.10268 and the new udb 392 updatepack. This time, it was a successful migration from 9850 to 10286. All the equipment is now here in 3.3.5 No problems observed for the last 24 hours. Problem still unknown, cure unknown. In rev 10286 problem is no more, character migration(update) was successful. But still, Startup errors dissapeared by dumping my mangos database and Importing a fresh clean one from udb. Though, I must reapplly my custom stuff, but it was worth it. Hope this is helpfull. Best Regards, Spent
  7. Hello, I am here for quite a long time, following with interest the project. I am having a mangos running on my PC since tbc and play on it and update it for from time to time. But this time I am having some problems moving to the new revision. Last update from rev 9193 to 9850 went well. But now I am having a problem updating from 9850 to 10198. I update from: MaNGOS rev 9850 UDB ver 390 SD2 rev 1677 Updating of the db went with no errors. realmd db if ok mangos db is latest full udb with the following updates till 391 and after that sql updates from the mangos/sql folder Compiling mangos and sd2 went also with no erros. mangos.conf realmd.conf scriptdev2.conf are configured I have doubt in this new options for char deletion that appeared since 9850, I could be making a mistake there maybe Here arethe Startup Erros I am posting a single error per type. Think they are not related to item dissapearing: ERROR:Item (Entry: 41133) not correct 52899 display id, ERROR:Creature (Entry: 5879) has non-existing Spell1 ERROR:Creature (Entry: 36957) are using modelid_H (30751), ERROR:Table `creature` has creature (GUID: 131099) with non existing creature entry 36881, skipped. ERROR:Creature (GUID: 12954) does not exist but has a record in `creature_addon` ERROR:Table `achievement_criteria_requirement`.`criteria_id` 5474 does not exist, ignoring. .... At the end Player:: DeleteOldChars: Deleting all characters which have been deleted 30 days before... I try to update to : MaNGOS rev: 10198 UDB: 0.12.0 (391) for MaNGOS 9999 SD2 rev: 1702 And finally my problem. I updated "successfully". Server is running. I can login with my character. All character are there, dressed with items. (For information total character are about 40-50 in 6-7 accounts.) When I log into the world with a random character the char is naked with no gear, empty Main Bag, other 4 bags are also missing. Bank is empty, gbank empty too. Then when I loot some item, equip it, or place it in the bags, this item is not disapearing anymore, it is saved. If I relog items are there. Like if only the initial items at first login time gets "deleted". Besides some of the items (5-6) are sent via email with the blizz logo, saying something like: those items cannot be put in bag slots so sending via email. To summarize. characters are there skills, spells,quests, achievements (looks to be ok). But items, equiped and in the bags dissapear on the first login, and only on the first time character enters the world. Until rev9850, only AHbot patch was applied after the initial mangos source. In rev 10198, no core patches were applied, only "clean" mangos git clone. Could you advise me how to keep my charactes, in the new revision. Where could be the problem. There are 2-3 chars that are from the tbc, with lots of quests, recipes and achievements I dont wanna lose now. Excuse my bad english. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use