Server Side A Star Pathfinding

ruzip

New member
Joined
Jan 8, 2020
Messages
2
Programming Experience
3-5
I would like to know how would I go about implementing a simple server side A* pathfinding in C# or perhaps provide some existing resources to get this done.

I am currently using this C# solution, but this is client side only:
 
The logic is still going to be the same because an algorithm is an algorithm. You need to first understand the environment you're working in and how the server normally communicates with the client and then provide the appropriate communication to get the input data into your server-side code and the output back to the client. It sounds like you're making rather invalid assumptions about what it means to write code to run on a server.
 
What you should probably be doing is writing a method that takes the required inputs, performs the calculations and then returns the appropriate output. You can then use that same method anywhere. Each application may have a different way of gathering the inputs and using the outputs but the method that uses the former and returns the latter will be exactly the same regardless. You can then test that method in a simple client environment, e.g. WinForms or Console, to make sure that it works as intended. You can then confidently use it in a server environment, safe in the knowledge that any issues that arise are not related to that method.
 
Back
Top Bottom