• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About deakster

  • Rank
  1. 2D Line segment coverage over a grid

    Thanks guys, it is the 2d version of 3ddda I'm looking for. Note, I am not trying to draw a line, the thickness of the line is 0. I am trying to determine which cells a line of thickness 0 overlaps.
  2. In a 2d grid where each cell is 1 unit by 1 unit, how could I find the cells that a line segment overlaps? If anyone could direct me to some articles (or a brief explanation here), it would be much appreciated.
  3. Real-time TCP based network protocol

    Thanks for the reply Kylotan, By delta compression, I meant packet level compression, if 400ms of movement data is is buffered and sent per packet. I also think 400ms is pretty high, it is just an example value, however it is based on my experience with (sorry I have to mention it again) WoW. With two computers next to eachother running WoW on the same internet connection (both with identical latencies around 80ms to their servers), it took more than 1 second for the movement data to replicate from computer 1 to computer 2. So in a way, I am trying to identify how much buffering is needed. Of course we can't send every byte individually. I also thought sending a packet every frame is too much, but I get the feeling maybe not. No doubt this depends on bandwidth to a large degree, but there must be an implicit sweet spot in most TCP implementations that makes sense for the frequency of real time data packets.
  4. Real-time TCP based network protocol

    Thanks for the reply Kami, So you send packets per frame; ie 50-60 times per second with NODELAY? I thought there would need to be buffering of a few frames (on top of the buffering of the data for one frame).
  5. What kind of protocol design's are generally imployed in real time simulations, when TCP is required? I am interested in both the small end (lets say 8 players per server), and how it could potentially scale up. I know games like WoW use TCP, and while the movement is clearly delayed, most actions seem very responsive. I guess I am specifically interested in how constantly changing volatile data is effectively sent from client to server and vice versa (like players position etc), and how it can co-exist with high priority, important 'action' type messages over a single TCP socket. I am guessing things like a players movement data is buffered/delta compressed and a packet sent every 400ms or so with the accumulated path? Considering the overhead of TCP, what is an acceptable tick rate for packets? In terms of efficiency, could we rely on Nagle (TCP_NODELAY off) to packetize data sensibly, and just send movement data in a byte-by-byte stream? Is it worth using multiple sockets for different channels of events; one for high priority actions (nodelay, sent immediately regardless of how small the data), and one for movement etc (possibly delayed)? Any thoughts on some of these issues would be appreciated.
  6. There has already been reliable udp for .net: http://code.google.com/p/lidgren-library-network/ or the .net RakNet wrapper
  7. Brilliant, thanks. Things like this really should be in the documentation pages for these classes. I will probably use List<T> since I don't really need a double linked list, so that is more efficient. One thing, is that while I am iterating, I might do lots of other things to the elements (like update them etc) if they are not getting removed, but I guess nothing is stopping me from doing lots of other processing to the nodes in the RemoveLogic function, but just returning false (When using the RemoveAll in List<T>)? Thanks!
  8. Quote:Original post by dalep or I accumulate a list of the items that I *do* want to keep and then at the end of the loop, I assign that back to the member variable. Thats exactly what I said I do ;) But thanks, thought that is the best way
  9. Very common situation; iterating through a List<T> or LinkedList<T> in .NET 2.0, and I want to remove items for which a condition is met. What is the most efficient way to do this? Calling the Remove method would search through the list each time no doubt, whereas I would like to somehow remove while iterating through . The method I use now, is that before the iteration I create another linkedlist which i fill up with the items I want to keep during the iteration, and then set this new list as the old list (hence discard the old list). Is this the best way?
  • Advertisement