🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Server Spatial Awareness

posted in Septopus for project Unsettled World
Published November 20, 2018
Advertisement

I started working on generating the systems that will instantiate the NPCs, got it booted up, you can check my latest video upload in the gallery for that. ;)  But once I had that at a comfortable point to resume later, I decided I needed to close a planet sized gap in my server architecture.

So, thus far, I've got a pretty neat client simulation going on, several fairly nifty server systems that do some pretty neat stuff too.

A lot of ideas.... and a lack of glue.

Well, that is until I spent a few days sorting things out. And sorting things out..  And then resorting things out..  In the process I think I found what I was looking for. :D

https://github.com/gradientspace/geometry3Sharp

That's a nifty little double precision geometry/etc. library for C#, C# in Unity, and MOST IMPORTANTLY C# on Linux in .Net Core!  :D

Why is this important you ask?  I'll tell you. ;)  

Here you see the above library loading my planet mesh, rotating it to the appropriate angle, generating an AABB tree, and running 6 raycasts from 0,0,0 to verify the orientation of the mesh.

server_mesh_calibaration_windows.png.1b5dcc587811e23bc850055e984b663b.png

i.e. These numbers match the same points in the Unity client simulation.

And Here:

server_mesh_calibration_linux.png.83f127152b008eb723037add7c0c3f37.png

You see the same thing running on Linux. :D

Here you have(combined with the Redis database and the in memory input from clients) the mechanism(s) by which I will attempt to determine who IS where they say they are and IF they can physically be there or not. As well, who could have been there when they said they were.. If you get my drift.

I'm planning to use every useful feature of this library I can to build some nifty spatial awareness directly into each server node.  Every node should be able to plot and check any coordinate/line/box/sphere/etc it may need to find/verify/predict/etc. any movement in the game it has authority over. ;)

Since I'm not running a full physics simulation in a centralized fashion, this will have to fill in for the data one would have access to from said simulation.  Combined with the ability to record and compare maneuverability characteristics over time and correlate those to player stats and configurations, I think simple geometric calculations with sufficient time references could be just as effectively authoritative as a single physics simulation.  Especially in the case where a client is using some kind of prediction/local physics anyhow.

Next I get to integrate this into my Mob Server so I can start making interactions between the Player and the NPCs it generates, an actual verifiable thing. ;)

More soon! :D

Previous Entry It's NOT a Simulation! :D
Next Entry ALL STOP.
2 likes 0 comments

Comments

Rutin

Awesome stuff! :) 

November 20, 2018 09:45 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement