Level Loading on the Server

Started by
3 comments, last by Christopher Crain 9 years ago

I just want to ensure I am going about this the right way, since I am still trying to wrap my head around all this. I guess this is more of a design question, but it's alot to do with multi-player / servers.

1. Create a scene in Unity and exporting the geometry to a file. - Done

2. Load the geometry file in my server code. - Done

Things I am about to attempt, this is where I need to know if this is the correct approach?

3. Create a Navigational Mesh from the Geometry? I am about to test out SharpNav (https://github.com/Robmaister/SharpNav)

4. Use the Navigational Mesh and RayCasting for the players and npc's line of sight and walkable area's?

Advertisement
It's hard to answer your queestions when your goals are not clearly stated.
What are your goals?
And then, given those goals, how are you trying to accomplish those?
I take it from your post that your client is written in Unity3D. Is your server running Unity3D or not?
enum Bool { True, False, FileNotFound };

Sorry hplus0603, the Client is created in Unity3D version 5 and I am using the Lidgren Network library to connect to a custom server built in a C# console application. I am trying to find the best approach to extract the geometry from the scenes I create in Unity3D into a file that my server can read. Currently I am exporting the terrain to a .obj file but I may see about just exporting just the triangles since the server doesn't care about textures.

I want the server to do all the raycasting (line of sight) for spell casting and ranged combat, also have the server calculate the walkable areas for players / npc's via a navigational mesh (SharpNav).

Has anyone used SharpNav? Are there any other navmesh libraries in C#?

The setup I am aiming for for raycasting / walkable areas using the geometry file on the server is this the best approach?

I love the way EQEmulator folks have the server implemented, so I would like to model mine in a similar way but in C#. (https://github.com/EQEmu/Server/)

I think that could work. There's a risk that you would get a mis-match between the version used by the client and the version used on the server, if you're not careful (ideally automated) about how you build, release, and load your level geometry.
I don't know about navmesh libraries for C#, so I can't answer that question.
OBJ files sound great. You don't have to load the textures/materials from that file on the server. However, it might be useful to use a naming convention for various materials, if you have things like "lava" that deals damage when walked, or "clouds" which isn't actually walkable.
enum Bool { True, False, FileNotFound };

Ahh good point on tagging certain places in the zone, thanks. I think I will explore this path for the server.

This topic is closed to new replies.

Advertisement