{"id":488,"date":"2015-02-09T15:38:13","date_gmt":"2015-02-09T22:38:13","guid":{"rendered":"https:\/\/www.crabattack.org\/blog\/hawk\/?p=488"},"modified":"2015-02-09T15:41:39","modified_gmt":"2015-02-09T22:41:39","slug":"february-8th-2015","status":"publish","type":"post","link":"https:\/\/www.crabattack.org\/blog\/hawk\/february-8th-2015\/","title":{"rendered":"February 8th, 2015"},"content":{"rendered":"<p>At this point the conversion of game\u00a0systems to the new format is\u00a0finished. Lots of new systems (fancier gates, a warp system), lots of updated old ones (ranged attacks\/parties\/etc). What\u00a0remains is implementing\u00a0a map generator for the new map format. A skeleton of it is already in place for creating\u00a0basic maps, but there are no brains behind\u00a0it. The main stumbling block for me right now is deciding how much of the old system is applicable to the new map style.<\/p>\n<p>I don&#8217;t remember if\u00a0I\u00a0actually documented the newest version of the generation system here. It&#8217;s pretty simple. Every type of node (that is, a location in the game with behaviors attached to it. ie, a trap node that hurts players who pass by it\u00a0or a gold node that gives players gold when landing on it) has two special properties attached to it: Tags and constraints. Tags are for organizational purposes such as &#8220;healing nodes&#8221; or &#8220;negative nodes&#8221;. Constraints are requirements and limits: ie only spawn this on medium difficulty tiles\u00a0or\u00a0only spawn 3 of these. Tags also have constraints and are the\u00a0organizational structure that the core generator uses to decide what things to spawn (it picks a random tag and then spawns it somewhere and then moves on until out of tags or slots to fill). It becomes very easy to create behaviors like &#8220;only spawn 1 healing node per rank&#8221; or &#8220;only spawn this near\u00a0other trap nodes&#8221;, especially since multiple tags per node allows varying degrees of classification. It worked great\u00a0when the world only consisted of about 9 nodes per rank, and the\u00a0positions of other nodes was rarely of\u00a0importance.<\/p>\n<p>The new system has more\u00a0considerations to take.\u00a0Nodes have a lot more importance\u00a0to each other based on the branch they&#8217;re within. It&#8217;s trivial to generate a branch with the concept of &#8220;there should be 4 positive nodes and 2 negative nodes&#8221;, but\u00a0what\u00a0each of those nodes is matters a lot. If we went purely random on these players will likely end up making a decision on &#8220;what has the least negatives \/ the least costly negatives&#8221; or &#8220;what has the easiest gates&#8221; because the composition of each branch would be a mish mash where\u00a0anything could be possible. Now imagine if we made that same branch &#8220;4 gold nodes, 2 damage nodes&#8221;. At this point players now have a good idea that if they go down this branch they will probably get some gold. If\u00a0gold is a desirable resource for them at the moment, then they will weigh it against the damage nodes and have to make an interesting choice of whether the risk is worth it. While it&#8217;s easy to take that example and say &#8220;well, then have\u00a0whatever node you randomly pick be\u00a0used for all nodes on a given branch&#8221;, it doesn&#8217;t take into account the bigger picture. ie, having most branches randomly happen to be gold diminishes the value of gold over time.\u00a0The old system by itself\u00a0just won&#8217;t be enough, and complicating the problem is the fact that I don&#8217;t fully understand\u00a0all the important factors of\u00a0the new map style yet. That is going to be the\u00a0focus of this week: figuring out what matters on maps,\u00a0deciding how much of the old system can be used to generate it, and then applying it all as needed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At this point the conversion of game\u00a0systems to the new format is\u00a0finished. Lots of new systems (fancier gates, a warp system), lots of updated old ones (ranged attacks\/parties\/etc). What\u00a0remains is implementing\u00a0a map generator for the new map format. A skeleton of it is already in place for creating\u00a0basic maps, but there are no brains behind\u00a0it.&#8230; <a href=\"https:\/\/www.crabattack.org\/blog\/hawk\/february-8th-2015\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">February 8th, 2015<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-488","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/posts\/488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/comments?post=488"}],"version-history":[{"count":3,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/posts\/488\/revisions"}],"predecessor-version":[{"id":491,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/posts\/488\/revisions\/491"}],"wp:attachment":[{"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/media?parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/categories?post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.crabattack.org\/blog\/hawk\/wp-json\/wp\/v2\/tags?post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}