MmoDemo collision checks?

I've been attempting to use the MmoDemo code to start a game project, I know it's meant only to be a demo and not a starting base for a game but I've attempted to use it as such anyway.

The difficulty in doing this comes from the lack of a big picture design of how the system works. The main question I have is that if you were doing collision checks on the server within MmoDemo, where would they be done?

One of the things that would be needed to do collision checks is a collection of Items (or maybe a new type GameObjects to account for projectiles and other collidables), so that the items can have collision checks done between them. Does such a collection of items exist in the project? I see that MmoActor class has an InterestItems collection, maybe that one? or ItemCache - although it isn't organized by regions, maybe it would work just to get a start?

If anyone has some notion on where to start with this problem please let me know.

Comments

  • ItemCache is a list of all items in the world. Using it would be the least effective,
    InterestItems usage is better solution because it limits checked items to located in surrounding area only.
    But this area may be quite big and each items pair will be checked twice if you check collisions for all items against their surroundings.
    Scanning regions grid and checking collisions between items in current region only would be the most effective. But you need to update Region class to store current items. Note that item may be registered in several regions at the same time to do no miss collisions on region boundaries. So item collision bounding box is similar to interest area but much smaller.