Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
more optimizations :/
#1
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 Sad, and the iocp tutorial wasnt really a great help because i am not really able to handle more players :/



thanks in advance! I appreciate every lilttle peace of code that could speed up anything Smile
Reply
#2
alright thanks! havent thought about that Big Grin
Reply
#3
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
Reply
#4
Dr. Spoon Wrote:how about a faster method for building packets faster..
large map packets slow everything down

How would that be?
Reply
#5
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.
Reply
#6
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 :/
Reply
#7
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)