Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need the MS community's help with packets
#1
We have some smart programmers here, but more importantly, there are a lot of creative people here, so I wanted to know if I can get some of your guys's help. I am currently facing a problem with updating packets for movement. Why movement? Well movement is something that happens a hell of a lot, so it suffers a hell of a lot from packet headers. If you move 3 tiles in a second, which isn't that fast, that is 120 bytes in a second from just TCP and IPv4 packet headers.

Anyways, heres the link:
http://www.vbgore.com/forums/viewtopic.php?t=1406

Sorry it is lengthy, I tried my best to explain things (though probably didn't do a great job). Anyways, please post your suggestions here or there. Any suggestions are helpful.

Thanks for your help! Big Grin
Reply
#2
What I think you can do, and is actualy what I am doing is to make the distance checks server side, the way you didn't want to do becouse you said it uses to much CPU. I don't think it is that much CPU. I know the check would be used thousand of times each second if there are a lot of players online but you should do a speed test to see how many of this tests can be done with out any speed problem. Is a simple:[code]
ok=0
If getplayerx(a)=getplayerx(b) then
If getplayery(a)=getplayery(b) then
ok=1
end if
elseif getplayery(a)
Reply
#3
All that checking just to make sure if you should send the players positions to the other players seems useless. I will think about this and see if I get an idea or something.

But concerning the sending of the location to other online players, that should probably be map-wise, and not be divided up even if scrolling is used.

Moved to "Advanced Questions".
Reply
#4
Oops, sorry about the wrong section, William. :oops:

Problem with that, Dragoons Master, is you either end up with the 2nd routine I listed (the vbGORE v0.2.2 method) and you get many "ghosts" since you don't update their position again until they are back in the screen (so you will see them at their old position until you run into their real position, then they will warp over there).

Either that, or you have to check if they move out of the screen (so extra checks to see if they are moving away from you, and if they moved out of the view area), then delete the character, then remake them when they come back into view (which means you have to constantly do distance checks to see if they are in range and make and "update row" when the user is moving to force update any character that enters their view when they move). See how bulky it gets? :wink:
Reply
#5
Does vbGore have scrolling? Otherwise I'm not sure what the diff is between the screen and the map is.
How does the scrolling work, what is the map size in relation to the viewable screen?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)