<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hole on Nathaniel Inman</title><link>https://nathanielinman.com/tags/hole/</link><description>Recent content in Hole on Nathaniel Inman</description><generator>Hugo -- 0.147.7</generator><language>en-us</language><copyright>Nathaniel Inman</copyright><lastBuildDate>Tue, 08 May 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://nathanielinman.com/tags/hole/index.xml" rel="self" type="application/rss+xml"/><item><title>Pigeon Hole Stepping v2</title><link>https://nathanielinman.com/pigeon-hole-stepping-v2/</link><pubDate>Tue, 08 May 2018 00:00:00 +0000</pubDate><guid>https://nathanielinman.com/pigeon-hole-stepping-v2/</guid><description>&lt;p>I had originally written an article on how to implement PHS. Having found the maps generated slightly redundant I decided to take another look. Here are the steps taken to successfully generate a more realistic &lt;code>town.&lt;/code> It&amp;rsquo;s essentially a drunken walker like &lt;a href="https://en.wikipedia.org/wiki/Diffusion-limited_aggregation">Diffusion Limited Aggregation&lt;/a> mixed with a hallway constraint that mimics the large part of PHS.&lt;/p>
&lt;ol>
&lt;li>Start somewhere in the middle, add this and all possible directions up to a certain dynamic length (I used a standard deviation of 1.4 with a mean of 5, ) as nodes: &lt;code>[{x,y,direction},...]&lt;/code>.&lt;/li>
&lt;li>We will be looping until all &lt;strong>nodes&lt;/strong> and &lt;strong>edges&lt;/strong> (we&amp;rsquo;ll describe that shortly,) are gone.&lt;/li>
&lt;li>When we have node then check to see if the path between it&amp;rsquo;s &amp;lsquo;x,y&amp;rsquo; and &amp;lsquo;x2,y2&amp;rsquo; (given the length and direction) is clear. If it is, then add the entire path minus the start and end as &lt;strong>edges&lt;/strong>, and add the end as a new node. Shuffle nodes after adding a new one. After building the path run through the path array randomly attempting to build a room in all directions. (this won&amp;rsquo;t be entirely possible and will leave negative space to fill with edges.)&lt;/li>
&lt;li>If there are no nodes, repeat step 3 except with edges (this helps fill the map negative space.)&lt;/li>
&lt;li>After all nodes and edges are gone then cover all cells adjacent to floors with walls if it&amp;rsquo;s empty.&lt;/li>
&lt;/ol>
&lt;p>I found it helpful to use this simple formula to generate hallway lengths with a mean and standard deviation constraint. Both the x and y would work fine, here we&amp;rsquo;re using the y only.&lt;/p></description></item><item><title>Pigeon Hole Stepping</title><link>https://nathanielinman.com/pigeon-hole-stepping/</link><pubDate>Tue, 08 Mar 2016 00:00:00 +0000</pubDate><guid>https://nathanielinman.com/pigeon-hole-stepping/</guid><description>&lt;p>For &lt;a href="http://7drl.org/about/">7DRL&lt;/a> this year I developed a new map generation algorithm called &lt;strong>Pigeon Hole Stepping&lt;/strong>.&lt;/p>
&lt;h2 id="fill-the-map-with-walls">Fill the map with walls&lt;/h2>
&lt;p>This map generation algorithm relies on negative building techniques. This concept will make more sense as the later steps are explained.&lt;/p>
&lt;h3 id="dig-hallways">Dig Hallways&lt;/h3>
&lt;p>Essentially, we can assume that hallways that are parallel to each other are at least the length of a single room and up to two rooms apart in distance. Because of this assumption, we can make a random walker that will move around with this restriction in mind until map is filled completely.&lt;/p></description></item></channel></rss>