![]() |
more optimizations :/ - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: more optimizations :/ (/showthread.php?tid=206) |
more optimizations :/ - Gilgamesch - 25-07-2006 hey guys, i seriously need help with optimizing the serevr and client, i have added iocp and the code where it just send everything to the players that are currently online (1 to HighIndex, code was written by DarkDragon if i remember that right...), in addition to that i changed some stuff ike: String( to String$( and so on. please help me with that guys, i get a lot of laggs and dont know how to fix them, i wasnt able to add a packet buffer because unfortunately the tutorial didnt work for me ![]() thanks in advance! I appreciate every lilttle peace of code that could speed up anything ![]() - Gilgamesch - 25-07-2006 alright thanks! havent thought about that ![]() - Dr. Spoon - 25-07-2006 how about a faster method for building packets faster.. large map packets slow everything down EDIT thoguht you may want to know that only sending the mapdata around the player in a certain radius it kind of cuts down on the packet build time you just have to be sure to recive the packet for what it is only a piece of the map note you can also cut out the savemap stuff client side because in this method you will be sendig a new part of the map evry step they take just an idea that works - William - 25-07-2006 Dr. Spoon Wrote:how about a faster method for building packets faster.. How would that be? - Spodi - 26-07-2006 Stuff like String$() instead of String will speed it up, but you wont even notice the difference unless you are calling it about 100,000 times a second. Most optimizations you have to actually look through the code and think outside the box - reading files in binary instead of getprivateprofilestring, sending binary packets, smashing down your packets as much as you can (binary packets is a big part of this), using stuff like CopyMemory to move memory instead of looping through arrays, etc. - Gilgamesch - 26-07-2006 Spodi Wrote:Stuff like String$() instead of String will speed it up, but you wont even notice the difference unless you are calling it about 100,000 times a second. Most optimizations you have to actually look through the code and think outside the box - reading files in binary instead of getprivateprofilestring, sending binary packets, smashing down your packets as much as you can (binary packets is a big part of this), using stuff like CopyMemory to move memory instead of looping through arrays, etc. :o , i dunno how to do all that stuff :/ - Spodi - 26-07-2006 It is pretty hard to do, and could be considered the hardest stuff to do in any language. You just have to learn your way around code and use reasoning to find the most effecient method. |