Pyfa 16 Posted February 16, 2023 This is a little side project I worked on that allows me to build WebNode paths that automatically connect into the existing WebNode map. You just click to create the path and it'll auto create code for you to use in building your script, the auto connection it shows visually use the same algorithm the client uses to find the nearest node. You can take a look at the website here: https://map.pyfa.dev/webnodes firefox_XgCsYh7Reb.mp4
TheHero 6 Posted March 26, 2023 just used this to map a completely unmapped area. so much easier then doing it manually, plus useful for checking if areas are mapped or not. great tool. thoughts about open sourcing it? Oh also it appears to load very slowly for me. not really sure what causes that, although on a refresh it appears to be fine so it appears to cache whatever the issue is.
Pyfa 16 Author Posted March 26, 2023 10 hours ago, TheHero said: just used this to map a completely unmapped area. so much easier then doing it manually, plus useful for checking if areas are mapped or not. great tool. thoughts about open sourcing it? Oh also it appears to load very slowly for me. not really sure what causes that, although on a refresh it appears to be fine so it appears to cache whatever the issue is. It's basically open source as is, I don't do any obfuscating of the code when it's delivered to the client but I may put it up on Github. Yeah loading times are iffy, it loads a large number of items (the image tiles) and most browsers limit the number of simultaneous connections. On top of that I'm using Cloudflare R2 which aggressively purges its cache. The only non open source bit right now is how I extract the webnodes, here's the snippet of how I do that. FileWriter fw = new FileWriter("webnodes.json", true); BufferedWriter bw = new BufferedWriter(fw); JsonObject jsObj = new JsonObject(); JsonArray extractedNodes = new JsonArray(); Iterator<AbstractWebNode> allWebNodes = WebFinder.getWebFinder().getAll().iterator(); while (allWebNodes.hasNext()) { AbstractWebNode webNode = allWebNodes.next(); JsonObject extractedNode = new JsonObject(); extractedNode.addProperty("type", webNode.getType().toString()); extractedNode.addProperty("x", webNode.getX()); extractedNode.addProperty("y", webNode.getY()); extractedNode.addProperty("z", webNode.getZ()); JsonArray connectedNodes = new JsonArray(); for (AbstractWebNode connectingNode : webNode.getConnections()) { JsonObject connectedNode = new JsonObject(); connectedNode.addProperty("type", connectingNode.getType().toString()); connectedNode.addProperty("x", connectingNode.getX()); connectedNode.addProperty("y", connectingNode.getY()); connectedNode.addProperty("z", connectingNode.getZ()); connectedNodes.add(connectedNode); } extractedNode.add("connections", connectedNodes); extractedNodes.add(extractedNode); } jsObj.add("nodes", extractedNodes); bw.write(jsObj.toString()); bw.close();
Recommended Posts
Archived
This topic is now archived and is closed to further replies.