Quote Originally Posted by Zanthos
What problems have you run into?
Tearing my hear out lol...

OK, the game is looking really good. The client is now pretty stable and bit by bit I am adding in new functionallity.

The main problem I have is tracking player movement, I can't work out where the main bottleneck is. I suspect there are a few problems:-

1) Using normal NMServerSockets. Don't I need to use IO Completion ports? Are they non blocking and what are the implications when using blocking or non blocking sockets for MMORPG.

2) Should I be using UDP? If so, how much different are the UDP components than TCP/IP?

3) The creature and player tracking currently consists of a 2D array of TList.

eg. Array [0..399,0..399] of TList (Infact it's actually a dynamic array, but to simplify the explanation...)

ie. [X,Y].Creatures.Items[n]

The TList is the floor position, and multiple creatures can occupy one floor space at the same time. (maybe this is a bad idea on its own, and I should just have a Pointer instead of TList.

4) When a player moves I am scanning in the X, Y visible range, so I can see if any new creatures to inform the player about. The downside to this is that I am effectively running a for loop of X := 0 to 30 and Y := 0 to 30, which is 30 x 30 x checking the TList at each that spot and if its not vacant, and if the player doesnt already know about the creature then send packet.

So... The scanning isn't the best way and I am looking at replacing this with a Linked List, BUT will that be more or less effective? Having done timing tests I have determined that TList opperates faster than my Linked List. The benefit of using the linked list is that when a player moves, I wont have to delete and entry from one TList and insert into another TList on another tile, I can simply update the X and Y of the player. The downside is that I will have to scan the whole Linked List and check every single creature to determine if its visible.

There must be an easier way of coding MMORPG