{"id":1174,"date":"2023-03-05T21:52:16","date_gmt":"2023-03-05T21:52:16","guid":{"rendered":"https:\/\/wizque.com\/?p=1174"},"modified":"2024-01-16T23:02:02","modified_gmt":"2024-01-17T04:02:02","slug":"hex-map-generator","status":"publish","type":"post","link":"https:\/\/wizque.com\/index.php\/2023\/03\/05\/hex-map-generator\/","title":{"rendered":"Hex map generator"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"hex-map-grids-in-games\">Hex map \/ grids in games<\/h5>\n\n\n\n<p>Hex maps, hexagonal tiles, and hexagon game pieces have been part of gaming, for a long time. A search on your favorite search engine suggests the first game to use hexagon tiles is a strategy game called <a href=\"https:\/\/en.wikipedia.org\/wiki\/Agon_(game)\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Agon_(game)\" target=\"_blank\" rel=\"noreferrer noopener\">Agon<\/a>. Slightly later chess variants adopted hexagonal tiles such as<a href=\"https:\/\/en.wikipedia.org\/wiki\/Hexagonal_chess\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Hexagonal_chess\" target=\"_blank\" rel=\"noreferrer noopener\"> Gli\u0144ski&#8217;s Hexagonal Chess<\/a>, circa 1949 or a John Jaques and Son hexagonal chess game, <a href=\"http:\/\/www.chessorb.com\/hexes-chess.html\" data-type=\"URL\" data-id=\"http:\/\/www.chessorb.com\/hexes-chess.html\" target=\"_blank\" rel=\"noreferrer noopener\">Hexagonia<\/a>, circa 1864.<\/p>\n\n\n\n<p>Of course, we can\u2019t forget <a href=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" target=\"_blank\" rel=\"noreferrer noopener\">Sternhalma<\/a>, 1892, better known as <a href=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" target=\"_blank\" rel=\"noreferrer noopener\">Chinese checkers<\/a> in the western countries.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em>See <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hex_map\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Hex_map\">Hex <\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Hex_map\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Hex_map\" target=\"_blank\">map<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Agon_(game)\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Agon_(game)\" target=\"_blank\">Agon<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Hexagonal_chess\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Hexagonal_chess\" target=\"_blank\">Hexagonal chess<\/a>, <a rel=\"noreferrer noopener\" href=\"http:\/\/www.chessorb.com\/hexes-chess.html\" data-type=\"URL\" data-id=\"http:\/\/www.chessorb.com\/hexes-chess.html\" target=\"_blank\">Hexagonia<\/a>, and <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_checkers\" target=\"_blank\">Chinese checkers<\/a>.<\/em><\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"generator\">Generator<\/h5>\n\n\n\n<p>From my own experience, hex maps or a hex map grid seem to be popular in RTS games and certain RPG games. Sometimes the game world terrain is less hexagonal than the movement indicators, but it\u2019s still utilized in some fashion.<\/p>\n\n\n\n<p>For the PolyCycles project, I want a terrain that is unique, provides synergy with polygon style artwork, has some editing ability and can be extended or modified. As a hobbyist developer, I need tools that help support my creativity, and allow me to jump start a process.<\/p>\n\n\n\n<p>Several years ago, I found a tutorial on <a rel=\"noreferrer noopener\" href=\"https:\/\/catlikecoding.com\/\" data-type=\"URL\" data-id=\"https:\/\/catlikecoding.com\/\" target=\"_blank\">catlikecoding.com<\/a> for generating a hex map. There are 27 sections in the hex map tutorial series. Each section is well documented, basically hand holding you through the coding process. I recommend completing the tutorial first and look at the updated code later.<\/p>\n\n\n\n<p>Recently, <a rel=\"noreferrer noopener\" href=\"https:\/\/catlikecoding.com\/jasper-flick\/\" data-type=\"URL\" data-id=\"https:\/\/catlikecoding.com\/jasper-flick\/\" target=\"_blank\">Jasper Flick<\/a>, the creator\/owner of catlikecoding.com has begun updating the project to run on newer versions of Unity. Including shader updates and switching to URP.  Jasper has generously licensed the code with a MIT-0 license. The tutorials and project can be found at <a rel=\"noreferrer noopener\" href=\"https:\/\/catlikecoding.com\/\" data-type=\"URL\" data-id=\"https:\/\/catlikecoding.com\/\" target=\"_blank\">Catlike Coding<\/a>. Thank you, <a rel=\"noreferrer noopener\" href=\"https:\/\/catlikecoding.com\/jasper-flick\/\" data-type=\"URL\" data-id=\"https:\/\/catlikecoding.com\/jasper-flick\/\" target=\"_blank\">Jasper<\/a>, for providing an amazing tutorial and project code to the community.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"quick-map-generation\">Quick map generation<\/h5>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/wizque.com\/wp-content\/uploads\/2023\/03\/HexGeneratorExample.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" data-id=\"1177\" src=\"https:\/\/wizque.com\/wp-content\/uploads\/2023\/03\/HexGeneratorExample.png\" alt=\"Example generated hex terrian\" class=\"wp-image-1177\"\/><\/a><\/figure>\n<\/figure>\n\n\n\n<p>Hex map generator produces a unique and low polygon looking terrain. In the image, you see rivers, foliage, and several different texture maps on the terrain. The hex editor allows you to further customize the map by adding roads and walled cities\/towns.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"project-polycycles\">project polycycles<\/h5>\n\n\n\n<div class=\"ghostkit-grid ghostkit-grid-gap-md\"><div class=\"ghostkit-grid-inner\">\n<div class=\"ghostkit-col ghostkit-col-md-12 ghostkit-col-6\"><div class=\"ghostkit-col-content is-layout-flow wp-block-grid-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"426\" src=\"https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-1024x426.png\" alt=\"\" class=\"wp-image-1431\" srcset=\"https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-1024x426.png 1024w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-300x125.png 300w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-768x319.png 768w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-500x208.png 500w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-800x333.png 800w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01-48x20.png 48w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"ghostkit-col ghostkit-col-md-12 ghostkit-col-6\"><div class=\"ghostkit-col-content is-layout-flow wp-block-grid-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"419\" src=\"https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-1024x419.png\" alt=\"\" class=\"wp-image-1432\" srcset=\"https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-1024x419.png 1024w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-300x123.png 300w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-768x314.png 768w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-500x205.png 500w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-800x327.png 800w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp-48x20.png 48w, https:\/\/wizque.com\/wp-content\/uploads\/2024\/01\/Region_A_Location_01_CloseUp.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p>For the project, I&#8217;ve modified the code to import the map into the editor to add assets. I&#8217;ve also added additional terrain textures. Notice the dark green texture and blue rock texture.<\/p>\n\n\n\n<p>In a follow-up post, I&#8217;ll describe my work flow.<\/p>\n\n\n\n<p>Thanks for reading!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hex map \/ grids in games Hex maps, hexagonal tiles, and hexagon game pieces have been part of gaming, for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1436,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_vp_format_video_url":"","_vp_image_focal_point":{"x":0.48,"y":0.16},"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/posts\/1174"}],"collection":[{"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/comments?post=1174"}],"version-history":[{"count":1,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/posts\/1174\/revisions"}],"predecessor-version":[{"id":1433,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/posts\/1174\/revisions\/1433"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/media\/1436"}],"wp:attachment":[{"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/media?parent=1174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/categories?post=1174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wizque.com\/index.php\/wp-json\/wp\/v2\/tags?post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}