Results 1 to 4 of 4

Thread: TileMap Builder tool Python

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Default

    I can tell you what a tile server is because we have one on the guild here. We use Leaflet.js here (https://leafletjs.com/) to serve up our big maps. If you go here: https://www.cartographersguild.com/f...splay.php?f=91 then this is our community world building projects forum. What we do is all map a bit of a large map and piece it all back together into one giant map.

    Since each map bit drawn by one member is often about 4000 pixels across then we need to serve up a whole map of about 20,000 pixels or so. On a web site like this then serving up a 20K image is a lot. So we serve it up in little bits or tiles. Because its easier to pan and zoom into a map you need tiles for each zoom level. So you have one tile which is a small version of the whole map. Then next level is 4 same sized tiles each of one quarter of the whole map space shrunk down. Then next you have a 4x4 set of them, then 8x8 set of them etc. We use 256 pixel tiles here so we have a 16K image cut into 64x64 tiles. So that is what the python program does and you name all of the tiles using a system such that when panned and zoomed the website loads up the right ones to make a set. That's what our leaflet.js does.

    So have a play with this link:
    https://www.cartographersguild.com/l...ype=guildworld

    Anyway - thanks for sharing your steps and procedures to make that happen.
    Last edited by Redrobes; 01-16-2024 at 01:17 PM.

  2. #2

    Default

    Sorry, yes, I know what it is. I'm using ChatGPT to translate it into English, and I think I interpret it like this.

    What I want to share is my Python script that takes 2 points from the image grid forming the tileset you want to create. It grabs only the necessary walls from the tiles on the top level and pastes them so you can draw on that image. It also saves a JSON with the information about where that image should go, so it cuts them again and saves them in the corresponding folder. If the folder doesn't exist, it creates one. So, you can go on drawing your map part by part, even using as a reference the parts you've already drawn because it considers whether a tile already exists before grabbing a parent tile.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •