Jump to content


6 replies to this topic

#1 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 August 2017 - 03:26 PM

pastebin get gHPs67vj mapArt

Posted Image

So for a while I'd been thinking about making a terminal object which draws directly to Minecraft maps. It would've been neat, but it turns out that's not viable - there's no way to write map data directly from in-game. Short of using external software tools, the only way to modify a map's content is for a player to actually view that map near its associated terrain.

Hence this Command Computer script, which instead generates single terrain "images" according to whatever GIFs you feed it, using what's dubbed "the staircase method".

On first run, the script will offer to "prepare" the build area. Doing so moves the computer and player to the middle of the mapping zone, and re-running the script from that location will trigger the option to actually construct your images.

Each individual map holds 128x128 pixels (regardless of its zoom level). Images are scaled accordingly, but you can opt to spread them out over multiple maps if you want higher resolutions (in which case each section is generated in order from left to right, top to bottom). The script automatically gives you a new map to store the art in as each build completes - simply open it to record that section of image data, and then move it away from your hotbar before telling the script to continue.

Builds are performed at the nearest suitable location to your computer, and are heavily destructive to any pre-existing terrain there. Server time slows to a crawl while the script is active, and it may take a minute or so for the clock to "catch up" after a build.

Once a map is complete, you can safely fill the area back in (or build a new map in that same area) so long as you do not view your old maps in that area again. Perform your builds somewhere remote, and then take your maps back to your home base for display in item frames.

Later versions of Minecraft have better colour depth, but the script should be able to automatically figure out what's available in whatever version you have installed.

Version History

Edited by Bomb Bloke, 10 August 2017 - 12:38 AM.

#2 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 02 August 2017 - 11:43 PM

So it generates the picture onto actual MC terrain, making the map use the terrain as the picture? So does that mean if you flew up really high you could see the picture on the terrain too? :P

Pretty clever workaround, but it makes sense.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 03 August 2017 - 01:39 AM

You'd need to fly up pretty high, but yes.

The idea is that there're a limited number of blocks that appear with unique colours on a map, but you can adjust their shade by messing with their height relative to whatever's to their direct north. This means that images are made up of "wavy tendrils" - they're pretty hard to make out unless you use a map.

#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,464 posts

Posted 04 August 2017 - 01:33 AM

Would it be sensible to provide an option in the script to teleport the user to the appropriate map-starting location and then wait for a signal from the user (chat message?) before teleporting them around throughout the area in order to gather the map data? Seems like a way to streamline the production of the actual map once the build is complete.

#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 06 August 2017 - 04:17 PM

I eventually realised that I could simply stick both the computer and the player slap bang in the middle of the building area, so long as I leave them near bedrock level. From there you can fully record any maps without having to move any further at all, and it also resolves any potential chunk-loading issues. So on first run the script now offers a "prepare" button which performs this move, and the "fill" button also moves the computer + player back up to the surface.

I've furthermore added an option to select which map number to start building from (handy for resuming larger builds), and cleaned out a couple of bugs.

#6 LoganDark2

  • Members
  • 87 posts
  • LocationYes

Posted 20 January 2018 - 03:07 PM

Why would you waste such an awesome program by using it to draw anime images?

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 January 2018 - 06:27 AM

Colour depth. There isn't enough for photos to come out well, but more simplistic drawings would undersell it.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users