<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts-rsses on Rauko Dev Blog</title>
    <link>http://rauko1753.gitlab.io/posts/index.xml</link>
    <description>Recent content in Posts-rsses on Rauko Dev Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 20 Oct 2016 10:06:49 -0600</lastBuildDate>
    <atom:link href="http://rauko1753.gitlab.io/posts/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Globals Considered Harmful</title>
      <link>http://rauko1753.gitlab.io/posts/globals/</link>
      <pubDate>Thu, 20 Oct 2016 10:06:49 -0600</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/globals/</guid>
      <description>&lt;p&gt;My design leftover from the 7DRL challenge made use of a bunch of singletons
(i.e. global variables) for things like the screen, player, world, log, and so
forth. I think we can all appreciate why global variables (even when disguised
as singletons) are bad. They introduce coupling between otherwise
unrelated parts of code, they introduce concurrency issues, make testing
difficult at best, and increase cognitive load on the programmer due to
non-locality. The biggest thing I&amp;rsquo;ve done recently is to get rid of these
globals. While these hacks made throwing together the 7DRL challenge a bit
easier, long term these changes will actually make it easier to accomplish some
of my design goals.&lt;/p&gt;

&lt;p&gt;The first global I got rid of was the global logger. With the global logger,
each entity that needed to log something would simply access the global logger
and send the log message directly. In place of the global logger, I&amp;rsquo;ve now
switched to using a log component on every entity that might need to log. There
are a number of advantages to this (in addition to removing the problems with
global variables). For example, I no longer have special cases sprinkled
throughout the code to determine whether or not the hero could see the logged
event. I just have the component handle this, and the everywhere else the code
just sends a log event to the appropriate entity. Using log events instead of
directly logging also opens the door for more interesting logic around the log
event. As an example, suppose the player becomes blind for some reason. Now
instead of directly logging a message like &amp;ldquo;The wolf bites you&amp;rdquo;, I could have
the blind component intercept the log message and replace the message with
something like &amp;ldquo;Something bites you&amp;rdquo;.&lt;/p&gt;

&lt;p&gt;Next I got rid of the screen. I realized that the only entity that actually
dealt with it was the player. More specifically, in the player controller there
was a call to update the global screen. Now, I simply added the screen as a
component on the player entity which knows to update upon receiving an act
event. Consequently, the screen gets updated at exactly the right time (i.e.
just before we get player input), and there is no coupling between the screen
and the player controller.&lt;/p&gt;

&lt;p&gt;Finally, I go rid of the global player and world variables. This one turned out
to be easy. The only reason I had to have the player be global before was
actually due to the coupling between the global logger and every other entity
in the game. With that coupling removed, I no longer needed every entity to
have access to the player in order to determine what to log. Now they can go
back to treating the player as just another entity on the map. Of course the
main game loop still uses the player to determine what is going on with the
game, but that is easily done without a global.&lt;/p&gt;

&lt;p&gt;Overall I&amp;rsquo;m pretty happy with these changes, and I&amp;rsquo;m ready to start adding
logic around some of the bump events. Hopefully the next post will talk about
the basics of combat!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Reviving Stones</title>
      <link>http://rauko1753.gitlab.io/posts/reboot/</link>
      <pubDate>Sat, 17 Sep 2016 15:47:48 -0600</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/reboot/</guid>
      <description>&lt;p&gt;I just looked at the date of my last post and holy cow its been a long time
since I&amp;rsquo;ve done any work on Stones. I&amp;rsquo;m starting to revive my work on it
though! Basically what happened is life.  I&amp;rsquo;ve been busy with paper
submissions at school. I&amp;rsquo;ve decided that I really dislike running user studies
as they take far more time than I ever would have predicted. Since I last
posted, I&amp;rsquo;ve had an EMNLP paper submitted and rejected, and I&amp;rsquo;ve been working
on submitting elsewhere. I&amp;rsquo;m also working on another ACL paper. In addition,
with our oldest kid out of school for the summer, we got a national parks pass
and have been taking advantage of it, leaving even less time for roguelike dev.&lt;/p&gt;

&lt;p&gt;Anyways, things are starting to settle down now that school has started up
again and I think that I&amp;rsquo;ll be able to find time to work on Stones. I&amp;rsquo;ve even
managed to stream a few times in the last week! Its been long enough that I
felt like the best place to start was with a refactor to refamiliarize myself
with the code. I&amp;rsquo;ve added and fixed some godocs, tackled a few old todos about
reorganization, and I think I have my head back in the code base.&lt;/p&gt;

&lt;p&gt;I have a few goals. First, I want to revisit the basic structure that I put
together during the 7DRL Challenge. I have two main issues. I still feel like I
have too much reliance on concrete structs instead of the more elegant
entity-component system I&amp;rsquo;ve worked to set up. I need to rely more on event
messages instead of type assertions so I can make specific function calls. This
will be more extensible and maintainable going forward.&lt;/p&gt;

&lt;p&gt;The other issue I&amp;rsquo;ve had with the code from the 7DRL is the use of globals. For
the 7DRL challenge it was fine. For things like the log, screen, hero and map,
making these things globally accessible was the quick and dirty solution. The
problem is that this solution is dirty and so for long term Stones dev I want a
more maintainable design. I&amp;rsquo;ll post more about the overall design once I nail
it down.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Moving to Gitlab</title>
      <link>http://rauko1753.gitlab.io/posts/gitlab/</link>
      <pubDate>Tue, 05 Apr 2016 11:17:17 -0600</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/gitlab/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m moving to GitLab!  You can now find all my hobby code (i.e. stuff done
under the name Rauko) on GitLab: &lt;a href=&#34;https://gitlab.com/u/rauko1753.&#34;&gt;https://gitlab.com/u/rauko1753.HUGOMORE42&lt;/a&gt; I
still have my &lt;a href=&#34;https://github.com/jlund3&#34;&gt;main&lt;/a&gt; GitHub account for non-hobby
projects, and I still have my old &lt;a href=&#34;https://github.com/rauko1753&#34;&gt;hobby&lt;/a&gt;
account, but you&amp;rsquo;ll find that it is barren.&lt;/p&gt;

&lt;p&gt;Okay, so this move probably merits some explanation. Let me first be clear that
this post should not be viewed as a call for everyone to abandon GitHub in
favor of GitLab. This is merely an explaination for why I personally moved some
of my code over to GitLab.&lt;/p&gt;

&lt;p&gt;On the surface GitLab is basically GitHub for enterprise. It comes complete
with git management, code reviews, issue tracking, and so forth. One cool
feature not available on GitHub is that GitLab lets you run on your own servers
should you desire complete control over your code. Of course GitLab also have
free SaaS offerings if you want your stuff in the cloud too. However, for
non-paying individual users like myself, GitHub and GitLab have feature sets of
the two products are quite comparable. That said, here are some reasons why a
free user might consider switching.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FOSS shouldn&amp;rsquo;t put all its eggs in one basket&lt;br&gt;
Suppose GitHub suddenly decided to go the route of SourceForge and
&lt;a href=&#34;http://arstechnica.com/information-technology/2015/05/sourceforge-grabs-gimp-for-windows-account-wraps-installer-in-bundle-pushing-adware/&#34;&gt;pull&lt;/a&gt;
&lt;a href=&#34;http://arstechnica.com/information-technology/2015/06/black-mirror-sourceforge-has-now-siezed-nmap-audit-tool-project/&#34;&gt;crap&lt;/a&gt;
&lt;a href=&#34;https://blog.l0cal.com/2015/06/02/what-happened-to-sourceforge/&#34;&gt;like&lt;/a&gt;
&lt;a href=&#34;https://blog.l0cal.com/2015/06/02/what-happened-to-sourceforge/&#34;&gt;this&lt;/a&gt;.
Admittedly this scenario is pretty unlikely, but there are scenarios which
could conceivably happen. Suppose GitHub changes its pricing model in a bad
way, or suppose GitHub gets taken down in a DDoS attack of some sort&amp;hellip;
Having the entire FOSS community dependant on one code hosting platform seems
pretty risky if you ask me.&lt;/li&gt;
&lt;li&gt;GitHub is not actually open source&lt;br&gt;
Yup - you read that right, and it feels really strange to say given how
GitHub has positioned themselves in the market. GitLab on the other hand is
open source, so all the familiar arguments about the advantages of open
source actually apply. Admittedly, this probably affects enterprise customers
more than individuals, but its still an issue.&lt;/li&gt;
&lt;li&gt;Free private repositories&lt;br&gt;
For almost everything, I don&amp;rsquo;t really care about private repositories at all
since I want the code to be easily accessible by anyone who cares. There are
a few cases where I need private repositories. For example, my private latex
repository is full of unpublished drafts that I intend to eventually publish.
GitHub makes you pay for private repositories and collaborators, while GitLab
does not.&lt;/li&gt;
&lt;li&gt;Sexism and racism seem to be a problem at GitHub&lt;br&gt;
From the outside looking in, GitHub looks like a pretty bad place to work.
We&amp;rsquo;ve had a scandal where
&lt;a href=&#34;http://recode.net/2014/03/15/prominent-github-engineer-julie-ann-horvath-quits-claiming-gender-based-harassment/&#34;&gt;allegations of sexism&lt;/a&gt;
at the highest levels of the company ultimately led to the
&lt;a href=&#34;http://www.theverge.com/2014/4/21/5637282/co-founder-is-out-at-github-after-investigation-into-harassment-claims-horvath-tom-preston-warner&#34;&gt;resignation of it CEO and co-founder&lt;/a&gt;.
In addition to the sexism, there have been some pretty disturbing
&lt;a href=&#34;http://www.breitbart.com/tech/2016/02/08/report-anti-white-agenda-revealed-at-githubs-diversity-team/&#34;&gt;reports of racism&lt;/a&gt;
inside the company. Yes, gender and race gaps in the tech industry are a huge
problem which must be addressed, but being racist against white people isn&amp;rsquo;t
counter racism - it is just regular racism. When &amp;ldquo;it is very hard to even
interview people who are &amp;lsquo;white&amp;rsquo;&amp;ldquo;, there is a serious problem. To be fair,
GitHub seems to be going through a lot of
&lt;a href=&#34;http://www.businessinsider.com/github-the-full-inside-story-2016-2&#34;&gt;turmoil internally&lt;/a&gt;,
so it is hard to say exactly what is going on. What I can say though is that
I wouldn&amp;rsquo;t want to work there right now&amp;hellip;&lt;/li&gt;
&lt;li&gt;GitLab CI is integrated, easy and configurable&lt;br&gt;
Unlike GitHub which requires third-party CI systems, GitLab has CI built
right in. You can pretty much setup an arbitrary build process with GitLab.
Here is an example config file: &lt;a href=&#34;https://gitlab.com/pages/pages.gitlab.io/blob/master/.gitlab-ci.yml&#34;&gt;gitlab-ci.yml&lt;/a&gt;.  An
immediate consequence of these build files is that GitLab pages are much more
configurable than GitHub Pages. GitHub pages are great if you use Jekyll. If
you use something else like me (I use &lt;a href=&#34;http://gohugo.io/&#34;&gt;Hugo&lt;/a&gt;), GitHub is
rather annoying. I have to manually run my static website generator and push
the generated content up to GitHub. Not only does my repository contain tons
of redundancy, its just a hassle to deploy. Due to the way GitLab does CI,
GitLab Pages works with any static site generator. Getting my Hugo-based blog
up on GitLab was as simple as adding a 5 line yaml file.  For me this is a
huge win.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In general I believe that most people have two reasons for everything they do:
the good reason and the real reason. So which bullet in this list is my real
reason for switching to GitLab? Honestly, I don&amp;rsquo;t know. I guess in this case
all of these factors put together have sorta influenced me to want to try
something new. Will I be judging you if you decide to stick with GitHub? Of
course not - this is not a call to ditch GitHub altogether. In fact most of my
&amp;lsquo;real&amp;rsquo; work is still on GitHub. Moving my hobby code to GitLab is mostly an
experiment to see what else is out there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>7DRL Post-mortem</title>
      <link>http://rauko1753.gitlab.io/posts/7DRLpost/</link>
      <pubDate>Sat, 26 Mar 2016 10:06:05 -0600</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/7DRLpost/</guid>
      <description>&lt;p&gt;Okay so I failed at the 7DRL challenge&amp;hellip; In fact its been a while
since I posted anything here. I&amp;rsquo;ve basically been coming up for air after a
rather crazy week at work.  Around day 4 of the challenge we ran into some
serious issues with the user study we were running to validate some of the
algorithms we developed in &lt;a href=&#34;https://github.com/jlund3/ankura&#34;&gt;Ankura&lt;/a&gt;.
Consequently, I spent the next week or so working 20-hour days in a desperate
attempt to get this paper submitted.  I wish I was exaggerating the length of
those workdays&amp;hellip;&lt;/p&gt;

&lt;p&gt;Anyways, I feel like I&amp;rsquo;ve finally come up for air. I started livecoding again
this week, and I&amp;rsquo;ve actually made small amount of progress. First and foremost,
I split off the core package into its own repository available here:
&lt;a href=&#34;https://gitlab.com/rauko1753/gorl&#34;&gt;https://gitlab.com/rauko1753/gorl&lt;/a&gt;. This
repository is broken down into a few subpackages as the original core package
had an absurd number of exported identifiers. Splitting the roguelike library
into its own repository also means you don&amp;rsquo;t have to clone stones just to get
access to the more generalized roguelike functionality, so in future 7DRL
attempts, I&amp;rsquo;ll not be importing anything Stones related.&lt;/p&gt;

&lt;p&gt;Going forward, I think I want to use what I&amp;rsquo;ve learned during the 7DRL
challenge to actually start writing the game. I&amp;rsquo;ve implemented the basic
outline of melee combat. Currently the creatures you encounter in the game
world are just immobile punching bags. My next course of action is to get a
super simple AI for these creatures hooked up.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Starting the 2016 7DRL Challenge</title>
      <link>http://rauko1753.gitlab.io/posts/7DRLgo/</link>
      <pubDate>Mon, 07 Mar 2016 10:49:07 -0700</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/7DRLgo/</guid>
      <description>&lt;p&gt;I am officially entered into the 2016 7DRL Challenge!  I&amp;rsquo;m not
actually going to write much about what I&amp;rsquo;m doing until after the challenge is
complete. After all, I&amp;rsquo;ve only got 168 hours to do this thing! However, here
are a few links in case you want to follow along:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/rauko1753/arena&#34;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.livecoding.tv/rauko/playlists/2AYV2-2016-7drl-challenge/&#34;&gt;Livecoding Playlist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://7drl.roguetemple.com/&#34;&gt;Registration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>Dungeons</title>
      <link>http://rauko1753.gitlab.io/posts/dungeon/</link>
      <pubDate>Sat, 05 Mar 2016 10:36:21 -0700</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/dungeon/</guid>
      <description>&lt;p&gt;This week my main accomplishment was getting dungeon generation working.
 As previously discussed, the basic algorithm involved generating an
abstract maze, and then converting that maze into a dungeon by creating a room
for ever node in the maze and a corridor for every edge in the maze. There are
a lot of parameters to tweak so I can generate very different kinds of
dungeons. Some of these parameters are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run probability - how likely are long runs (as opposed to branches)&lt;/li&gt;
&lt;li&gt;loop probability - how likely are we to remove dead ends from the maze&lt;/li&gt;
&lt;li&gt;loop weave probability - how often we simulate z-levels by having the maze
dig underneath itself&lt;/li&gt;
&lt;li&gt;room dimensions - control distribution of the room dimensions&lt;/li&gt;
&lt;li&gt;num rooms - controls the size of the dungeon&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another cool thing I did to control how the dungeons look is by
making the function that creates the actual tiles of the maze a callback. This
callback basically just says it is creating a tile at a certain (x, y)
position, and gives the type of tile (wall, corridor, room, or door). There is
a default in case you don&amp;rsquo;t need anything special, but if you want to make a
lava themed dungeon or have other special needs you can get it with a custom
tile generator. In fact, I added various tile generation callbacks to all the
different map generation functions, so overall I think we have a lot of
customizability.&lt;/p&gt;

&lt;p&gt;Anyways, below is an example of a dungeon you can generate with
this code. This particular example was made with a loop probability of 1, a
weave probability of 0, and the default tile generator.&lt;/p&gt;

&lt;figure class=&#34;center&#34;&gt;
&lt;a href=&#34;http://rauko1753.gitlab.io/img/dungeon.png&#34; data-lightbox=&#34;set&#34; data-title=&#34;Example of a generated dungeon&#34;&gt;
  &lt;img src=&#34;http://rauko1753.gitlab.io/img/dungeon.thumb.png&#34;&gt;
&lt;/a&gt;
&lt;figcaption&gt;&lt;p&gt;Example of a generated dungeon&lt;/p&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Now that I&amp;rsquo;ve got dungeons working, I want to take these maps and carve out
some additional spaces using a cellular automata so I can finally make caves
for my cavemen. However, this will have to wait a bit since next week is the
2016 7DRL Challenge!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Bug fixing is progress?</title>
      <link>http://rauko1753.gitlab.io/posts/progress/</link>
      <pubDate>Sat, 27 Feb 2016 08:27:23 -0700</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/progress/</guid>
      <description>&lt;p&gt;This last week was fairly uninteresting for Stones dev. Mostly what I did was
track down a visual bug related to weave mazes , or mazes which loop
around on themselves to reuse the same (x, y) coordinate for multiple tiles.
Essentially what happens is that due to transitivity in connections to the
wall, when a maze wraps around a single wall tile then there will be multiple
tiles connected to the wall from the same direction. The wall can only connect
back to one of the incoming edges, and so visual inconsistencies arise when you
query the wall for its adjacent tile with the intent to draw what is next to
that wall. Sometimes you would get the right tile, and sometimes you can
magically see through the floor to a different z-level. This graph structure is
desirable from a traversal standpoint, although typically a moot point since
you can’t walk through impassable Tiles. The main fix was to simple adjust my
field of view calculations such that it will never query a wall tile for its
adjacency if the field source is a non-wall Tile. Sounds easy, and once I
realized what was going on it was easy, but figuring out what was causing the
visual inconsistencies took me an embarrassing amount of time.&lt;/p&gt;

&lt;p&gt;I also started converting my maze generators to generate standard room and
corridor dungeons, although this is still incomplete. I ended up fixing another
bug as part of dungeon generation. Basically what was happening was that
occasionally the origin node in my maze would be removed due to being a dead
end, but would still be accessible due to it being the origin node. The fix was
easy - just let the origin be an arbitrary node &lt;em&gt;in&lt;/em&gt; the maze. Same thing
though - while the fix was easy, figuring out why I would occasionally
traversing the maze graph would result in nil pointer dereference was tricky.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Mazes</title>
      <link>http://rauko1753.gitlab.io/posts/mazes/</link>
      <pubDate>Tue, 23 Feb 2016 14:33:38 -0700</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/mazes/</guid>
      <description>&lt;p&gt;My main focus last week was on maze generation. From a roguelike gameplay
standpoint, mazes suck. However, due to the way I have set up my map data
structures, I will use maze generation in a more abstract way to generate
interesting maps like dungeons and caves.&lt;/p&gt;

&lt;p&gt;I figure if I&amp;rsquo;m gonna have a game with cavemen I better have some decent
looking caves for those cavemen to live in. I&amp;rsquo;ve done cave generation before
with a simple cellular automata randomly initialized on a 2D grid. The maps
cellular automata produce on 2D grid are surprisingly good and are easily
customized just by tweaking the parameters governing the cellular automata.
This technique has become my goto method for cave generation on 2D grid maps.&lt;/p&gt;

&lt;p&gt;However, for Stones my maps are set up a little bit differently. I got this
idea from Jeff Lait&amp;rsquo;s 2015 IRDC talk on &lt;a href=&#34;https://youtu.be/K8dxc807R-4?t=21m13s&#34;&gt;roguelike
algebra&lt;/a&gt; that made me realize you could
do seamless z-levels if you made your map a generalized graph structure.
Instead of a 2D grid of tiles, I actually have my Tile struct store a map of
Offset to Tile. With this generalized graph structure, rather than looking up
in a 2D array of Tile for what Tile is to my left, I instead query the Tile for
what is to its left. I can then build any arbitrary structure I want. Rather
than having a &amp;lsquo;&amp;gt;&amp;rsquo; tile which lets the player to a new level, I can have the
cave entrance simply replace one its edges to point to the cave so the player
can just walk into the cave. The cave structure ends up overlapping in (x, y)
coordinates with the overworld, so we essentially simulate z-levels.
While I don&amp;rsquo;t intend to do this for Stones, you could even do some wonky
non-Euclidean topologies complete with portals, &amp;lsquo;bigger-on-the-inside&amp;rsquo; rooms,
and wickedly intertwined corridors.&lt;/p&gt;

&lt;p&gt;This graph-based map has basically forced me to rewrite all the core algorithms
I previously had written for grids. I&amp;rsquo;ve converted nearly everything including
path finding, Dijkstra maps, field of view, line of sight, and some basic
overworld map generation. Pretty much the last piece I needed was getting caves
for my cavemen to live in.&lt;/p&gt;

&lt;p&gt;To generate caves on a graph I&amp;rsquo;m doing it in a rather odd way. One approach
that doesn&amp;rsquo;t involve a grid is to just morph a traditional room and corridor
dungeon using cellular automata as seen
&lt;a href=&#34;http://roguecentral.org/doryen/articles/dungeon-morphing&#34;&gt;here&lt;/a&gt;. So I need
some rooms and corridors. One way I&amp;rsquo;ve previously done dungeons was by
generating traditional mazes and then converting the maze nodes to rooms and
maze edges to corridors. So I need some mazes - and that is pretty much what I
worked on this week.&lt;/p&gt;

&lt;figure class=&#34;center&#34;&gt;
&lt;a href=&#34;http://rauko1753.gitlab.io/img/maze.png&#34; data-lightbox=&#34;set&#34; data-title=&#34;Example half-braid maze generated with no weave&#34;&gt;
  &lt;img src=&#34;http://rauko1753.gitlab.io/img/maze.thumb.png&#34;&gt;
&lt;/a&gt;
&lt;figcaption&gt;&lt;p&gt;Example half-braid maze generated with no weave&lt;/p&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Currently what I have working is the ability to generate an abstract maze, and
then the ability to convert that abstract maze into a set of Tile. The abstract
maze is a graph structure of nodes and edges.  I can generate the maze with no
loops (i.e. a perfect maze), with no dead ends (i.e. a braid maze), or anywhere
in between. I can also specify how much I want the maze to branch. Finally, I
can specify how much I want the maze to dig under itself and reuse existing (X,
Y) coordinates. I refer to this as &amp;lsquo;weave&amp;rsquo;, although the term typically means
something else in the context of mazes&amp;hellip;oh well.&lt;/p&gt;

&lt;p&gt;For those interested, I used the so-called Growing Tree algorithm. This
algorithm is pretty simple, but also fairly flexible. Here is the pseudo-code
for the algorithm:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-nohl&#34;&gt;frontier = list{start}
while frontier not empty:
  node = choose from frontier
  if node has unused edges:
    edge = choose unused edge from node
    dig on edge to adjacent node
    add adjacent to frontier
  else:
    remove node from frontier
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Converting this algorithm to work with an arbitrary graph structure is pretty
easy. Here are the details that needed some thought:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Normally you choose a random start from a 2D grid. I just start with the
origin (0, 0) and allow my nodes to have negative X and Y positions. I will
end up translating the maze later on anyways, so this is pretty minor.&lt;/li&gt;
&lt;li&gt;Since I don&amp;rsquo;t have a grid and can grow my graph to any arbitrary size, my
frontier will never stop growing. Consequently, I had to change the stopping
criteria to track the number of nodes added to the maze rather than if the
frontier is empty.&lt;/li&gt;
&lt;li&gt;Since my maze allows for &amp;lsquo;weave&amp;rsquo;, I had to modify the definition of &amp;ldquo;unused&amp;rdquo;
edge a bit to (optionally) let nodes create edges to nodes sharing the same
Offset as other existing nodes.&lt;/li&gt;
&lt;li&gt;Choosing a node from the frontier is very important to controlling the
structure of the maze. If you always choose randomly, you get a fairly high
branching factor, and a maze that looks like Prim&amp;rsquo;s algorithm with randomized
weights. If you always choose the newest, you get a very low branching factor
and long runs in the maze. I let the caller determine how often to use a
random node, and how often to use the newest node so they can roughly control
the branching factor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyways, all of this maze stuff is mostly working. I have just one kink to iron
out, which is that I need to figure out a way to properly link all the wall
tiles so that field of view works when I try and fix wall artifacts. This
turned out to be trickier than I thought, but should be doable. Next week&amp;rsquo;s
goal, besides correcting the wall bit, is to take these mazes, and instead
generate room and corridor dungeons.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hello World</title>
      <link>http://rauko1753.gitlab.io/posts/hello/</link>
      <pubDate>Sun, 21 Feb 2016 10:42:52 -0700</pubDate>
      
      <guid>http://rauko1753.gitlab.io/posts/hello/</guid>
      <description>&lt;p&gt;Here is my first blog post! Starting with hello world seemed like the right
thing to do&amp;hellip; Going forward, this site will serve as the
development blog for all things Rauko. Right now everything is pretty darn
minimalistic so I am going to spend a bit of time trying to customize
everything to my liking as I figure out how &lt;a href=&#34;http://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; works.
Once that is all done, I intend to write roughly once a week on Sticks and
Stones development, as well as a few of the other side-projects I have in the
works. You may also occasionally see other random content such as reviews of
other games, thoughts on roguelike design, discussion about
&lt;a href=&#34;https://golang.org/&#34;&gt;Go&lt;/a&gt; (my programming language of choice), and any other
things I feel like writing about.&lt;/p&gt;

&lt;p&gt;In the meantime, here are some links so you can see what I&amp;rsquo;ve been up to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gitlab.com/Rauko1753/stonesrl&#34;&gt;Sticks and Stones GitHub repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.livecoding.tv/rauko&#34;&gt;Livecoding channel for Rauko&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
  </channel>
</rss>