twistedtail / combatnode Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
We shouldn't really trust the string given by the server, there's the scenario where it might be corrupted for any reason, which will produce an error on the C# layer. Instead, we should run this code inside a try-catch sentence and just push a false bool to the Lua stack if it failed.
The server should be able to request CNode a JSON from a specific grid in the case it requires to save it. In the same way, CNode should be able to create a grid by decoding a JSON given by the server.
For the moment, node connections only store the distance between the foot position of both nodes. This is just the base move cost between these two nodes. There can be another factors, detected within Gmod, that should affect this value (slope, ground material, crouching, swimming, walking on water, etc). This information could be stored inside the connection's Sides object.
For the moment, everything's hard-coded to use human sized nodes. It could be changed in the future to allow people to have multiple grids with different node sizes.
If the grid is loaded, the server seems to be incapable of shutting down properly and sits at around 1GB of memory consumption. Using the module's Unload method to clear everything could work, maybe the garbage collection is having trouble when trying to get rid of all that stuff.
Both of these processes are really expensive and will hang the server for a few seconds. We could run them inside a task so the server doesn't suffer from them.
Pathfinding methods are very roughly implemented. It'd be a good idea to clean them up and optimize some bits of them.
Generating and saving a grid has a really high impact on the server memory. I'm using gm_fork for testing and a single complete grid will consume nearly 2.4GB of RAM. Despite the 64x server doesn't really care about this, it's something that must be done.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.