<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Just Don&#39;t Die</title>
    <description>Just don&#39;t die is my first serious platformer game. I have some grand plans of getting it released through steam greenlight once I&#39;m happy with it.
</description>
    <link>http://liquidityc.github.io/justdontdie/</link>
    <atom:link href="http://liquidityc.github.io/justdontdie/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Fri, 06 Nov 2015 20:25:40 +0000</pubDate>
    <lastBuildDate>Fri, 06 Nov 2015 20:25:40 +0000</lastBuildDate>
    <generator>Jekyll v2.4.0</generator>
    
      <item>
        <title>Map making</title>
        <description>&lt;p&gt;Sooo… I started making maps for my program. Just figured out how hard that is. I don’t want a bunch of text that the player is forced to read when he is playing the game. Rather I want him to learn by ‘accident’ which is not as simple as I thought.
That and my Gimp skills aren’t the greatest. Makes me wish I had an artist that would work for me for free.&lt;/p&gt;

&lt;p&gt;I guess I will get back to you with more info once I have some more info.&lt;/p&gt;

&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script&gt;
    var disqus_config = function () {
        this.page.url = &#39;http://liquidityc.github.io&#39;;
        this.page.identifier = &#39;/maps/game/creating/unintended/learning/2015/11/06/making-maps.html&#39;;
    };
    (function() {  // DON&#39;T EDIT BELOW THIS LINE
        var d = document, s = d.createElement(&#39;script&#39;);
        
        s.src = &#39;//linuxcodehacks.disqus.com/embed.js&#39;;
        
        s.setAttribute(&#39;data-timestamp&#39;, +new Date());
        (d.head || d.body).appendChild(s);
    })();
&lt;/script&gt;

&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;https://disqus.com/?ref_noscript&quot; rel=&quot;nofollow&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
</description>
        <pubDate>Fri, 06 Nov 2015 21:17:00 +0000</pubDate>
        <link>http://liquidityc.github.io/justdontdie/maps/game/creating/unintended/learning/2015/11/06/making-maps.html</link>
        <guid isPermaLink="true">http://liquidityc.github.io/justdontdie/maps/game/creating/unintended/learning/2015/11/06/making-maps.html</guid>
        
        
        <category>maps</category>
        
        <category>game</category>
        
        <category>creating</category>
        
        <category>unintended</category>
        
        <category>learning</category>
        
      </item>
    
      <item>
        <title>Reset, map making and windows compile</title>
        <description>&lt;p&gt;So, last few commits have all been about fixing the reset command. I
recently added an object known as the GameStateController which is
intended to handle what state to render (eg. Splashscreen, loadingbars
or actual gameplay). Once I built it I moved all the current game setup
code from the main method of the program to this new class. It worked
like a charm and &lt;a href=&quot;http://valgrind.org/&quot;&gt;Valgrind&lt;/a&gt; reported no leaks.&lt;/p&gt;

&lt;p&gt;However a few hours later I noticed that the games memory would increase
slightly every time I triggered one of these reloads. Naturally this
would be because of some data container that loaded, held and disposed
of data in a nice way at exit but wasn’t cleared on every reload thus
stacking the same data repeatedly on every reset.&lt;/p&gt;

&lt;p&gt;It took some searching to find it. Turned out it was the ResourceContainer
doing what it was created to do but not in an efficient way.&lt;/p&gt;

&lt;p&gt;Whilst looking for it I learned of this command to track memory allocation
during runtime of a program.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;valgrind --tool&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;massif &amp;lt;executable&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I never got super much use out of it. But it’s definitely going in the
pile of good things to know when debugging C/C++ programs.&lt;/p&gt;

&lt;h3 id=&quot;compiling-for-windows&quot;&gt;Compiling for windows&lt;/h3&gt;
&lt;p&gt;The next big thing was re-testing the windows compile. I’ve gotten this
working previously but the executable would never start properly on
windows and I had no clue why. Turns out running the .exe in wine gave
me a lot more information and the solution was to copy some more .dll
files into the distro folder.&lt;/p&gt;

&lt;p&gt;I haven’t tested it on actual windows yet. But I’m hoping that getting
something to run under wine should be a good indicator that it will also
play nice on windows (knowing my luck this will turn out to be completely
wrong once I test it).&lt;/p&gt;

&lt;p&gt;The only issue that remains with the windows .exe that I’ve noticed now
is that random doesn’t seem to work the same way on windows as it does
on linux.&lt;/p&gt;

&lt;p&gt;The following code seems to be missbehaving. Once I confirm it on windows
and solve it I will make a post on what I changed.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cpp&quot; data-lang=&quot;cpp&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;random&amp;gt;&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getRandomBetween&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;random_device&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mt19937&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;uniform_int_distribution&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If I’m really lucky it’s just wine messing it up and not actual
windows. According to the &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/bb982398.aspx#code&quot;&gt;MSDN&lt;/a&gt; page it should work as
expected on windows as well. But when does that ever happen?&lt;/p&gt;

&lt;h3 id=&quot;the-next-step&quot;&gt;The next step&lt;/h3&gt;
&lt;p&gt;I’ve started working on some map sketches in my notepad (I heard this
was a good way to start).  I’ll try to get the 3-6 first maps created
and after that I’ll try to force some friends to beta-test the game
at their leisure.  I’m thinking of having a sort of learning focus on
these first maps. Challenge the player with basic mechanics forcing him
to learn what to do and what not to do as he plays along. Examples are,
ghost mode, falling death, spikes, double-jump and the boost powerup.&lt;/p&gt;

&lt;h3 id=&quot;travisci&quot;&gt;Travis.ci&lt;/h3&gt;
&lt;p&gt;Is still broken for my project with no new information to ad.&lt;/p&gt;

</description>
        <pubDate>Mon, 26 Oct 2015 23:41:00 +0000</pubDate>
        <link>http://liquidityc.github.io/justdontdie/maps/memory/2015/10/26/reset-and-map-making.html</link>
        <guid isPermaLink="true">http://liquidityc.github.io/justdontdie/maps/memory/2015/10/26/reset-and-map-making.html</guid>
        
        
        <category>maps</category>
        
        <category>memory</category>
        
      </item>
    
      <item>
        <title>Travis CI</title>
        <description>&lt;p&gt;So, travisci’s new update for building just ruined my night. Code is fine,
Travis just doesn’t know it yet.&lt;/p&gt;

&lt;p&gt;I’m tired and going to bed. Travis is great but it’s hell getting it
configured. Especially since the PPA’s for SDL2 aren’t whitelisted and
neither is the libsdl2-mixer-dev package.  The ppa was already issued
so I added my ‘+1’ of power among the comments. The package I created
an issue for.  Until both of these get through I guess my inbox will be
spammed by travis stuff.&lt;/p&gt;

&lt;p&gt;Goodnight…&lt;/p&gt;
</description>
        <pubDate>Mon, 26 Oct 2015 00:15:00 +0000</pubDate>
        <link>http://liquidityc.github.io/justdontdie/travisci/code/testing/2015/10/26/travis-ci.html</link>
        <guid isPermaLink="true">http://liquidityc.github.io/justdontdie/travisci/code/testing/2015/10/26/travis-ci.html</guid>
        
        
        <category>travisci</category>
        
        <category>code</category>
        
        <category>testing</category>
        
      </item>
    
      <item>
        <title>Let&#39;s get ready to rumble!</title>
        <description>&lt;p&gt;Ok, here we go. I created this blog for my game mostly so I’d have
someone to tell about what I just did and what my plans are. Not that
anyone is reading it right now but still. If someone does it will look
pretty serious.  I also think it will help a lot with development if I
write down my ideas and plans. That way I get some free project notes
and documentation that I can look back on.&lt;/p&gt;

&lt;h3 id=&quot;current-status&quot;&gt;Current status&lt;/h3&gt;
&lt;p&gt;I’m pretty happy with the flatlib. It’s requiring very little updates
or code commits lately and my main focus has been able to stay on the
actual game code.  So far it looks like the game will be similar to
Super Mario and Super Meatboy. Just google those if you don’t know what
they are. Although, if you don’t know what Super Mario is, very little
in this blog should be interesting to you.&lt;/p&gt;

&lt;p&gt;The game at least runs pretty smoothly now. I made some optimizations to
the input handling so that all objects are no longer checked on input
events. Not sure if it helps much. Although it should, it might be a
good idea for me to put some time into debugging of the game. Creating
good outputs so that I can monitor what’s going on in different
places. Benchmarking functions should probably be the first step.&lt;/p&gt;

&lt;h3 id=&quot;tip-of-the-day&quot;&gt;Tip of the day&lt;/h3&gt;
&lt;p&gt;This project is awesome and Casey is a brilliant coder and teacher
&lt;a href=&quot;http://www.handmadehero.org&quot;&gt;handmadehero.org&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Sun, 25 Oct 2015 21:20:43 +0000</pubDate>
        <link>http://liquidityc.github.io/justdontdie/jekyll/update/2015/10/25/lets-get-started.html</link>
        <guid isPermaLink="true">http://liquidityc.github.io/justdontdie/jekyll/update/2015/10/25/lets-get-started.html</guid>
        
        
        <category>jekyll</category>
        
        <category>update</category>
        
      </item>
    
  </channel>
</rss>
