• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Improvements for the dedicated server

Alloc, I'm not sure if this has already been posted about, but there are so many posts about your mod that I can't find anything.

Our server map has grown enormous. Opening the webpage and zooming in/out causes noticeable lag and CPU spikes on the server, affecting gameplay.

What can I do to optimize the webserver map?

 
Hi Alloc & everyone.
So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free!

Here's the list of new command, they should be self-explanatory but they all generate help when called without parameters

AddBuffIn.cs

AddBuffOn.cs

AddLootAt.cs

CountEnemyEntityIn.cs

CountEntityIn.cs

GetBlockAt.cs

GetDensityAt.cs

GetLootAt.cs

KillEnemyEntityIn.cs

ListBuffIn.cs

ListBuffOn.cs

ListEnemyEntityIn.cs

ListEntityIn.cs

RemoveBuffIn.cs

RemoveBuffOn.cs

RetrieveLootAt.cs

SetBlockAt.cs

SetBlockIn.cs

SetDensityAt.cs

SetPropOn.cs

SpawnEntityAt.cs

SpawnHordAt.cs

UnlockAt.cs

All commands that finish with "in" takes a shape as parameter, so it's possible to do "batch" command. Or for instance, building shapes in blocks, killing enemies that are within/outside a distance of any players, etc.

Here's the shapes available as of now:

ShapeAll.cs

ShapeBox.cs

ShapeEntityProx.cs

ShapePlayersProx.cs

ShapeSphere.cs

Have fun! :)
This is great work. I can see a lot of uses for these commands already. Especially buffs via server commands. It also seems it would be possible to do some interesting anti-cheating stuff that I won't go into detail here. Oh and proper selling of items looks to be possible with these commands, so a resource trade system could become quite advanced with these commands.

Will this be updated in parallel with allocs fixes? Or is alloc planning to incorporate this functionality at some point?

 
Hi Alloc & everyone.
So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free!

...
Wow, quite a bunch of nice additions :)

Currently not planning to integrate it, I'm hoping to get the console rework done soon that should hopefully also allow adding such additions more easily. Then we don't have to put everything into a single DLL anymore ;)

Our server map has grown enormous. Opening the webpage and zooming in/out causes noticeable lag and CPU spikes on the server, affecting gameplay.What can I do to optimize the webserver map?
Feared this would happen at some point :(

Especially when zooming the browser requests a *lot* of tile files. You could reduce the number of files by changing the tilesize to 256 though that would require to reset the map (and optionally completely rerender it afterwards). Can't tell you how much of an improvement this would be but as doubling the tilesize basically divides the number of requests by 4 it could help. If you want to do that shutdown the server, go to the map-folder of the savegame, open the mapinfo.json, replace the 128 for blocksize with 256 (theoretically 512 should work too, wouldn't recommend it though as it will trade file count against performance for the actual rendering code), delete all the subfolders, start the server again.

 
Maybe some smart person can make the webserver throttle map file access?
One of my players ran the tiles through an optimisation tool and managed to halve all the file sizes, might be an option.

 
Maybe some smart person can make the webserver throttle map file access?
Could help a bit but the major problem is probably the amount of requests, not the individual file size.

Hey me again!I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld
Wondering ... you don't use the game's rendering capabilities, do you? Looks like you added kind of an own renderer based on the blocks?

 
yeah I've coded my own voxel raycast, the one in the game use Unity's physics raycast on the terrain generated mesh. That wouldn't work since it won't hit chunks that are not loaded.

 
yeah I've coded my own voxel raycast, the one in the game use Unity's physics raycast on the terrain generated mesh. That wouldn't work since it won't hit chunks that are not loaded.
Interesting :)

Wonder how much of an additional impact that has on performance.

By the way Alloc, is it ok it I make a distribution of your project with the code I made? I'd like to share it with everyone. :)
Sure, you wouldn't be the first one anyway ;)

 
Interesting :) Wonder how much of an additional impact that has on performance.
I've fully multi-threaded the rendering so it ain't that bad. The renderer workers are mostly waiting for chunks to load in the background. Overall I managed to yield about 20 map chunks per second using 6 render thread.

Sure, you wouldn't be the first one anyway
Awesome thank! :D

 
Originally Posted by StephanieRct View PostHey me again!

I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld
Is the website for it working? Timing out for me..

Code:
Tracing route to 66.103.130.62 over a maximum of 30 hops

 1    <1 ms    <1 ms    <1 ms  192.168.1.100
 2     1 ms     1 ms     1 ms  lo0.bng1.mel8.on.ii.net [150.101.32.78]
 3     2 ms     1 ms     2 ms  ae7.cr1.mel4.on.ii.net [150.101.33.171]
 4    13 ms    13 ms    22 ms  ae2.br1.syd7.on.ii.net [150.101.33.28]
 5   164 ms   164 ms   164 ms  te0-1-1-2.br1.sjc2.on.ii.net [150.101.33.193]
 6   167 ms   167 ms   168 ms  sl-st31-sj-.sprintlink.net [144.223.242.137]
 7   161 ms   167 ms   160 ms  sl-st50-sj-.sprintlink.net [144.232.0.164]
 8   168 ms   164 ms   164 ms  144.232.19.34
 9   275 ms   276 ms   277 ms  ae-1-8.bar1.Orlando1.Level3.net [4.69.137.149]
10   223 ms   225 ms   223 ms  GIGLINX-INC.bar1.Orlando1.Level3.net [4.31.181.1
42]
11   252 ms   253 ms   252 ms  66.103.132.177
12     *        *        *     Request timed out.
 
Hey me again!I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld

View attachment 7201

I still have a couple if small issues to fix but I couldn't wait to share this :3
awesome.. its like minecraft dynmap for 7dtd

only thing is the show regions grid... maybe you could have the renderer just paint the region grid onto the relevant tiles as an option for a more accurate grid line, like a faint dotted line that goes over the blocks.. instead of an js overlay that wouldn't be 100% accurate..

 
Hi Alloc,

I assumed this question would have been asked by now.

Are you aware of any telnet changes with the new A11 update.

Cheers.

 
not sure if it is a known issue or not, but after I added this dedipatch to my server and rendered it, the region files were reset to default.

Any way to fix this? Everytime I apply a backup, they reset to default again.

 
Hi Alloc,
I assumed this question would have been asked by now.

Are you aware of any telnet changes with the new A11 update.

Cheers.

I asked Alloc about it, he said:

probably a bunch, but nothing that should have a really great impact on users
So i guess good news ;)

 
not sure if it is a known issue or not, but after I added this dedipatch to my server and rendered it, the region files were reset to default.Any way to fix this? Everytime I apply a backup, they reset to default again.
Haven't seen / heard anything like this before. Can you do it again and provide the log afterwards?

 
Back
Top