Windows Tile47Jo [Auto-tile tool]

Discussion in 'Game Design, Development And Publishing' started by NazGhuL, Jan 15, 2017.

  1. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    This is a real quick tool I made for GMS2 Autotile.
    Basicaly, it takes an image like this:

    [​IMG]
    and turn it into an image like this:
    [​IMG]
    and it's ready to use for GMS2 autotile. The tiles are in the same order of selection as the IDE of GMS2.
    I'm using it to quickly create tileset. I was tired to rearrange all that in photoshop. ;)
    I'm sure some of you will find it useful.

    Download: www.naztail.com/tile47jo/Tile47Jo.zip
    How to use:
    1-enter the tile size (example above 32)
    2-Select the first image
    3-Save it where you want

    Have fun.

    -edit-
    Autotile on a grid right here: https://marketplace.yoyogames.com/assets/5055/grid-auto-tile-47
     
    Last edited: Jan 29, 2017
  2. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,703
    Seems pretty cool, I've been missing something like this :3

    Could you explain what the subimages in the first image are supposed to be, though? Solitary block, internal corners, and tiling full images?
     
  3. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    This article explain it well: http://blog.rpgmakerweb.com/tutorials/anatomy-of-an-autotile/

    -edit-
    And for all devs here that bought the humble bundle gamedev art pack (autumn 2015 if I remember correctly) have a lot of rpgmaker tileset. And building the first image on your own is not as hard as it looks.
     
    Last edited: Jan 16, 2017
  4. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,442
    Amazing! Truely!
    I can see myself using this a lot! Great job!
     
  5. @Alex@

    @Alex@ Member

    Joined:
    Jun 20, 2016
    Posts:
    31
    Great tool. Needs some error handling for when you cancel out without providing an image to process.
     
  6. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    I will do that asap. I don't know why I didn't think about that... :)
    Great tool. Needs some error handling for when you cancel out without providing an image to process.

    -edit-
    Fixed. Should works better.
     
    Last edited: Jan 18, 2017
  7. Ednei

    Ednei Member

    Joined:
    Jun 22, 2016
    Posts:
    178
    Thank you! Thank you! And thank you!
    You do not know how much you helped me!
     
  8. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    I'm glad you like it. If for whatever reason GMS2 tile order changes, I'll update it asap.
     
  9. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,442
    Perhaps add a config file to change the tile order. This way, rather than having to update the whole app, you would just have to distribute a new config file.
     
    NazGhuL likes this.
  10. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
  11. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    Just a little up. ;)
     
  12. Marko Raos

    Marko Raos Member

    Joined:
    Mar 15, 2017
    Posts:
    6
    Brilliant! This is exactly what I was looking for!
     
  13. robertleva

    robertleva Member

    Joined:
    Jun 26, 2017
    Posts:
    6
    Does this still work? It's not actually outputting any images even though the finish message says it did.
     
  14. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    Yes it works, i'm using it a lot. First select the tile size(default 32), then pick the image (The smaller one in the OP), then save it where you want it.
     
  15. robertleva

    robertleva Member

    Joined:
    Jun 26, 2017
    Posts:
    6
    Ahh yes it does work BUT you have a bug where if you try and save the output file into the same directory as the program and input file it fails. You must save the output into a new directory. anyways it works. thanks!
     
  16. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    Ah...you're right... I don't know why... At least you can save it elsewhere. :)
    (If anyone knows why you can't save on the program's folder, let me know)
     
  17. robertleva

    robertleva Member

    Joined:
    Jun 26, 2017
    Posts:
    6
    Hey would you mind showing an example of what the input image for a 16x16 grid would look like? You rock!
     
  18. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    The image on the op is made of 32x32 tile::
    [​IMG]
    Simply divide it by 2.

    The simplest image I could provide is:

    This:
    [​IMG]
    gives:
    [​IMG]
     
  19. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,703
    Forgot this existed (because I'm still a bit hesitant about using GMS2 as long as it's unstable) but it's just as amazing as ever! I probably should keep it in mind this time, I'm pretty sure I have it saved in my utilities folder since ages ago :p

    EDIT:
    Yeah, I do x3
    upload_2017-8-15_19-2-47.png
     
    NazGhuL likes this.
  20. David Allen

    David Allen Member

    Joined:
    Jan 3, 2017
    Posts:
    1
    This tool is great.

    There might be a minor issue with how Tile47Jo generates the 47-tile tileset, but I don't know if it would impact anyone.

    If I reverse engineered it correctly, autotile pieces are currently chosen as follows:

    Code:
    switch (tile_index) {
        case 0:
            // No pieces are necessary; these tiles should be deleted.
            break;
        case 1:
            pieces = [
                A1, C3,
                B3, A3];
            break;
        case 2:
            pieces = [
                D3, B1,
                B3, A3];
            break;
        case 3:
            pieces = [
                A1, B1,
                B3, A3];
            break;
        case 4:
            pieces = [
                D3, C3,
                B3, D1];
            break;
        case 5:
            pieces = [
                A1, C3,
                B3, D1];
            break;
        case 6:
            pieces = [
                D3, B1,
                B3, D1];
            break;
        case 7:
            pieces = [
                A1, B1,
                B3, D1];
            break;
        case 8:
            pieces = [
                D3, C3,
                C1, A3];
            break;
        case 9:
            pieces = [
                A1, C3,
                C1, A3];
            break;
        case 10:
            pieces = [
                D3, B1,
                C1, A3];
            break;
        case 11:
            pieces = [
                A1, B1,
                C1, A3];
            break;
        case 12:
            pieces = [
                D3, C3,
                C1, D1];
            break;
        case 13:
            pieces = [
                A1, C3,
                C1, D1];
            break;
        case 14:
            pieces = [
                D3, B1,
                C1, D1];
            break;
        case 15:
            pieces = [
                A1, B1,
                C1, D1];
            break;
        case 16:
            pieces = [
                C5, C3,
                A5, A3];
            break;
        case 17:
            pieces = [
                C5, B1,
                A5, A3];
            break;
        case 18:
            pieces = [
                C5, C3,
                A5, D1];
            break;
        case 19:
            pieces = [
                C5, B1,
                A5, D1];
            break;
        case 20:
            pieces = [
                B4, A4,
                B3, A3];
            break;
        case 21:
            pieces = [
                B4, A4,
                B3, D1];
            break;
        case 22:
            pieces = [
                B4, A4,
                C1, A3];
            break;
        case 23:
            pieces = [
                B4, A4,
                C1, D1];
            break;
        case 24:
            pieces = [
                D3, D5,
                B3, B5];
            break;
        case 25:
            pieces = [
                D3, D5,
                C1, B5];
            break;
        case 26:
            pieces = [
                A1, D5,
                B3, B5];
            break;
        case 27:
            pieces = [
                A1, D5,
                C1, B5];
            break;
        case 28:
            pieces = [
                D3, C3,
                D4, C4];
            break;
        case 29:
            pieces = [
                A1, C3,
                D4, C4];
            break;
        case 30:
            pieces = [
                D3, B1,
                D4, C4];
            break;
        case 31:
            pieces = [
                A1, B1,
                D4, C4];
            break;
        case 32:
            pieces = [
                C5, D5,
                A5, B5];
            break;
        case 33:
            pieces = [
                B4, A4,
                D4, C4];
            break;
        case 34:
            pieces = [
                A2, B4,
                C5, A3];
            break;
        case 35:
            pieces = [
                A2, B4,
                C5, D1];
            break;
        case 36:
            pieces = [
                A4, B2,
                B3, D5];
            break;
        case 37:
            pieces = [
                A4, B2,
                C1, D5];
            break;
        case 38:
            pieces = [
                D3, B5,
                C4, D2];
            break;
        case 39:
            pieces = [
                A1, B5,
                C4, D2];
            break;
        case 40:
            pieces = [
                A5, C3,
                C2, D4];
            break;
        case 41:
            pieces = [
                A5, B1,
                C2, D4];
            break;
        case 42:
            pieces = [
                A2, B2,
                C5, D5];
            break;
        case 43:
            pieces = [
                A2, B4,
                C2, D4];
            break;
        case 44:
            pieces = [
                C5, D5,
                C2, D2];
            break;
        case 45:
            pieces = [
                A4, B2,
                C4, D2];
            break;
        case 46:
            pieces = [
                A2, B2,
                C2, D2];
            break;
        case 47:
            pieces = [
                D3, C3,
                B3, A3];
            break;
    }
    However, I think that the "Anatomy of an Autotile" tutorial suggests the top-left piece should always be an A, the top-right a B, the bottom-left a C, and the bottom-right a D.

    When looking at the image in that tutorial that has A1-D5 written over each tile, you can view it as a 2x3 set of autotiled tiles. In the top right corner, to the right of the white square, the top-left corner is an A, the top-right a B, the bottom-left a C, and the bottom-right a D.

    In the four squares beneath the white box, the same thing happens.

    I think autotile pieces should be chosen as follows:

    Code:
    switch (tile_index) {
        case 0:
            // No pieces are necessary; these tiles should be deleted.
            break;
        case 1:
            pieces = [
                A1, B3,
                C3, D3];
            break;
        case 2:
            pieces = [
                A3, B1,
                C3, D3];
            break;
        case 3:
            pieces = [
                A1, B1,
                C3, D3];
            break;
        case 4:
            pieces = [
                A3, B3,
                C3, D1];
            break;
        case 5:
            pieces = [
                A1, B3,
                C3, D1];
            break;
        case 6:
            pieces = [
                A3, B1,
                C3, D1];
            break;
        case 7:
            pieces = [
                A1, B1,
                C3, D1];
            break;
        case 8:
            pieces = [
                A3, B3,
                C1, D3];
            break;
        case 9:
            pieces = [
                A1, B3,
                C1, D3];
            break;
        case 10:
            pieces = [
                A3, B1,
                C1, D3];
            break;
        case 11:
            pieces = [
                A1, B1,
                C1, D3];
            break;
        case 12:
            pieces = [
                A3, B3,
                C1, D1];
            break;
        case 13:
            pieces = [
                A1, B3,
                C1, D1];
            break;
        case 14:
            pieces = [
                A3, B1,
                C1, D1];
            break;
        case 15:
            pieces = [
                A1, B1,
                C1, D1];
            break;
        case 16:
            pieces = [
                A5, B3,
                C5, D3];
            break;
        case 17:
            pieces = [
                A5, B1,
                C5, D3];
            break;
        case 18:
            pieces = [
                A5, B3,
                C5, D1];
            break;
        case 19:
            pieces = [
                A5, B1,
                C5, D1];
            break;
        case 20:
            pieces = [
                A4, B4,
                C3, D3];
            break;
        case 21:
            pieces = [
                A4, B4,
                C3, D1];
            break;
        case 22:
            pieces = [
                A4, B4,
                C1, D3];
            break;
        case 23:
            pieces = [
                A4, B4,
                C1, D1];
            break;
        case 24:
            pieces = [
                A3, B5,
                C3, D5];
            break;
        case 25:
            pieces = [
                A3, B5,
                C1, D5];
            break;
        case 26:
            pieces = [
                A1, B5,
                C3, D5];
            break;
        case 27:
            pieces = [
                A1, B5,
                C1, D5];
            break;
        case 28:
            pieces = [
                A3, B3,
                C4, D4];
            break;
        case 29:
            pieces = [
                A1, B3,
                C4, D4];
            break;
        case 30:
            pieces = [
                A3, B1,
                C4, D4];
            break;
        case 31:
            pieces = [
                A1, B1,
                C4, D4];
            break;
        case 32:
            pieces = [
                A5, B5,
                C5, D5];
            break;
        case 33:
            pieces = [
                A4, B4,
                C4, D4];
            break;
        case 34:
            pieces = [
                A2, B4,
                C5, D3];
            break;
        case 35:
            pieces = [
                A2, B4,
                C5, D1];
            break;
        case 36:
            pieces = [
                A4, B2,
                C3, D5];
            break;
        case 37:
            pieces = [
                A4, B2,
                C1, D5];
            break;
        case 38:
            pieces = [
                A3, B5,
                C4, D2];
            break;
        case 39:
            pieces = [
                A1, B5,
                C4, D2];
            break;
        case 40:
            pieces = [
                A5, B3,
                C2, D4];
            break;
        case 41:
            pieces = [
                A5, B1,
                C2, D4];
            break;
        case 42:
            pieces = [
                A2, B2,
                C5, D5];
            break;
        case 43:
            pieces = [
                A2, B4,
                C2, D4];
            break;
        case 44:
            pieces = [
                A5, B5,
                C2, D2];
            break;
        case 45:
            pieces = [
                A4, B2,
                C4, D2];
            break;
        case 46:
            pieces = [
                A2, B2,
                C2, D2];
            break;
        case 47:
            pieces = [
                A3, B3,
                C3, D3];
            break;
    }
     
    Last edited: Sep 19, 2017
  21. Petr Skornok

    Petr Skornok Member

    Joined:
    Sep 13, 2017
    Posts:
    44
    Great tool, also I would love to thank you for the auto tiler script. If you share this tool's source code I will rewrite it for macOS.
     
  22. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533
    Thx. I should clean it a little and share Tile47Jo source.
     
    Petr Skornok likes this.
  23. Paul Kankiewicz

    Paul Kankiewicz Member

    Joined:
    Jun 5, 2019
    Posts:
    8
    Holy crap, this is absolutely fantastic! Thank you so much, NazGhuL!
     
  24. NazGhuL

    NazGhuL NazTaiL

    Joined:
    Jun 20, 2016
    Posts:
    533

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice