Multiworld! Nether! A planet full of creepers!

Discussion in 'Bukkit News' started by Dinnerbone, Feb 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Raphfrk

    The current rule is that a world will never unload its spawn point, so there would be memory usage for unloaded worlds.

    You could use the new unloadChunk() method which unconditionally unloads chunks. That should eliminate most of the memory usage for the world.
     
  2. Offline

    4am

    What causes the sky to change? If the sky can be defined at login, can you send a packet that causes the client to flip, or can this only occur at login time? Also, are chunks sent compressed (run-length encoding or something) or are they a 1-1 data transfer? If you know what chunks each client presently has loaded, you can fire off chunks of all-0 before you start feeding the world they've just moved into, which eliminates them seeing pieces of both worlds until they move around.

    Unless of course you can't push a chunk to the client (why not then just push the new world's chunks right away...)

    Perhaps Mojang should get a request to add server chunk push? Client can decline if the chunk isn't in their view to prevent memory leaks and wasted CPU...
    --- merged: Feb 9, 2011 12:33 AM ---
    Yeah but a spawn point is just a vector, that's like 20 bytes (5x float)? I'm more worried about gigs of chunk data. Then again, the server shouldn't be retaining unused chunks, and you wouldn't really unload a world that someone is using just to save memory. Does the server actively de-allocate unused memory, or is it just relaying on Java's GC? :eek:
     
  3. Offline

    Raphfrk

    When you login, there is a field in the login packet. The problem is that if you resend the packet, it causes the client to bring up the "loading data" screen.

    What is supposed to happen is that when you then send a player_move packet, it removes the screen. However, there is a variable that defaults to true when you login the first time. If this is false, it won't remove the loading screen.

    So,

    variable defaults to true
    - login packet received, so load screen is brought up
    - <loads of data sent>
    - player move packet received and variable is true, so screen is removed
    -- variable set to false
    - more player move packets have no effect
    - <you stay on that world for a while>
    - you change worlds
    - another login packet is received, so the load screen is brought up
    - player move packet received, but now the variable is false, so it is ignored

    They are compressed (gzip). In fact, the teleport process inherently orders a blanking of the chunk data. However, the client doesn't actually do it instantly, since the chunks are handled in an order.

    The process is unload and then reload. I think they have a "spiral load" process. They load the nearest chunks first.

    Maybe they could reorder it so that it sends the 0x32 (unload) packets first and then the 0x33 packets. It would probably be best to do it

    unload and then load the player's current chunk
    unload and then load the nearest 8 chunks
    unload the rest
    load the rest

    However, that is a matter of aesthetics.

    The server handles all chunk management. It is crazy, the client can't ask for a missing chunk. If the server thinks your client has it, then it won't ever be sent.

    I meant spawn area. Anything within around 256 blocks of the spawn point is never unloaded.

    The GC doesn't do anything if there are still references.

    From my reading, all blocks within around 160 blocks are a player are kept in memory and 256 blocks of spawn. Effectively the only time a chunk is removed is if a player moves away from it.

    Also, if you use the loadChunk() API method, it loads the chunk unconditionally and that is never removed. A player would have to go there and then leave to trigger the removal.
     
  4. Offline

    koguchi

    I didnt read all 4 pages, i might do so now.
    But yeh, for some reason earlier today, something glitched and we have the nether..
    for somone reason /spawn took us there and we can only get out when somone else joins the server and we TP to them..

    so confused, somone linked to to this so now i have some rough idea as to what happened.
    I re-installed some plugins that are up to date..and then this happened.

    I dont know how it happened? or how to undo it..
     
  5. Offline

    Dinnerbone Bukkit Team Member

    Last page:


    (Hint: It's probably the same one giving you /spawn. Find out what that is.)
     
  6. Offline

    koguchi

    I use Essentials for spawn so maybe its that..
     
  7. Offline

    Rallerbabz

    is it possible to have different settings, inventories and stuff? - I mean, everything seperated also plugins :)
    x-sample:
    world 1:
    pvp is allowed, I have 3 plugins, /item is allowed for everyone.
    world 2:
    pvp is disabled, I have no plugins and /item isnt allowed for anyone.
     
  8. Offline

    FloydATC

    @Dinnerbone: You've outdone yourself this time, simply brilliant :)
     
  9. Offline

    sadleric

  10. Offline

    Dinnerbone Bukkit Team Member

    That's code. It's not a command for you to type in the console, sorry for the confusion!

    If you're using netherbone, it already made a world "netherworld" for you. Just go ingame and type "/goto nether" :)
     
  11. Offline

    fofogogo23

    Ok so this is Multi world, so it's not oNLY the nether right? Because I would like my players to appear in a room with 4 portals, each portal pointing to a different map. Would that be achievable? Which plugins could I use to acheive this? I have the world files, all I want is to have a portal which brings someone to that world? That would pwn :D
     
  12. Offline

    Slide974

    Hi,
    1 world = 1 core ? for multi core processor ? Or X world = 1 core... ?
    Thx
     
  13. Offline

    Dinnerbone Bukkit Team Member

    Minecraft is multithreaded. What cores it runs on is completely up to your operating system.
     
  14. Offline

    Dodecha

    Seem to get an outofmemory error after the nether got enabled, been feeding the craftbukkit process more and more heap space, it lasted longer before crashing this time with a heap size of 2048mb.
    Increased heapsize to 4gb and crossing my fingers..

    I cant seem to find any way on disabling nether, is there?
     
  15. Offline

    Raphfrk

    This is no longer the case. The worlds are stored as a HashMap. Iteration order is not consistent.

    In fact, I think it isn't even really guaranteed to be constant every time the iterator is called.
     
  16. Offline

    Dinnerbone Bukkit Team Member

    Find out what plugin is giving you the nether, see if it has a way to disable the nether, if it doesn't then disable the plugin and yell at the author.
     
  17. Offline

    Raphfrk

    I created a pull request to fix this issue.
     
  18. Offline

    fofogogo23


    Any answer?
     
  19. Offline

    Dinnerbone Bukkit Team Member

    Correct, it's multiworld, any amount of worlds of any type. I can't suggest any plugins though, have a look around.
     
  20. Offline

    Shoot

    @Dinnerbone
    Hmm... any way to add worlds to load onto the world list? I'm planning on having a custom nether/other world for my players to use
     
  21. Offline

    distortednet

    Wowww this is AMAZING. i cant wait for future improvements on this. if mojang pushes the updated needed, i will jizz my pants. i just updated bukkit and my plugins. im using Essentials, premissions, whitelist, worldedit.

    the General essentials doesnt really work out too good for me on the new setup, and Kgeneral ignores my premissions directives. Configuring yml files is a little weird at first but im getting the hang of it.

    FYI essentials has a shweeeet feature where when a player exists the server it frees up allocated ram that player was using. I have seen my ram usage drop from using 1.2-2 gigs to 600 megs-1 gig, so there is a preformance gain for me.

    THANKS, BUKKIT TEAM
     
  22. Offline

    LucidLethargy

    I am running a few plugins currently, and I have played around with multiworld quite a bit, but I do have one question...

    Does this support more than two worlds currently?
    I have the Nether, of course, but I also wanted to bring in another world we've played around with when hMod was down ages ago. I have a lot of players who want that more than the nether, in fact, but I'd still like to run the nether anyway if possible!

    Anyway fantastic work, and hopefully someone has an answer to this question!

    Edit: I see someone already answered my question... although it's strange that I can't make this happen. I'm running multiple plugins but they all seem to be limited to 2 worlds : /
     
  23. Offline

    talbot

    i have this same question. though i suppose i'd have to ask for a permissions plugin with multiworld support. so reworded question, is this even possible?
     
  24. Offline

    Raphfrk

    Server Port can load lots of worlds. The only reason I can think that some plugins are limited to 2 is that Dinnerbone's reference code has a nether and a normal world.

    Anyway, with Server Port you type

    /serverport worldlist normal.world2
    /serverport worldlist normal.world3
    /serverport worldlist nether.world1;nether
    /serverport worldlist normal.world4
    /serverport worldlist nether.world2;nether

    /serverport loadworlds

    This will create 3 new normal worlds with names "normal.world2" "normal.world3" "normal.world4" and 2 new nether worlds "nether.world1" and "nether.world2".

    You can remove worlds by typing the command again.

    /serverport worldlist normal.world3

    would remove the world from the list. However, worlds stay active until a reboot.

    Also, admins can teleport between worlds with /pos x y z world-id

    So, "/pos 70 70 70 2" would send you to the 2nd new world "normal.world3" and position 70 70 70.

    World names should not be to long as you need to enter them into signs. Also, there are only certain characters allowed in world names (for use with signs in Server Port).
     
  25. Offline

    Tomato

    is the map format the same to the point where I can create a world using a plugin then delete that map and copy over an existing world? I want to use the biome mod gen to create a bunch of prerendered worlds(like a desert planet) and have them all linked in a multi-verse.
     
  26. Offline

    Dinnerbone Bukkit Team Member

  27. Offline

    Xemnas33

    I found this quite amusing watching them be pummelled by the ghasts. Anyway Great job Dinnerbone keep up the great work! :)

    [​IMG]
     
  28. Offline

    Raphfrk

    I am getting massive CPU usage when I teleport to the 2nd world.

    It jumps from around 5% to 30%. It drops back down when I teleport back to the default world.
     
  29. Offline

    NathanWolf

    NetherGate has Permissions support :)
    --- merged: Feb 11, 2011 7:55 PM ---
    Nethergate has a "/nether create world <name> [normal]" command, too....

    Guess I should've been watching this thread! ;)

    --- merged: Feb 11, 2011 7:56 PM ---
    So, I've really been hating on ghasts lately.

    Are there any plugins out there that can control mob spawning? Can someone PM me if so?

    Can a dev also PM me if they know that blocking entity spawning is not possible yet?

    I've started writing a CrowdControl plugin, mainly so I can test NetherGate without getting blown up constantly.

    I'm not too interested in it as a long-term project, though, so if there is something like that out there already, please let me know! Thanks.
    --- merged: Feb 11, 2011 7:57 PM ---
    Oh, right, and the reason I actually came in here :D

    Once I'm done, if you install CrowdControl and NetherGate (and turn monster spawning on in server.properties), you will literally be able to have a "Planet Full of Creepers", if you want :)

    Just thought that was fun.
    --- merged: Feb 11, 2011 8:13 PM ---
    Oh, finally- I wanted to share my public server setup- anyone is welcome to come play around with NetherGate if you like (and Spells, guests have full access!)

    mine.elmakers.com

    I test stuff out there, so if things are seeming wonky, that's probably why :)

    Now, I really have to thank @Dinnerbone for this one. A million times over!

    I've had this server set up for a while, for me and my friends. It's always been public, and even the security through obscurity is pretty weak- com.elmakers.mine is the beginning of all my plugin classpaths :)

    Anyway, I've always wanted to invite you all to come play, but well- as anyone who has followed the Permissions "drama" in the Spells thread knows, they are very dangerous- and I like my world!

    So, long-story-short-too-late, here's my server setup, now, thanks to this incredible new tech:

    I started with a normal/nether pair- this is actually my original world, from way back when I started playing single player. This is why I'm so attached to it :)

    NetherGate + multiworld restores its former SP glory. I'm hoping that when I get the world scaling and location mapping working, I'll actually be able to re-activate my old portal hub. I've already found it once while testing, but haven't since...

    Anyway, I also have a mirror of both of those worlds set up- I just cp -R'd them on the filesystem, then used "/nether create world" to bring them in (make sure you specify the correct environment type!!)

    I made the normal mirror world the default. Each world is setup to auto-bind portals to its pair, and voila- two completely separate universes.

    I can use "/nether go <worldname>" to switch back and forth between "universes", and normal users can come and play, completely unaware that there are two other worlds sitting around.

    My machine is over a decade old, and (except when I'm testing location mapping, and it's throwing me around randomly in the Nether) it actually performs pretty well, even with all 4 worlds loaded. (I've actually got 5, but I rarely go to the fifth, it's not setup to auto-bind, and the actual World itself is load-on-demand, so that doesn't really count)

    So, yeah, I'd say, given what all it's doing, multi-world gets a super A+ from me, in terms of performance. I've got some kinks to work out on my end, but with scaling turned off (1:1), Tp'ing is instantantaneous back and forth, at least around spawn- it's really pretty awesome.
     
  30. Offline

    DurtyFree

    Yes me too, i think the reason for this are the monster, the ghasts fireballs
     
Thread Status:
Not open for further replies.

Share This Page