Server-side collisions in MMO

Options
drawmaster77
edited February 2012 in Photon Server
Hey guys,

I am looking into the best way to handle collisions in my MMO. I would like to have somewhat realist bullet/projectile collisions (like in FPS), except that I am making an MMO. Please dont bash me I am a noob :P

I understand that MMO server probably cant handle same level of collision checking like say in counter strike, therefore I was thinking about doing all expensive collision checks on client.

Since I haven't really seen any MMOs like this, Is this even possible? What are the obstacles I may need to consider (hacking is the one I know off, but this probably is not as important, since I am not making a AAA title :mrgreen: )

Comments

  • dreamora
    Options
    Doing collision checks on the client is tricky as it requires that multiple ones do it to be 'sure'

    A more common way is using so called 'simulation nodes' on the mmo backend which in its easiest form use the same engine / client as the regular client but in a reduced form, which only knows about the relevant world geometry to perform collision & physics. Potentially you can reuse the same thing for the path finding of AIs too.

    A nice side effect is that you can scale far easier because the simulation nodes can run on any machine so they can be distributed over any number of machines depending on your load. Their 'hard part' is to decide which world area you handle on which simulation node etc
  • oh so from MMO sample code perspective, I would need to have a custom peer with "Simulation Node" role which would be placed wherever collisions are happening... and server would get the collision events from my SimNode client and send that stuff to other peers within SimNode's area?
  • but is it possible to have realistic collisions (like counter-strike) with simulation nodes? Or would it lack to death?
  • dreamora
    Options
    Realistic collisions is relatively easy, thats not the problem.
    There are two that are totally independent of the networking technology that basically say 'NO' here, but it naturally depends on the scale of your game, if its really an MMO or only a O / MO with persistence.


    1. It would be technically possible but you wouldn't aim for it as the costs for the cluster would kill the project likely, you would need 'dedicated gaming server' machines for each node instead of using a node for several dozen to hundreds of users, or simply put the number of users you can get per $ on the hardware is significantly lower if you put such high strain on the machine.

    2. The latency requirements so users can even make use of such precise collision boxes are serious, further raising the costs of the hardware and limiting the datacenters where you can put the cluster at all seriously, which will blow up the cost additionally. Especially sniping otherwise is totally unimpossible.

    You would realistically aim for something less precise, look at PlanetScape for an example of an MMO FPS.


    As for the code perspective: Basically yes, with this peer simulating a given area and hence keeping an eye on the related InterestAreas etc in there to limit the simulation effort etc.
    There are various things you can use for optimization but its definitely a non trivial thing
  • hey thanks for clarification, I am just laying out design atm so perhaps if the precise collision option is not feasable (I dont want to waste 2 months coding it only to find out it doesnt scale for crap :P) I will stick to something more worldofwarcraftish. Its really scary to think whats going to happen when hundred people will group in one area and start blasting crap out of each other...

    I could not find PlanetScape mmon anywhere.. could you give a url please?
  • dreamora
    Options
    Something WoWish can work very well. Tabula Rasa from NCSoft was something WoWish while pretending to be a shooter.

    Basically they used 'immediate abilities' with raycasts replacing the 'selection + keyboard button'. So where WoW wants you to select a target and then cast a spell and alike, tabula rasa requested you to select a weapon (-> ability bound to item in your equip) and click to fire (raycast at screen center) to fire the weapon and at least out of my view it worked very well as a system