[INACTIVE][MISC] BananaMapRender 1.6 - generate a flatmap image render of your world [1000]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, Jun 3, 2011.

  1. Offline

    codename_B

    [​IMG]
    [​IMG]
    BananaMapRender
    a lightweight dynmap alternative - fater than ever

    Features:
    • Player names and faces on a map
    • ZOOMING!
    • Gorgeous map rendering
    • Monsters on a map
    • Monster spawners on map
    • Signs on map if the first line of the sign is [BMR]
    • Shows time of day
    • Super light on resources
    • Super fast rendering
    • Full multithreading support
    • Worldguard Regions
    • Worldborder borders (circle and square)
    • Permissions support
    • Configure everything the way you want it
    • MultiWorld support
    • Toggleable icons
    [​IMG]
    Version: 1.6
    Download: Download Link
    Commands: /bmr [value between 1 and 4] /bmr length
    Example Render: Here

    Instructions: These assume that you are running BukkitHTTPD as the web server on your host. If this is the case you don't need to change anything. Otherwise, please configure the correct directory for your web server install.

    • Place in plugins/ folder along with all the included libs and extra folders in the zip. The plugin will not create its own if these do not exist!
    • Start the server, then type bmr 1 into the console - wait for this to complete then continue running your server as normal!
    • Players will automatically generate the entire map over a period of weeks as they explore it, but if you wish, you can forcefully render areas of the map using /bmr in-game.
    • Navigate to http://yourip/worldname/
    • If you wish to have certain signs displaying on the map - have the first line of the sign be
    Code:
    [BMR]
    this
    is a
    sign
    Some more information:
    • The plugin keeps each 512px tile for 1 hour after creation. After this they are flagged for updating, either by your players as they wander around your map, or by you using /bmr [value]
    • Each bmr value is equal to (mcregion file+1)^2 so be careful when using large values as bmr 10 renders over 5k by 5k tiles!
    • The plugin will print a report when it is done rendering. It will look something like this.
    Code:
    2011-08-04 14:31:37 [INFO] Map rendering: 1 1 DONE
    2011-08-04 14:31:37 [INFO] Rendering complete: Took 190s to complete : 288 chunks rendered in total
    
    Live Examples:

    [​IMG]

    Credit Where Due:
    • clone1018 for minotar.net
    • Nijikokun for suggestion I use leaflet as the map system, and for the css and coding help
    • Demonen for all the testing and for writing a couple of functions for me
    • All the folks on the United Banana Empire for being super patient with me as I tested this plugin
    • Protected for doing a complete rewrite of some of my code for 0.3 - thankyou so so so much - I don't know what I'd do without you on my team! ^^
    • K900 for all his anti-noob nyan work :)
    Coming soon: progress on GitHub

    • Fun filters (not done)
    • Fix wierd chrome bugs (possibly done)
    • Flash based site (partially done)
    Changelog:

    • 0.0.1 - 01/06/2011 - released privately to beta testers.
    • 0.1 - 04/06/2011 - released publicly after adding lots of shiny features.
    • 0.2 - 06/06/2011 - implemented multiworld and added more entities.
    • 02.1 - 07/06/2011 - implemented biomes, changed mob formula, changed how ice looks to be more "icey" added sign and mob spawner display.
    • 1.0 - 09/06/2011
    • 1.1 - 15/06/2011 - added all sorts of anti-noob nyanerry - thanks K900!
    • 1.2 - 19/07/2011 - removed NMS references - increased performance - hopefully fixed sign bug
    • 1.5 - 04/08/2011 - new index.html - new rendering method - new chunksnapshot method increased performance - decreased lag
    • 1.6 - 16/08/2011 - reordered rendering logic, cleaned up memory leak, took out the cat, introduced the neighbors to my girlfriend, slowed down rendering so you don't even notice its happening when the server is running. Also it's a lot prettier.
     
  2. Offline

    oliverw92

    Spent ages trying to do that math so you could make it support larger maps, couldn't work it out though :(

    Does v1.0 solve the issue of the entire server lagging whilst BMR was updating tiles? Have you made us of the ChunkSnapshot thing?
     
  3. Offline

    codename_B

    Yes and yes.
    Also, it can support much larger maps - just things are going to be less specific, and depending on how you do it, there will probably be no zoom.

    Thanks for the nice note, I'm glad you're finding it useful :)

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

    RaCooN

    The live example is down, hence my question: is the render flat or semi-3D like DynMap? Where we can see depth and mountains etc.?
     
  5. Offline

    codename_B

    Hi, here's a static render that I've done because the live render will be down for the summer.
    http://tetragaming.com/codename_B/dev/leaflet/

    EDIT: Do you not see all the pictures in the OP of how it looks?
     
  6. Offline

    unsec

    Thanks for your concept and hard work but ... is it really to hard for you to write clasic 'readme' file with instruction of instalation? And prepare normal good for users zip with all files and all default create directories? Simple to install? One sub-pocket for install BMR without HTTPD and one with BMR and HTTPD. I try to install this 2 plugs in warious configurations and, generally, always have 'Unexpected Exception [..]' from the serwer - the map not works. I think I do something wrong but .. I want to simply install your plugs and be happy user. I don't want to think why this dont work properly, I have another problems to spend my time for. Than, If it's not the problem for you (couse you have the basic knowledge 'what the plugins author thinks...') , please please please, create the zip with basic instalation folders (cut and paste) and all will be happy. brgs.
     
  7. Offline

    oliverw92

    EDIT: never mind me, didn't update config.yml. Perhaps you could make it auto-create that, it doesn't take very much.


    EDIT: You sure you are properly running the renderer in a separate thread? I just updated to v1.0 and when i type /bmr 3 in chat the entire server holds until the rendering is finished.
     
  8. Offline

    codename_B

    You want to take a look at my code for me? I know it's threading, I'm just not very good at threading :p

    Hi, what aspect of the installation isn't clear? When it comes to things of this level (configuring ports etc) a README file just won't cover it. The zip for this has all the correct folders for you to drag and drop into your plugins/ folder so I don't see what the problem is there, this plugin should run with absolutely no configuration necessary at all, if it isn't working you're probably running an out of date version of bukkit.

    As far as BukkitHTTPD goes - that's something that's not going to be feasible, I just don't have the time nor inclination to write documentation of how to port forward for every single router model out there, your best bet is to consult your hardware vendor's website and look for further instructions there, as well as checking with your ISP.

    If there is any particular aspects of the installation that you are having trouble with, feel free to ask specific questions and I will be happy to answer them for you, but as I explained, a readme to cover all the nuances is out of the question, they're just "assumed" that anyone who is running a server of their own is able to google how to do things for themselves.

    Here's a really good article I found on how to "google" more efficiently that may help you in your quest to get things running.
    http://blog.hubspot.com/blog/tabid/6307/bid/1264/12-Quick-Tips-To-Search-Google-Like-An-Expert.aspx
     
  9. Offline

    benning2009

    dynmap is mutch better
     
  10. Offline

    codename_B

    For servers on high-end hardware with plenty of ram, sure.

    This plugin was made to fill a need on my server, and my server only. I released it in case anyone else had the need (ie. on limited ram/cpu but still wanted a live-ish map)
     
  11. Offline

    DomiStyle

    The better thing I see in this map is that it is static while dynmap requires a connection to the server all the time.

    We currently try to setup this map on our server.
    We get following error though:
    Code:
    WARNING] Task of 'BMR' generated an exception
    java.lang.NullPointerException
     at com.ubempire.render.PlayerScript.updateMapMarkers(PlayerScript.java:162)
     at com.ubempire.render.BananaMapRender$1.run(BananaMapRender.java:82)
     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:386)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-12 17:48:45 [WARNING] Task of 'BMR' generated an exception
    java.lang.NullPointerException
     at com.ubempire.render.PlayerScript.updateMapMarkers(PlayerScript.java:162)
     at com.ubempire.render.BananaMapRender.chunkToRender(BananaMapRender.java:119)
     at com.ubempire.render.BananaMapRender$2.run(BananaMapRender.java:89)
     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:386)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    The error appears when the server starts.
    It appears always appears 2 times.

    The plugin won't create the correct folders for our worlds.
    The plugin creates: world, nether.
    We have: world, nether, water, planet
    You can find our map here.
    We also experience problems with the signs not updating.

    Some ideas to solve our problems?

    Else I have to thank you for this plugin.
    It could take some more work but it already works pretty fine.
    I really like the look of the water though. :D
     
  12. Offline

    codename_B

    Hi, looks like there is something wrong in your config or you're running a build of bukkit before build 835.

    I need this information to proceed further in helping you.

    Bukkit version:
    Java version:
    Operating system:
    Contents of config file: (aka plugins/BMR/config.yml)

    EDIT: also please disable worldguard and worldborder in the config.yml if you're not using them on your server, as the error indicates it could be to do with that also.
     
  13. Offline

    DomiStyle

    Hello,
    Bukkit: 860
    Java: 6.0.240.7 64 bit
    OS: Windows 7 64 bit
    Config:
    Code:
    ##############################################################
    ### BananaMapRender configuration file - Review carefully! ###
    ##############################################################
    
    #Directory tiles world folders are placed in.
    directory: 'plugins/BMR/map/'
    
    #Amount of rendering threads used to generate the tiles. Lower if your server is being overwhelmed.
    #Never make it greater than the amount of physical cores in your CPU or CPUs.
    max-threads: 2
    
    #Maximum amount of rendering tile radius
    #Each one of these corresponds to an .mcregion file - so be careful with making it huge!
    #/bmr 4 does 2k blocks!
    max-render: 4
    
    #Amount of hours it takes for a tile to expire and require an update.
    expiration-hours: 1
    
    #How often, in minutes, should expired tiles with players in them be updated.
    tile-checker-frequency: 5
    
    #How often should all the markers in the map be updated, also in minutes.
    marker-updates-frequency: 1
    
    #WorldBorder integration
    worldborder:
        enable: true
        color: '#ff0000'
        opacity: 0.5
        fill-opacity: 0.0
    
    #WorldGuard integration
    worldguard-regions:
        enable: true
        color: '#0033ff'
        opacity: 0.5
        fill-opacity: 0.1
    
    #Entity marker options
    entities:
    
        #Blanket enable or disable entities. Disable here for maximum efficiency.
        #Must be enabled for all the other options in this block to work.
        enable: true
    
        #How many mobs to mark in each chunk (don't set this too high or the viewer will be slow).
        max-per-chunk: 3
    
        #Enable or disable each type of mob separately if you want:
        mobs:
            Pig: false
            Cow: false
            Sheep: false
            Chicken: false
            Creeper: false
            Skeleton: false
            Spider: false
            Zombie: false
            Wolf: false
            PigZombie: false
            Ghast: false
            Slime: false
            Squid: false
    
        #Enable or disable player position markers
        players: true
    
        #Enable or disable player name popups when the markers are clicked (requires player markers)
        player-popups: true
    
        #Enable or disable tamed wolves. If this is enabled, tamed wolves always show, they have a
        # different icon (red collar) and you can click them to see the name of their owner.
        tamed-wolves: false
    
    #Tile entity marker options
    tile-entities:
    
        #Blanket enable or disable tile entities. Disable here for maximum efficiency.
        #Must be enabled for all the other options in this block to work.
        enable: true
    
        #How many tile entities to mark in each chunk (don't set too high or the viewer will be slow).
        max-per-chunk: 3
    
        #Show creature spawners?
        spawners: false
    
        #If creature spawners are enabled, this is the chance of them actually showing.
        spawner-chance: 0.2
    
        #Show BMR signs? BMR signs are signs with [BMR] in the first line. Clicking the icon will
        #display the sign contents.
        signs: true
    edit: I should propably note:
    There is no webserver running in "plugins/BMR/map/".
    We upload the stuff via ftp.exe.
    The players.js every 5 minutes and the tiles every hour.
    That way we can export it to our Webspace.
     
  14. Offline

    codename_B

    Hi, please disable worldborder and worldguard in the config file and get back to me with if it works or not.

    Also, change the directory to 'plugins/BMR/'

    Each world will create its own folder.
     
  15. Offline

    K900

    You missed a null check. Don't want to send you a pull request till I'm done with some other stuff I want to change in my branch, so PlayerScript.java:169+ http://paste.pro/1866340
     
  16. Offline

    codename_B

    Ah thanks ^^

    I'll wait for the pull request before pushing an update out there.
     
  17. Offline

    K900

    Ok then. I've done: NPE fix, removed unnecessary nether argument for GeneratorThread() and new command syntax e.g. /bmr 1 world (world, not 0 or 1 or whatever numeric index).
    TBD: Copy example_world automatically.
     
  18. Offline

    codename_B

    Nice :D thanks for all your help! This is the first time I've had community involvement on a plugin of mine and I've got to say it really makes a difference with the quality of code being produced ^^
     
  19. Offline

    K900

    Also, trailing backslashes.
     
  20. Offline

    codename_B

    I know :p that one is just me being lazy
     
  21. Offline

    K900

    Okay, more foolproofness on the way, no longer getting exceptions on non-existant worlds.

    Added hide players, template copying, EPIC FOOLPROOFNESS, now let's get IntelliJ to integrate with GitHub ;)

    Sent you a pull request :)

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

    codename_B

    :) will take a once over and figure how to integrate pull requests :p

    Merged - will integrate with main version once I've had a play :D

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

    K900

    Ok, I see it's merged now.

    Even more stuff on the way: Permissions (YEAH!), custom attribution strings (no more Maps of the United Banana Empire on your banana-protected server!), world aliases, a new version of Leaflet the map engine, mass code cleanup (removed a whole class that was not used) and some little fixes.

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

    Nikademus

    I'm trying this plugin, running with Apache. I get this after typing BMR 1 at the console:
    Code:
    2011-06-13 12:20:20 [INFO] Map rendering: 0 0 START
    2011-06-13 12:20:20 [SEVERE] Did you even create config.yml?
    2011-06-13 12:20:20 [INFO] Map rendering: 0 0 DONE
    2011-06-13 12:20:28 [INFO] Map rendering: -1 -1 START
    2011-06-13 12:20:28 [SEVERE] Did you even create config.yml?
    2011-06-13 12:20:28 [INFO] Map rendering: -1 -1 DONE
    2011-06-13 12:20:34 [INFO] Map rendering: -1 0 START
    2011-06-13 12:20:34 [SEVERE] Did you even create config.yml?
    2011-06-13 12:20:34 [INFO] Map rendering: -1 0 DONE
    My config file does exist, and is in /plugins/BMR
     
  25. Offline

    K900

    Try http://rghost.ru/10718051 and give more detailed logs. It's my from my branch but it should at least give some idea of where the error comes from. Or fix it ;)
     
  26. Offline

    Nikademus

    Here it is:
    Code:
    2011-06-13 15:06:40 [INFO] Starting map render
    2011-06-13 15:06:40 [INFO] Start copying template files...
    2011-06-13 15:06:40 [INFO] Done copying files.
    2011-06-13 15:06:40 [INFO] Source files not found! Please check if you have everything set up correctly.
    2011-06-13 15:06:40 [SEVERE] java.io.FileNotFoundException: plugins\BMR\template (The system cannot find the file specified)
    2011-06-13 15:06:40 [SEVERE]     at java.io.FileInputStream.open(Native Method)
    2011-06-13 15:06:40 [SEVERE]     at java.io.FileInputStream.<init>(Unknown Source)
    2011-06-13 15:06:40 [SEVERE]     at com.ubempire.render.CopierThread.copy(CopierThread.java:37)
    2011-06-13 15:06:40 [SEVERE]     at com.ubempire.render.CopierThread.run(CopierThread.java:60)
    2011-06-13 15:06:42 [INFO] Map rendering: 0 0 START
    2011-06-13 15:06:42 [SEVERE] Did you even create config.yml?
    2011-06-13 15:06:42 [SEVERE] javax.imageio.IIOException: Can't create output stream!
    2011-06-13 15:06:42 [SEVERE]     at javax.imageio.ImageIO.write(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     at com.ubempire.render.ChunkToPng.makeTile(ChunkToPng.java:102)
    2011-06-13 15:06:42 [SEVERE]     at com.ubempire.render.GeneratorThread.run(GeneratorThread.java:39)
    2011-06-13 15:06:42 [SEVERE] Caused by: javax.imageio.IIOException: Can't create cache file!
    2011-06-13 15:06:42 [SEVERE]     at javax.imageio.ImageIO.createImageOutputStream(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     ... 3 more
    2011-06-13 15:06:42 [SEVERE] Caused by: java.io.IOException: Access is denied
    2011-06-13 15:06:42 [SEVERE]     at java.io.WinNTFileSystem.createFileExclusively(Native Method)
    2011-06-13 15:06:42 [SEVERE]     at java.io.File.checkAndCreate(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     at java.io.File.createTempFile(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     at javax.imageio.stream.FileCacheImageOutputStream.<init>(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(Unknown Source)
    2011-06-13 15:06:42 [SEVERE]     ... 4 more
    2011-06-13 15:06:42 [INFO] Map rendering: 0 0 DONE
     
  27. Offline

    K900

    java.io.IOException: Access is denied
    That's it. Check your access rights and stuff. The first error can be ignored, it's because of changes in master.
     
  28. Offline

    Nikademus

    What is it trying to access?
     
  29. Offline

    K900

    A chunk image. It's in plugins/BukkitHTTPD/<worldname>/x,y.png by default
     
  30. Offline

    Nikademus

    I'm using Apache, and it's created 8 0 byte .png files in the directory I specified.
     
  31. Offline

    K900

    Then check if you can actually write to these files. It's failing because of no access.
     

Share This Page