ChunkWorx V6 (rev. 787 compatible) - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html) +--- Thread: ChunkWorx V6 (rev. 787 compatible) (/thread-454.html) |
ChunkWorx V6 (rev. 787 compatible) - Taugeshtu - 05-31-2012 What it does: Grab a rectangular area, defined by start X,Z and end X,Z chunks, and forces server to generate/regenerate it. It also reports it's progress every 100 chunks, and don't causes generator queue overflow. v2 features:
How to use:
I think it could be helpful: generating a world before your players explore it could boost perfomance (dunno how fair is that related to MC-server, but it's quite fair for "regular" minecraft servers) One more note: you would better to kick all your players and yourself to give your server just one job to do - GENERATE!!!!11111 Use it at your own pleasure, no credits needed. Cheers. RE: ChunkWorx - FakeTruth - 05-31-2012 Congratulations! I like web plugins RE: ChunkWorx - xoft - 05-31-2012 (05-31-2012, 07:58 AM)Taugeshtu Wrote: GENERATE!!!! For no apparent reason I read that in a Dalek voice.... Exterminate! Exterminate! Nice plugin. RE: ChunkWorx - xoft - 05-31-2012 I have an improvement proposal for you It would be smart for the plugin to start pre-generating in the middle of the specified coords and work its way out spiral-wise, instead of going line by line. So if the process is stopped, you still get a reasonable area pregenerated. Then you could play with things such as stopping the pregeneration when too many players join, and restarting once they disconnect, etc. RE: ChunkWorx - Taugeshtu - 05-31-2012 Quote:I have an improvement proposal for youRight after point regen. Probably today) RE: ChunkWorx V2 - xoft - 06-01-2012 I'm doing a 60x60 chunk generation and MCServer spikes in memory usage - easily reaching 1 GiB RAM and crashing due to insufficient free RAM. I think it'd be a good thing to queue all chunks for saving and unload saved chunks each time you get 100 chunks generated. Also you might want to check the world storage queue length if it isn't too overtaxed. You need to utilize cWorld:SaveAllChunks() (already exists) and cWorld:UnloadUnusedChunks() (Not yet exported to Lua, I'll be committing that soon to the svn and uploading a nightbuild with that support) RE: ChunkWorx V2 - Taugeshtu - 06-01-2012 Quote:I'm doing a 60x60 chunk generation and MCServer spikes in memory usage - easily reaching 1 GiB RAMWeird enough... I had 30 MiB RAM usage while generating same ammount of chunks... Quote:I think it'd be a good thing to queue all chunks for saving and unload saved chunks each time you get 100 chunks generated.Sure. Just let me know when that commit will land RE: ChunkWorx V2 - xoft - 06-01-2012 Already done. You can see a current list of the commits here (just in case you didn't know ) http://code.google.com/p/mc-server/source/list RAM usage: It might have something to do with my machine being quadcore, so the generation and saving run in parallel. Also I've been testing some generator-related things, so I limited the generated stuff to minimum, which made the generator run about three times faster. Or maybe it's because of it being a Debug build. Who knows. RE: ChunkWorx V2 - Taugeshtu - 06-01-2012 Updated ChunkWorx version is there as well Try it, please (I really have no idea if I did it properly) RE: ChunkWorx V2 - xoft - 06-02-2012 I'm not using the additional features much, so I didn't test them. But I'm sorry to tell you that I broke your plugin in Rev 534 I removed the obsolete cRoot:GetWorld() function with no argument. Everyone should use cRoot:GetDefaultWorld() instead for getting the default world; cRoot:GetWorld() takes a string parameter for the world name. Also I added world enumeration to the cRoot API. It works similarly as player enumeration in cWorld - you call a ForEachWorld function with a callback parameter and then MCServer calls your callback once for each world, with the world as a parameter. Simple usage example (in your chunkworx_web.lua's HandleRequest_Generation() function): Code: local WorldTable = {} Two more things that would really help me: - remember the coords that I enter for generation. Store them in an INI file, I see you know how to do that already - besides the (StartX, StartZ, EndX, EndZ) coords, allow the user to enter (CenterX, CenterZ, Radius) coords as well. Much easier Your plugin is extremely helpful for my development right now - when I change a generator, instead of having to walk around with a player in MC, I just let your plugin generate an area and see it in a map nicely |