Faster map loading in item frames?

Discussion in 'Archived: Plugin Requests' started by BlackBeltPanda, Jan 5, 2014.

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

    BlackBeltPanda

    Hello,

    When Googling how to increase the render time of maps in item frames on my server, I came across this: https://forums.bukkit.org/threads/make-maps-render-faster.101661/

    Is it possible for someone to create a plugin utilizing that function that would allow me to specify certain maps within item frames to render faster? I.E. - I can run a command like "/fastload", right click an item frame containing a map, and then that map would use the "fast load" function?

    Right now I have a few signs at my server's spawn made from custom map images, but they load very slowly.
     
  2. Offline

    DarkRiddles

    Or you can add more ram to your minecraft to render fast, just a tought.
     
  3. Offline

    BlackBeltPanda

    What, an 8GB DDR3 server with an Intel Xeon E5-1600 CPU on a SSD isn't fast enough?
    As long as it renders faster inside the item frame after I put it back. Right now my signs take a long time to load, so players don't see them for a couple minutes. Also, the change has to be persistent, I can't take the maps out and put them back every time I restart the server. =)
     
  4. Offline

    DarkRiddles

    Dude, SSD for your server....
     
  5. Offline

    xepisolonxx


    it is true ram has nonthing to do with maps
     
  6. Offline

    BlackBeltPanda

    Dude, it's through a hosting company, of course they have their servers on SSDs. -_-
    This^
     
    Jamboozlez and timtower like this.
  7. Offline

    Me4502


    Why wouldn't someone use an SSD? IO is one of the larger bottlenecks of a minecraft server, not using an SSD or RAMDisk for a large server is just silly.
     
  8. Offline

    BlackBeltPanda

    Did some Googling, apparently this plugin uses the faster rendering function: https://github.com/Howaner/FramePicture/
    The plugin itself doesn't do what I need, but maybe the source can help you?
     
  9. Offline

    bobacadodl

    For anyone wanting to make this. Just use player.sendMap() method to do the instant rendering
     
  10. Offline

    BlackBeltPanda

    I think that's what T3h Cr33p3r is trying to do. =)
     
  11. Offline

    Syd

    Make sure to send the map only once (static maps) or only every few ticks (dynamic maps), otherwise you'll perform a DoS attack on the player's client.

    If the map is sended, there is no need to send it again. ;)

    Also, sendMap() seems to trigger render(), what causes the StackOverflowException in your log...
     
  12. Offline

    Garris0n

    It's not a DoS attack, it would kill their fps, not their internet.
     
    timtower likes this.
  13. Offline

    Syd

    Additional 320 KiB/s is a lot of traffic for some parts of the world. Even here in germany we have large areas with pretty bad internet (or no internet at all), so it would kill some peoples internet (as well as the FPS ofc).
     
  14. Offline

    Garris0n

    Ah, I see :)
     
  15. Offline

    BlackBeltPanda


    The maps are static, so it would be best to call the function when the player joins, maybe?



    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  16. Offline

    Syd

  17. Offline

    BlackBeltPanda

    No worries, thanks for trying. Anyone else want to give this a shot or am I going to have to learn Java today? XD
     
  18. Offline

    tenten8401

    i think your gonna have to learn java.
     
  19. Offline

    BlackBeltPanda

    Anyone want to give this a shot?
    Best way to do it would probably have a config file that stores a list of Map IDs, so I can add IDs to the list. The plugin could then check against that when rendering the map.
    Here's an example of player.sendmap(mapview): https://github.com/desht/ScrollingM...desht/scrollingmenusign/views/SMSMapView.java
    The function is at the end.
    Also, here's a couple threads on the subject for more information:
    https://forums.bukkit.org/threads/make-maps-update-instantly.196502/https://forums.bukkit.org/threads/map-api-refresh-speed.54091/
    I don't have a whole lot of time to spend learning a new programming language, unfortunately. =(
     
  20. Offline

    Maximvdw

    I've worked on this feature for a few months. It is possible, I was even able to render a .avi video in a map.
    To do this I used ProtocolLib to manually send packages. There are ways to do this without protocolLib, but they are not as fast.
     
  21. Offline

    BlackBeltPanda

    Still looking for someone willing to do this. =)
     
  22. Offline

    BlackBeltPanda

    Still haven't found a plugin that does this (and works). Anyone want to try?
     
    fromgate likes this.
  23. Offline

    hjogj5

    You can't load maps faster using a plugin. How fast they load goes from player to player according to how good their computer is at rendering them. One way to make them load a little faster is by adding more RAM to the server.
     
  24. Offline

    BlackBeltPanda

    Please read the thread before commenting, player.sendmap(map view) does this.
     
  25. Offline

    Me4502

    Adding more ram to the server will not improve map rendering time. And it has nothing to really do with how good the computer is at rendering. The client just renders the information it has, the server slowly sends the information.

    Edit:
    I am making this now, expect it in half an hour.

    Edit:
    Here it is, I forgot to upload it: https://dl.dropboxusercontent.com/u/20806998/FastMap.jar


    It's possible to do it without making a MapRenderer, I've already done it.

    https://dl.dropboxusercontent.com/u/20806998/FastMap.jar

    Right click maps with blaze rod to add them/remove them.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  26. Offline

    DemmyDemon

    Wow, Me4502 , that's pretty nice. Is the source available?
    I'd like to see exactly how that stuff works, if you don't mind?
     
  27. Offline

    Me4502


    Hmm, I'll keep it as is for now, unless its absolutely needed to be changed.


    Uh, yeah, I'll include the source code in the jar.
     
  28. Offline

    BlackBeltPanda

    Me4502 This works so great! The blaze rod is much easier than using commands or manually making a list. The only problem right now is the images only fast-load when you join. If I teleport to an area with custom images after I join, they load slowly, like normal. Is that something you can change? =)
     
  29. Offline

    Me4502


    Hmm, I'll look into if I can do it on player move, if the move is super far away.

    Edit: I just uploaded the changes, its the same link.
     
  30. Offline

    timtower Administrator Administrator Moderator

    Me4502 why not looked for the teleport event?
     
Thread Status:
Not open for further replies.

Share This Page