DYNAMIC GENERATED MAPS _________________________________________ PLUGIN MAIN IDEA: The plugin should make the centre of the map lock on to the player so where the player go's the map would follow generating the world, this could be a potentially good popular plugin to make! PLUGIN REQUESTS: I would love the maker of this plugin to note/show the idea was thought by me toxictroop and by the team at: http://www.crossfiregaming.net/ The request above would be very appreciated!! thanks and have fun developing this plugin! PS. I DONT WANT TO HEAR DYNMAP IN THIS THREAD!! THE PLUGIN NEEDS TO WORK FOR THE VANILLA MAP AS A MINIMAP FOR THE PLAYER.
He want a vanilla map item that works like a minimap, showing the area around the player. Also following the player, so the player is always in the middle of the map.
@toxictroop I'm currently working on it. However, there a some serious problems: 1. the map does not render very fast (~5-6 seconds to update the map after moving a bit) 2. it costs a lot of server performance The max. resolution I was able to use without crashing the server was 512x512, but only for 1 player with an update every second. (Default update time is 20 times per second - every tick) But the current code is more like proof of concept than final code. I'll look into optimizing it tomorrow.
@toxictroop http://www.craftlancer.de/Plugins/ServerMinimap.jar A small Beta/Proof of concept version. Map #0 is the minimap and for every user specific. You can configure the scale from 0 to 4. The size of the map is 128*scaleĀ². The 2nd value is linesPerRun, which defines how many of the 128 lines are rendered every tick. (1 tick = 1/20 second) More linesPerRun makes the rendering faster, but need more performance. Last but not least you need to map a color to every block under the 'color' config key. Colors are values between 0 and 55. This part may will take a while... I hope it is what you expected.^^ If you have any suggestions for new features (e.g. more marker) feel free to post them...
Is there any error message or other output I can work with? Edit: nvm, found the error. Will reupload a fixed version. -> http://www.craftlancer.de/Plugins/ServerMinimap.jar
Thanks ^_^ testing now. Ok i have tested, but the map does not seem to follow the player? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Are you using the map with Id 0? It should follow the player, while not showing much details with the default config.
Is there any error message in log? I just uploaded a new version (link is the same), which fixes one error...
thanks ^_^ Is there anyway i can make the whole map refresh every tick? Oh ^_^ could you add players to the maps if thats possible, just like when multiple players have maps they show up on the map, but what im wanting is them to show on map even if they dont have a map :3? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Set the config value "linespertick" to 128, and it will reload the map every second. (However, it'll still take about 6 seconds to have a clear map) But I don't recommend to do so, as it'll also increase your server load dramaticly So basicly player radar. It's on my TODO list.
Also another thing, the player direction is screwed up, i go-towards water on the map, and the map indicated im moving away instead of towards. hope you can sort this ^_^ I cant get water on-map to work its always transparent WATER: 20 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Try STATIONARY_WATER, as MC uses 2 different Blocks for water. When I add player markers, I'll try to fix the orientation of the markers, too. toxictroop I just uploaded a new version. Other player in range will be shown on the map (Can be deactivaed by adding/setting "canSeeOthers: false" to config) and the orientation of the markers should work now. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Ok Cheers! great work!!! Oh cheers for the colours and blocks you added ^_^ The water still seems to be transparent for some odd reason. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Go ahead, the source is included in the .jar There should be plenty of room for optimisation, as the current version is more like proof of concept.
I've made progress on a more useable version of the plugin. The first big change is, that the map is now cached in a chuck system, compareable to the one in minecraft. This decreases the CPU usage dramatically (while increasing RAM usage), as a map pixel is only calculated once when it's needed and every time it gets an update. (Like someone placed a block) The needed updates are collected in a queue and will be executed every x ticks (configuable), but only a configurable amount of 16x16 pixel chucks per run. The second expansion is an update on the sending mechanism, as Bukkit already has a Player#sendMap() method. So I added a method to send the minimap every x (configurable) ticks to every player with the permission "minimap.fastupdate". It provides almost instand map updates. However, this feature is pretty bandwidth hungry. Every time you send a complete Map it needs to send ~128*128 bytes, what makes a total of about 16KiB. When you send the map every 20 ticks (1 second) you'll have a additional bandwith usage of 16KiB/s per Player. The config has also changed a bit. "linesPerRun" is now "chucksPerRun" and defines the amount of 16*16*scaleĀ² chucks, that will be rendered every run. "runPerTicks" defines every x ticks the queued updates are calculated. "fastTicks" defines every x ticks the full map is sent to every player with the "minimap.fastupdate" permission. DL Link, as always: http://www.craftlancer.de/Plugins/ServerMinimap.jar
thanks so much! 16:23:42 [WARNING] [ServerMinimap] Task #22 for ServerMinimap v0.3 generated an exception java.lang.NullPointerException at org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer.sendMap(CraftPlayer.java:338) at de.craftlancer.serverminimap.SendTask.run(SendTask.java:14) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftTask.run(CraftTask.java:58) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:509) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) error? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
@toxictroop Can you reproduce the error? If yes: how? Also, is there any plugin that uses maps and might interfere with my plugin?