From 93679aa6c995c2972ed4692663e2ebf9d8f86c0b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 13 Jul 2020 16:30:14 +0200 Subject: [PATCH] Add 2x2 and 3x3 Minimal autotile templates to Using tilemaps Thanks to @golddotasksquestions for providing these autotile templates :) This closes #3316. --- tutorials/2d/img/autotile_template_2x2.png | Bin 0 -> 226 bytes .../2d/img/autotile_template_3x3_minimal.png | Bin 0 -> 461 bytes ...ile_template_3x3_minimal_topdown_floor.png | Bin 0 -> 812 bytes ...ile_template_3x3_minimal_topdown_walls.png | Bin 0 -> 801 bytes ...emplate_3x3_minimal_topdown_walls_tall.png | Bin 0 -> 1643 bytes ...mplate_3x3_minimal_topdown_walls_thick.png | Bin 0 -> 1023 bytes tutorials/2d/using_tilemaps.rst | 69 ++++++++++++++++-- 7 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 tutorials/2d/img/autotile_template_2x2.png create mode 100644 tutorials/2d/img/autotile_template_3x3_minimal.png create mode 100644 tutorials/2d/img/autotile_template_3x3_minimal_topdown_floor.png create mode 100644 tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls.png create mode 100644 tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_tall.png create mode 100644 tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_thick.png diff --git a/tutorials/2d/img/autotile_template_2x2.png b/tutorials/2d/img/autotile_template_2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..17b4bc7b475153e7a7cae69b83975a5fc1aad842 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58JL)Xl%kBoS0Ke1;1lAy-SYo`%dG$Z|LEaktaqI03U%n;-0k#0WhpIOHMaJ(OY?g8_%FunuuM$vmKkw4aZT(kzW3N}O z>tElq^y|}qUi0nk_q6AoeqH&S5ok05tYKNYWw%n8Y zuu+cH=QXO#R)(9_$7`KF{%flP1p@+{W!kpS;gwVAXM_-#<;(o6C$#h$`wQ;h%dNJ` zqsThwI($2KasGv(yC?EdBp%#oSjD^i-yi13rYPbJ2jZEZiTqzHlsCiFo~2>UzaRfl d<+nCm`^;j!{++Px$*y%EDNk2Fmvv4FO#nSWgXsVO literal 0 HcmV?d00001 diff --git a/tutorials/2d/img/autotile_template_3x3_minimal_topdown_floor.png b/tutorials/2d/img/autotile_template_3x3_minimal_topdown_floor.png new file mode 100644 index 0000000000000000000000000000000000000000..1ac9c5d314b8f7a5899eaeb56c6beddefefd0de4 GIT binary patch literal 812 zcmeAS@N?(olHy`uVBq!ia0y~yUNX4zUcTVRXHsE2nz%X~g3$}Mme{(0ivk&&y z3OH;g>dp1|*T+*GQ~vP$6ngndGwAWBuX`o0U;O#~`O_D7>zAHAeedJmXY4?Ou>f`E z8EJ<42D-;zAKxOm`X|SNt^aJ~8Shx_yZ(z2i*igM2~LCjfZxZLZDp5us@!nx*Vdnb zuUE&~BPn!eI&tp0p22HYkngd9dWIN<`O*xV7;_wNe_j0NcB=8b8XRgDa6Y)!d}i-! zcZRipz5lNGAJ<@nY!x=sp<;5J3RMh&btQkRzuxB#IEG|?fl9;0pYH4$k1z9OU^n2v zMuZEKe@*|j4@b~kU@`c$;M-n?Z*naCpHlx~Hw;}=hI7Gn<`ZlZq5HQXdu1krcH!Re zedZTl{8GJdg)D<)fCXm*_mg5~2eSs<6}jBEW`E~Jl0+~Mcrq@FJfm)*d;GoQo9NF= z|J`f8cabTZe-ctCAXHEI=X{d^1l&$3YL zxpw5^eU1FQ)f11)*`K^9_vWpyPw(5O9}T|U`}zI+?-!=^DXaP?ebl|q4m1}66f7Or zG~Qra_DQqh)-TJSa(|zG;fKkg(`&d2es?av{^0n{nuz@=HLDKJ`O1i{20K5Yx5ls8 z_7%v(SU^J#1OJKhybPNeWgL%x4gUH3t$|z(LhUTZEq~N+EdF=mr#Hi)k684Bg$}G@ z(ACfS@7}OszfePg4K8J<;;R|HoLkQ)(5KJHaU5YGvYG>~3^oe(<_u@p3Rt$zw_o#K z8ZLW*C*dpain|LYe#Wj9sBkgkzI^`wTOGIm{!uFUJI9W7!mbx{vkaaus_?93;AWiC zgNO*Yu^5aU5)LZgCjPv^l>BoJTlE$84FV2te_^Ns2^er4VE$Chd?1IxJ>afj$fWPQ zaAh<8B?R}g6@P*YpfL_yWk`#;(x9>x#J8~XXi6z igxaU$2>BQmkkcM>>l|Cl-lo(AHq6u2&t;ucLK6Vjw8Izx literal 0 HcmV?d00001 diff --git a/tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_tall.png b/tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_tall.png new file mode 100644 index 0000000000000000000000000000000000000000..31489045980cacc94c15d8b5c30b1f616803305d GIT binary patch literal 1643 zcmeAS@N?(olHy`uVBq!ia0y~yU-Hn`vZ+ppuiTE}*N{0g=Q9xvz?g8d5W>I8P5oqx*q?ANH{<@+xG`R(jyp-)S%{`yya{_Rnj5wz9YO&${RJ*L&BW&&T3R3}@pu{mQ~Ub%mXO5)C=hZvK5>?q*Uz4Y*|& zfq~Z8pS|A+m=~h9fD4rQ?9W`cKW6V0VIMp&-f^@IC$7?frzG`SZ<1 w;M4^4j`jTd7q4Icz~-9-C1CJBSo@d#a{hDCgk^8{1B*NcPgg&ebxsLQ01=n9NdN!< literal 0 HcmV?d00001 diff --git a/tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_thick.png b/tutorials/2d/img/autotile_template_3x3_minimal_topdown_walls_thick.png new file mode 100644 index 0000000000000000000000000000000000000000..b31be907ab1e765813b5f471abdd8761fbcef921 GIT binary patch literal 1023 zcmeAS@N?(olHy`uVBq!ia0y~yUz>V6f9NzR=YPwOjhEW+tq!+p6qy@-`^yfjXirBGL~tJPA6VkV?O@`N-Q-rX z|BG;Z*8h7d`!4-Os6b&I&}uw)vGLU2=i8ZhL?&&F1ksn$b)?l>=D{!9LC8qqT*>h1n)6C@#N#ZOeop zTrPT}bfNOfzpc+f$q5Ps7&m-pXxC_Xx4aW3gr5#!n3Hb$zv}dii@^tlcS?83{ F1OS&n+^zrs literal 0 HcmV?d00001 diff --git a/tutorials/2d/using_tilemaps.rst b/tutorials/2d/using_tilemaps.rst index 0cc5a2539..e156b7d39 100644 --- a/tutorials/2d/using_tilemaps.rst +++ b/tutorials/2d/using_tilemaps.rst @@ -211,25 +211,80 @@ can test for. 2x2 mode can only match cells that are part of a 2-by-2 block - cells with no neighbors and lines only one cell wide are not supported. +**Template - Generic:** + +This template can be used for sideways or fully top-down perspectives. +It's designed for a TileMap cell size of 64x64. + +Key: + +- Red: "on" +- White: "off" + +.. image:: img/autotile_template_2x2.png + 3x3 (minimal) ~~~~~~~~~~~~~ In 3x3 (minimal) mode, each bitmask contains 9 bits (4 corners, 4 edges, -1 center). - -The 4 corner bits work the same as in 2x2 mode. +1 center). The 4 corner bits work the same as in 2x2 mode. When an edge bit is "on", the cell which shares that edge must be filled. When an edge bit is "off", the cell which shares that edge must be empty. -The center bit should be "on" for any tile you wish to use. - -Note that in this mode, it makes no sense for a corner bit to be "on" when -either edge bit adjacent to it is not "on". +The center bit should be "on" for any tile you wish to use. Note that in this +mode, it makes no sense for a corner bit to be "on" when either edge bit +adjacent to it is not "on". A total of 47 tiles would be needed to provide exactly one bitmask for each arrangement that this mode can test for. +.. note:: + + Right-click an image and choose **Save image as…** to save it. + +**Template - Generic:** + +This template can be used for sideways or fully top-down perspectives. +All templates below are designed for a TileMap cell size of 64x64, but you may +have to use different subtile sizes for top-down templates as described below. + +Key: + +- Red: "on" +- White: "off" + +.. image:: img/autotile_template_3x3_minimal.png + + +**Template - Top-down floor in 3/4 perspective:** + +Key (applies to the four templates below): + +- Green: floor +- Cyan: wall +- Yellow: top of wall +- Transparent: air + +.. image:: img/autotile_template_3x3_minimal_topdown_floor.png + +**Template - Top-down wall in 3/4 perspective:** + +.. image:: img/autotile_template_3x3_minimal_topdown_walls.png + +**Template - Top-down wall in 3/4 perspective (thick walls):** + +When using this template, set the TileSet subtile size to ``Vector2(64, 88)``. + +.. image:: img/autotile_template_3x3_minimal_topdown_walls_thick.png + +**Template - Top-down wall in 3/4 perspective (tall walls):** + +When using this template, set the "Snap Options" Step to ``Vector2(64, 184)`` +and the "Selected Tile" Texture offset to height minus the cell size. +This means the texture offset should be ``Vector2(0, -120)``: + +.. image:: img/autotile_template_3x3_minimal_topdown_walls_tall.png 3x3 ~~~