masodikbela

VIP
  • Content Count

    168
  • Joined

  • Last visited

  • Days Won

    28

masodikbela last won the day on July 4

masodikbela had the most liked content!

Community Reputation

354 Dominating

About masodikbela

  • Rank
    Friendly
  • Birthday 06/23/1997

Profile Information

  • Gender
    Male
  • Location
    Hungary

Contact Methods

  • Skype
    masodikbela_trade (commercial only!)

Recent Profile Visitors

3,807 profile views
  1. masodikbela

    python [Py] Root 02.02.2018

    https://mega.nz/#!Kx9njSYB!fF5FG_RPEv3UID5QBaE7AbJoDLcdMHXSQVN9hdigiME
  2. I think noone ever did anything like that in the mt2 scene what you are looking for right now. As others said probably the best way to start is to start analysing and understanding other already finished stuff, and modifying things inside them, what will happen, etc... Yes sometimes you will learn bad things or wrong things with this method, but if you do it long enough you will recognize them sooner or later. If you are looking for some other type of information, like how does this or that works (mostly in theory, so you need those type of information like I usually write in my comments) I'm your type of guy, so feel free to ask me, and if I have the time and mental power I won't hesitate to write long long explanations.
  3. masodikbela

    Gameforge again

    However I can't blame gameforge because of everything. They are only a publisher of the game. So we have webzen as the developer, they decide what to code and what patch to give for the publishers. Publishers don't even have a say about it. So if webzen gives a patch with 6th 7th bonus, publishers can decide if they put the patch to live, or no. They can't undo this. They don't even have source or anything. I was doing a research some weeks ago if its possible to get a license from webzen, and if so will you have the right to change the game the way you would like to, and (I didn't talk to anybody nor contacted anybody, only read the available documents and stuff) I realized that no, its not possible. So currently we have 2 companies with license to metin according to webzen's homepage: Ongame (in brazil) and Gameforge (in europe). Yes, thats true that gameforge is still full of crap, and they are doing questionable things like this copyright strike, but still I can't blame them for everything. Not sure if they do or do not care about the feedbacks, or just webzen pisses off the players needs.
  4. masodikbela

    #

    Okay, it feels like now you think I'm the bad ugly dev here, because I refused to share or sell this stuff here despite I having it for more than a year. Moreover you took my detailed review about this fix as a personal attack. Let me clear some stuff here (I hope you manage to chill by the time you are reading this). I wrote my answer without any hate or anything. Yes, like I said it felt a bit bad for not leaving any credit for the idea at least with a 1pt textsize that nobody can see but still there. My goal was to tell you the technical problems with your changes. I wrote nothing but the truth. Its always sad to see when someone ignores my technical advises but its more sad when someone misunderstands my intent. Truth sometimes painful but its always necessary. I could have write that "ahh man its even better than my solution, thank you very much, sorry for not telling you and releasing my version". Would it help? Not sure. Did the stuff I do help? In long term I'm sure, but even in short term you changed that now all the motions load correctly, so I guess it did worth. You were asking in the first comment for help and discussion, to improve your solution. I was hoping that my comment will serve this purpose. I wrote even more detailed in some topics there because you said that you are not a programmer. (I would have wrote it anyway because I know that there are not much people out there knowing about pooling and stuff.) I've stopped releasing stuff long time ago, because it felt like giving fully ready stuff under people butts are moving the community and the devs in the wrong way. I've realized that there are no or not much professional devs out there because they are not trying to dive into deep inside stuff and they are doing it because of the money only. So I was thinking what could I do for this community to change this, or help changing this so we could get other more professional devs, and making some competition for the other pros out there. I came to this conclusion that if I explain stuff like this or stuff like the rect clippin would probably impel others to get some experience. There is another reason why I didn't published this particular one is that I made this for a server as a freelancer under a contract, which says I can't share or sell stuff I made for them. Also (and I'm writing this only to inform you, so no hate or anything still) that removing contents are forbidden on this forum.
  5. masodikbela

    Gameforge again

    Not sure if you guys noticed, but its not only private servers. Its all type of content related to "Metin2". You cant upload video even from official servers if you are not an approved youtuber by GF. https://corporate.gameforge.com/games/letsplay/?lang=en I just simply don't understand the logic behind it...
  6. masodikbela

    #

    The original topic got updated/changed over time but I will not update this comment, so its normal to feel confused while reading it. I've run through the method you chose, and I have some notes about them. c_Reference_Decrease_Wait_Time is unused right now, because the client is not using other thread for background loading by default, so m_RequestMap will be empty always, so ms_loadingThread.Fetch(&pData) will return false always. Moreover, the whole ProcessBackgroundLoading function is unused right now, since it only do things if the mentioned background stuff is enabled. Editing g_iLoadingDelayTime in that file is probably pointless, since it will be overwritten by the config file. You should remove that option from the metin2.cfg. Editing __DestroyCacheMap is pointless aswell, since it will only run when you close the client. Also I would put a very very big red exclamation mark here, since you commented out m_pCacheMap.clear(). In theory (ofc it will never happen because the function runs only when you close the client so nobody will give a fck about that cache map anymore) this could lead to huge crashes since in CReferenceObject::Release a deallocation could happen (its possible that it won't, because its possible that at that point something is using that actual file for some reason, so the reference count will still be higher than 1). And after that since you don't clear the cache map, the next time when the system would try to use the cache map, it would receive a corrupt memory address, since we deallocated the object from that address. So anyway if you still want to make sure that nothing will call that function, just put a return to its beginning. About the last edit: I would put an even bigger red exclamation mark there. This requires some further explanation tho, so get ready for it. So first of all, let me talk about memory pools. So as you may know, our processors work better (talking about performance) if the memory addresses are close to each other. Also it works even better, if the affected memory block it needs to read is inside its cache. Also, allocating/deallocating memory runtime is an expensive operation. So long ago programmers came up with an idea: Lets allocate a big chunk of memory when we start our program, so we can put our instances inside it, so the data will be in one place close to each other, and we don't even have to bother with allocation and deallocation. So memory pooling was born. Now that we know this, lets talk about the implementation of CDynamicPool. So as you can see, we have 2 vectors inside it. m_kVct_pkData and m_kVct_pkFree. The first one contains all the ADDRESSES of the given object's instances (even if they are not used at the moment). The second one contains ADDRESSES of those objects that are no longer in use. (As you can see it contains ADDRESSES, so this type of implementation does not solve the problem with the "data in one place" problem, because its possible that we will get an address far far away from the previous one, but its irrelevant right now.) If you take a closer look, you will see new operator, but you won't see delete operator. (This is a possible memory leak factor tho, but since you don't remove those memory addresses from the union of those two vectors, its not the case in reality.) Moreover, if you check the Free function, you will only see that we just simply put an address to the pkFree vector. It means, that the destructor of the given object will not get called. (This could and probably do (in some cases) lead some actual memory leaks, but again, this is not what I want to talk about right now.) Okay, now lets say that we have 2 allocated instances, so we have 2 already-in-use addresses in pkData vector. Lets say that one of them gets "deleted". The Free function will put its address to the pkFree vector. Then, we say that uhhhh ummmmm wait wait, I need a new instance. Okay, we call Alloc. Lets see what will happen: pkFree is not empty, so it will not allocate a new instance, just simply gives the last free address back from pkFree. Looks safe and simple right? Yes, thats the case if you are aware that NO CONSTRUCTOR WILL BE CALLED THERE. Whats the problem with it you may ask... The problem is that we didn't change the content of that instance during this Free and Alloc call. (Sure if we've called some cleanup function outside of the CDynamicCache this is not the case like I said, but then it means you were aware of this problem.) So what you did when you commented out that pMotionModeData->MotionVectorMap.clear(); part was removing this correct cleanup. So what could happen (at least in theory)? Lets say we have a male warrior. This male warrior go away and all the data gets deleted after 4 hours, and you just simply stand still and no other characters appear. The game will remove the unused motions from the CDynamicCache. Then suddenly out of nowhere someone summons a wild dog. It will receive the same exact stuff from the pkFree vector that we just removed. So that wild dog will have 240+ motions loaded instead of 4 or something like that. Sadly we can state that our new wild dog won't run with the male warrior's animation, since in NEW_RegisterMotion that animation will be overwritten, so there will be no visual defects. I'm not sure about the chrmgrRegisterMotionData changes, but probably those don't add much to the final result. My opinion is that changing c_Deleting_Wait_Time to a much higher value was the only thing you did and actually helps in this problem. So basically what you did was: You changed that the unused files don't get deleted over time (or just after 4 hours), which means that in this specific case if you go to somewhere alone, and no other player appears for 4 hours (instead of the original 30 second) and after that someone with other type of character (so you are a warrior and the other player is not a warrior) appears, you will still have the same lag like before. Conclusion: Disregarding the wrong/useless parts, it doesn't solve the main problem. In the gif you shared its clearly visible, that not all the motions load during the loading screen. Example (what you should see) for female assassin (241 motions in total): Because of this, when you login the first time, and you meet a different type of character, you will still have the same lag as before. (The first time I had some doubts in myself tho, so I tested this one to be sure, and I was right, so this is the case.)
  7. masodikbela

    Search dev for - Screen Freezing while loading players

    Thats not that simple. There is a big black questionmark called resource manager. Its job is to load files from the hard disk to the memory when requested. It has some features, one of them is this reference stuff. It works like: okay, introLogin.py says that it needs a.jpg. The a.jpg is not loaded yet, so resource manager will load it. After that a.jpg's reference count will be 1. Okay, we close the intrologin.py, because we logged in to the character select. (Lets assume here that the intrologin.py has been made by someone competent and it doesn't have memory leaks, so it destroys itself correctly after closing it... I'm planning to write a huge topic about python windows because its very disappointing that there are like almost 0 devs who can write non leaking correct python window code, and not sure if anyone ever noticed this mentioned problem before... but thats for another day so lets stick to our current topic). So now the reference count of a.jpg will be 0, so nothing uses it right now. Our resource manager is smart and 200 iq and probably made by someone who can see sharp, so it has garbage collector like stuff, so after about 30 seconds it will say: well, fck this, nobody is interested in this shitty jpg, lets delete it. Then we suddenly realize, that we need our other account, (yeah now it took us 30 seconds to realize because accidentally our cat came into the room and we had to pet him) so we log out to the intrologin again. You can guess what will happen... it will need a.jpg, then the resource manager will see that yeah a.jpg is not loaded, it will load a.jpg, and raise its reference count to 1. Same goes to all files, for example our font's reference count will be probably the highest, around 200 or more depending how much textline instances we have. Resource manager have other secrets ofc, for example there was a try to make it multi threaded, or at least they tried to make it run on a different thread, but originally its disabled, not sure why (maybe because of old PCs, maybe because it was broken, idk, I tried it out everything was fine for me, but didn't noticed any difference, maybe it could use some more investigation). This whole thing should be reviewed and refactored if needed. I would maybe do something like: load everything we would probably need on the current map, and keep it. Then if we meet something thats not loaded load it and keep it too, because its likely that we will meet with it again. Then just delete everything if we quit from the gamephase (so we warp/change character/account). Yeah so to answer your question: probably to save memory, but even so I don't think this worths all the trouble, especially nowadays.
  8. masodikbela

    Search dev for - Screen Freezing while loading players

    I was working on this problem and actually found what caused it. The problem is that players have like 200+ motions. Whenever a new player appear the client has to load these motions very quickly, which causes small freezes. The problem is, that when there are no characters around you for some time, the unused files are getting deleted by the resource manager. Therefore when someone suddenly appears near to you, the client has to load those 200+ files from the hard disc which takes some time on low end PCs. (Because of the decrypting and decompressing.) A possible solution for this (or at least what I did was) to create a cache for the motions, and load at least the motions for the playable characters at loadingscreen. (Won't release it nor sell it, but this is a good lead so you may find someone who are capable to do this.)
  9. masodikbela

    open Memory corruption

    Its a built-in feature for clang, and if you are using clang you just have to pass a few more arguments for the build. (I think its working/integrated with gcc too, but I'm totally not sure about this since I always used clang and barely worked with gcc) I'm using a very default settings for ASAN, the related arguments are: CFLAGS += -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer If you have ASAN enabled you must note that it will use much much more memory (like 2-3 times as much as usually) the program will always abort/crash on the first anomaly. Its necessary since if it continues there would be a chance that it would produce false results... this could be annoying sometimes if there are more bad parts in your code, cous it could happen that you want to fix x, but you have to fix y, z, i, j, k before, even if they are not related to your main problem. the program will not generate core dump, instead it will write the result to the stderr, so you might want to run the program without vrunner and detour the output to a file (instead of writing it to the console) I can't help with valgrind since this is the first time I heard about it. @Sherer Thats not true for the affect pool. Its enabled by default, because its #ifndef DEBUG_ALLOC not #ifdef DEBUG_ALLOC.
  10. masodikbela

    open Memory corruption

    I would recommend you to try building your cores with ASAN (address sanitizer) enabled. I can't promise anything, but it can help you in desperate times... I remember having the weirdest crashes when AE opened. There was some heap-use-after-free error related to our multilanguage and battlepass systems that we would never been able to find without ASAN. (I don't think this is the case right here, just wanted to mention it as an example.) I think its worth a try. There are some nice article about it on the internet so I'm sure you can manage it, but if you have some questions about it I will try to answer them (despite I'm not an expert user of it).
  11. masodikbela

    open GUI Class hidding what's outside of it

    I guess this is what you are searching for. I recently used this technique in my new wiki (ignore the cursor, its position is fucked up in the gif): https://i.imgur.com/t5foEKQ.gif The trick is exactly what you were thinking in your post above: First, you need a main window. We set this window's size to exactly as big as we need. Then lets make another window inside it, and make it as big as we need to store all elements we need in it. Then when you scroll we just have to move this inner window. But... you have to create a function (obviously this is the hard part of it) that handles the inner window. So basically it hides those parts of the window that is outside of the main window. I've seen some different implementation already, where they did this python side using the SetRenderingRect function, but I would avoid that (like I did) cus it would make the whole code a mess. Instead, I would recommend you to modify the render functions directly. What I did was: created a new bool "isInsideRender" which I can set if the window need to check if its outside from its parent created a RECT "render box" where I store how much is the current window is outside from its parent window modified the necessary functions like set size, set position, etc, where I update the render box if the isInsideRender is set modified the necessary windows (image box, textline) renders to render only the visible parts of the window according to the stored data in the render box Obviously I won't release it (sadly) like I didn't do it in the past ~1 year, but if you have some more questions about it (which is not like "can you show me the exact code") I'm here to help.
  12. masodikbela

    Can I change my name?

    If you have VIP you can change your name once per month (if I remember well). Otherwise they rarely do it, unless there is a strong reason to do so ( error C2129: static function 'bool IsStrongReason(const char * namechangeReason)' declared but not defined )
  13. masodikbela

    Feedback for our new theme

    First I ignored it, but as time passed now I cant and the more I watch it the more I dont understand it.
  14. masodikbela

    [RLS]AsyncSQL with std::mutex and std::thread

    Ahh was a bit late yesterday and somehow I missed it totally sorry you are right...
  15. masodikbela

    [RLS]AsyncSQL with std::mutex and std::thread

    You should check if the thread is already joined, or just simply check if you already called Quit, cus db is crashing at the very end of the process, because quit is called from the db too (and also from the destructor of CAsyncSQL).