New User - Questions

edited October 2011 in Photon Server
I'm currently working on a small indie MMO RPG using Unity. I'm looking at both photon and smartfox for our socket server solution and had few questions. I do work in the games industry but have not done anything with server based games so this is new ground for me. Some of my questions are not necessarily related to photon but are more concerned with a high level approach to solving a common problem. Hopefully someone is able to help point me in the right direction here :)

My main areas of concern at the moment are:
1. Interest management
2. Pathfinding (NPCs, Wandering mobs, etc)
3. Collision Detection (very simple)

1. Collision - All I care about in this area is simple collision for projectile based combat. That's it. All other collision will be client authoritative, for the most part. Is simple collision detection (bounding volumes) supported?

A. If not are there any recommended strategies for accomplishing this. I'm just looking for basics here.

B. Would it be acceptable to be more client authoritative? For example, if a player (on the client) shoots an arrow and it hits a tree, then nothing goes to the server. However, if an arrow hits a player or other object of interest, the hit info is sent to the server where the hit is validated. I know this opens things up to some potential hacks. Just looking for a good balance, if it makes sense to do so.

2. Pathfinding - I'm going to have wandering monsters, patrolling NPCs, etc. Is some level of pathfinding supported?

A. If not, what are some basic strategies for this? My original thought was to send the client a destination position for an NPC. The NPC would then use client side pathfinding to move from it's current location to the destination that was sent by the server. This would allow me to use my nav mesh tech on the client for path finding. The problem is that if the wandering NPC is halfway between start/destination and another client comes into range of the NPC, the server will not know where to render the NPC for the new client because it only knows where the NPC was and where it's going since pathing is only being done on the client.

B. Would pre-baking paths for patrolling, wandering, etc be viable? The issue I see her is it prevents designers from being able to use an editor on the client to build paths, etc.

3. Interest management seems to be included out of the box so that's good.

Sorry for the long post, my goal is to understand what I get with photon out of the box for collision/pathfinding/interest management (if any) or to get some common high level strategies for accomplishing this.


  • The interest management as shown in the mmo demo moves items concurrently (on concurrent threads), for collision detection you have to use one single thread. So you would need to rewrite the demo code a bit.
    To give the client the minimum power you would just receive the keyboard input and then calculate the new positions - for this you need a physics engine. You could start with box2d
    As alternative forward the input data to a headless unity instance and calculate new positions (and collisions) there.

    For path-finding you can either use opensteer ( or again, use a headless unity instance.

    I know that both approaches are used in practice.
  • Thank you very much...this is exactly what i was looking for :)
Sign In or Register to comment.