| Mirage Source http://miragesource.net/forums/ |
|
| more optimizations :/ http://miragesource.net/forums/viewtopic.php?f=210&t=324 |
Page 1 of 1 |
| Author: | Gilgamesch [ Tue Jul 25, 2006 6:12 pm ] |
| Post subject: | more optimizations :/ |
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 |
|
| Author: | Lea [ Tue Jul 25, 2006 6:31 pm ] |
| Post subject: | |
Check out my binary file system tutorial, that will help a lot with saving lag. |
|
| Author: | Gilgamesch [ Tue Jul 25, 2006 6:32 pm ] |
| Post subject: | |
alright thanks! havent thought about that |
|
| Author: | Dr. Spoon [ Tue Jul 25, 2006 10:25 pm ] |
| Post subject: | |
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 |
|
| Author: | William [ Tue Jul 25, 2006 11:44 pm ] |
| Post subject: | |
Dr. Spoon wrote: how about a faster method for building packets faster..
large map packets slow everything down How would that be? |
|
| Author: | Spodi [ Wed Jul 26, 2006 2:21 am ] |
| Post subject: | |
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. |
|
| Author: | Gilgamesch [ Wed Jul 26, 2006 10:43 am ] |
| Post subject: | |
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.
|
|
| Author: | Spodi [ Wed Jul 26, 2006 11:27 am ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|