I'm developing an MMORPG, using Unity for the client and "standard" C# 4.0 for the authoritative server. The server should check each player's movement and ensure that it does not collide with props or walk through unpassable terrain (like a cliff). Collisions with other players and such are not checked. In addition, the server must be able to retrieve/calculate the position of a player at any time so it can be sent to other players (who just walked into range, for example).
To make this all a little more complex, the game is a 3D space, meaning you can have things such as a spiral staircase and flight, and it has multiple maps.
I've run into a problem, though. I'm not quite sure how to actually implement all this.
I've come up with two ideas:
- Make the server interop with a Unity client tasked solely with tracking player positions and validating movement
- Get the props and terrain onto the server and use math to define the character's movement and check for collisions.
The first one seems ugly to me, and I don't even know if Unity will allow me to load multiple maps onto the same client. I've made some progress on the second one: I managed to export props as OBJ files and read them on the server. But from there, I'm kinda lost.
My question is two parts: Is there a better way to achieve what I want? And if not, how should I proceed with my current plan?