Hurtworld Server heatmap

Discussion in 'Plugin Requests' started by ZTIF, Jul 19, 2016.

  1. A great resource when building a map would be to get some intel on where the players tend to move, set up base etc. This would allow you to tweak the design in order to balance the game and insert enemies, points of interest etc at the places where you need them.

    There is a rather lightweight mod made by Loborl that has half of this functionality already. Location for Hurtworld | Oxide

    What it needs is to give each player an id # and update a json file every x minutes with the timestamp + id + coordinates of each online id #.

    This can then be used to generate movement tracking and a heatmap using scripts like Heatmap (Canvas, JSON) .

    I understand that this can be used as a way to cheat by creepy admins, but then again - so could pretty much every admin console command.. And It can on the other side be a very powerful tool for admins and Modmakers. PS: Hoping I finally get some feedback on a request.
     
  2. I'm looking at the code in the oxide Location plugin. I think it's really basically just to run this line every x intervalls and somehow output the results i a json table..?
    Code:
    foreach (var player in players) playerLocData.Add(player.Name, GetLocation(player));
    Someone here should be able to combine these three things??
    Timed Execute | Oxide + Location for Hurtworld | Oxide + write to file = AWESOME SCRIPT!
     
  3. It can certainly be done.
    I might have time to put something together this weekend. I probably wont have time to check how this affects the server performance though but if it's run every x minutes rather than every second then it shouldn't be too much of an issue.

    Is this something you'll use yourself or is it just a general suggestion? I may recruit you to test it out, seeing as you suggested it ;)
     
  4. I'm definitely keen on using it. I'm hoping to host a two week test server with 20 slots as soon as possible to get feedback from players on the balance, performance, bugs and whatever else on a custom map I've been building, so I can fix it before releasing it on Steam workshop.

    I was just about to start a recruitment thread on steam, but I'll rather wait for you, because having tools to see where the players are moving and settling down would be *very* valuable to me - and even to Bankroll I would think, if they are not already using such tools.
     
  5. It's a good idea. There's already a map plugin out there but it's packaged in the form of a dll, which is far from ideal.
    I'll get on it over the weekend in between changing nappies (diapers) and get back to you as soon as I have it done.

    It should be noted that the data file may become large and start causing server lag after a period of time, so it may be a better idea to push the data out to a web service and save it into an external database.
     
  6. Great! I'll start recruiting test players and upgrade the server to run 20 slots on monday. Even if we don't have it all sorted as far as displaying the heatmap data by then, perhaps we'll at least be able to log location, timestamp and userid into a db or data file. ?
    I run a few websites with php and sql support so writing to an external sql db wouldn't be a problem for me in that matter.

    Feel free to hook me up on steam or discord.

    And if anyone is interested in joining the test team for Terra Nova - please shout out!
     
  7. Just wanted to post an update on this project.

    Sionn has done all of the heavy lifting by writing the oxide script that records each players location every minute and uploads them to a sql database. Some javascript then projects these coordinates on an overlay image of the map - thus generating a heatmap, which gives us a really intuitive real-time idea about which paths players tend to take and which areas they are farming in.

    It's still a work in progress, and as of now I'm a bit halted by trying to figure out the logic of Hurtwordlds 0,0 coordinates - which is not at center of the terrain. Making the heatmap somwhat offset at the moment.
    Some more features such as showing the heatmap of specific top ranking players and also animate the heatmap based on timestamps are on my list, allthough - perhaps somewhat out of my capable reach as a novice coder.

    Terra Nova Tracking (beta)