<?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>
      tek256
    </title>
    <link>https://tek256.com/posts/</link><image>
      <url>https://tek256.com/images/icon.png</url>
      <title>tek256</title>
      <link>https://tek256.com/</link>
    </image>
    <description>thoughts from beyond the keyboard</description><generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Tue, 30 Dec 2025 12:24:46 -0800</lastBuildDate><atom:link href="https://tek256.com/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>glhf</title>
      <link>https://tek256.com/posts/glhf/</link>
      <pubDate>Tue, 30 Dec 2025 12:24:46 -0800</pubDate>
      <guid>https://tek256.com/posts/glhf/</guid>
      <description>tough times don&#39;t last, tough people do</description>
      <content:encoded><![CDATA[<p>The winds blew hard this year. Taking much with it, best it not take our souls as well.</p>
<p>To all fellow sailors out there; I hope you find good fortune and fun in the coming year. Now is the time to write our own stories and chart our own paths.</p>
<p>Good luck, have fun :)</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>programming guidelines</title>
      <link>https://tek256.com/posts/programming-guidelines/</link>
      <pubDate>Sat, 03 Dec 2022 14:45:00 -0700</pubDate>
      <guid>https://tek256.com/posts/programming-guidelines/</guid>
      <description>guidelines I follow when programming</description>
      <content:encoded><![CDATA[<p>One of the more useful things I feel a programmer can do is to create their own programming guidelines. I’m not saying reinvent the wheel and create a new language standard, but rather a set of rules/guidelines you tend to work with. This post serves as my rough, mostly complete, list of that.</p>
<h2 id="kiss---keep-it-stupid-simple" class="h2-anchor-wrapper">
  <a href="#kiss---keep-it-stupid-simple" class="h2-anchor" aria-label="Copy link to section">#</a>KISS - Keep It Stupid Simple
</h2><p>When I say keep it simple, I don’t mean endlessly remove features until you’re left with no program at all. But the goal of keeping a program, function, or line of code simple is to maintain legibility and more importantly usability. I’m willing to wager that all programmers write code they’re not going to recognize in a given period of time. Oftentimes that length of time is much shorter than you might think. Writing clear, concise statements in your program can lead to a clear trail to follow. Writing clear, concise functions can make a program easier to dissect. It’s awfully difficult to optimize or even just maintain a code base if things aren’t easily parsed by our squishy brains. This serves in the way of not over complicating your end goal as well. Do you need 16 ways to update a row in a database or just the one or two?</p>
<p><picture>
        <source srcset="/images/loopsgobrr_hu_ae49f66ebf811e9.webp" type="image/webp">
        <img src="/images/loopsgobrr.png" alt="Nested for loops go brrr">
      </picture></p>
<h2 id="use-the-smallest-possible-data-type" class="h2-anchor-wrapper">
  <a href="#use-the-smallest-possible-data-type" class="h2-anchor" aria-label="Copy link to section">#</a>Use the smallest possible data type
</h2><p>This isn’t necessarily the best practice to do for optimization. Rather my goal with this is about understanding the scope of the variable needed. It forces me to think about what I’m writing instead of just writing out <code>int</code> for every single counting number that I need. There are plenty of talks on <a href="https://vimeo.com/649009599">Data Oriented Design</a> that address this topic significantly better than I will within the scope of this list.</p>
<h2 id="be-consistent" class="h2-anchor-wrapper">
  <a href="#be-consistent" class="h2-anchor" aria-label="Copy link to section">#</a>Be Consistent
</h2><p>When you’re learning something difficult oftentimes you’ll be told,”Consistency is key”. Cliches aside, it’s an important factor in programming. Consistently writing code that is laid out similarly across the program can give you an added efficiency bonus when debugging or optimizing. By consistency I mean functionally. When I write my physics logic for games, I tend to lay it out in the same fashion where possible. If I use common functions amongst many different scopes it leaves me with a common denominator to debug at. Yes it creates a point of failure, but I also don’t like maintaining 18 versions of the same thing. Which leads me to my next guideline:</p>
<h2 id="dry---dont-repeat-yourself" class="h2-anchor-wrapper">
  <a href="#dry---dont-repeat-yourself" class="h2-anchor" aria-label="Copy link to section">#</a>DRY - Don’t Repeat Yourself
</h2><p>This is directly lifted from <a href="https://pragprog.com/titles/tpp20/the-pragmatic-programmer-20th-anniversary-edition/">The Pragmatic Programmer</a>. There are certain cutoffs to this sentiment, especially in games. But generally I stick to the goal of not repeating common functionality more than twice in separate functions. Usually this ends up being look up functionality, adding or removing something from an array that isn’t just as simple as changing the index, or context changes.</p>
<h2 id="have-a-naming-convention" class="h2-anchor-wrapper">
  <a href="#have-a-naming-convention" class="h2-anchor" aria-label="Copy link to section">#</a>Have a naming convention
</h2><p>The goal of a naming convention is to be consistent. Yes, it’s sort of a repeat of the ‘Be Consistent’ guideline, but it’s important enough to separate out. Having consistent naming means you’ll not have to rely upon recalling a function name. You can figure it out on your own. Here’s an example of my naming convention:</p>
<p>In my game engine, astera, I write out several different files of functionality useful for working on games. The first character of my function names signify the subsystem (rendering, audio, collision, etc). Followed by the data type/struct, then operation. So say I want to create the rendering context at startup. I start off with the subsystem <code>r</code> then context in my keyword list is defined as <code>ctx</code> so it becomes <code>r_ctx</code>. The operation is <code>create</code> so the function name is <code>r_ctx_create</code>. I have keywords I often repeat in places so that it’s not a guessing game as to what I should name something as well. Am I wanting to destroy/exit the render context? That’s <code>r_ctx_destroy</code>. What if I want to update the listener’s position for audio? <code>a_listener_set_pos</code>.</p>
<p>This is one of those rules that generally applies to bigger projects but is easily ignored by smaller ones. What do I define as a larger project? Anything greater than 50 lines of code usually.</p>
<h2 id="use-a-code-formatter" class="h2-anchor-wrapper">
  <a href="#use-a-code-formatter" class="h2-anchor" aria-label="Copy link to section">#</a>Use a code formatter
</h2><p>Yes, seriously. This is huge. Having consistently laid out files is essential for your sanity the second you have to use pull requests or merge in other people’s code. I can’t tell you how many days of my life have been lost to simply having to correct merge conflicts that were generated by whitespace. Consistent layout generally prevents most of these conflicts, and saves you time. The tool I prefer for this is <a href="https://clang.llvm.org/docs/ClangFormat.html">clang-format</a>. There’s a plugin for just about every editor out there I can think of. I know even Visual Studio now supports it (crazy, right?). Here’s my <a href="https://codeberg.org/tek256/dots/src/branch/main/.clang-format">clang format file</a> I use for just about everything C/C++ related.</p>
<h2 id="backup-your-configuration-files" class="h2-anchor-wrapper">
  <a href="#backup-your-configuration-files" class="h2-anchor" aria-label="Copy link to section">#</a>Backup your configuration files
</h2><p>Shit happens. Your computer’s current state is not guaranteed. There are plenty of tools out there to backup your configuration files, generally called dot file managers. I’ve seen people write their own scripts that just make symlinks to a central folder that they have as a repository on their github to automatically backup their files. There are programs as well. Or you can just drop the updated files into a <a href="https://codeberg.org/tek256/dots">repository</a> you backup inconsistently to tell yourself you’re responsible. Either way, having a solid point to recover from reduces the time you’re having to spend setting up your development environment again.</p>
<h2 id="test-your-work" class="h2-anchor-wrapper">
  <a href="#test-your-work" class="h2-anchor" aria-label="Copy link to section">#</a>Test your work
</h2><p>There might come a day where you think you know everything you need to in relation to a certain project. But the simple fact of the matter is that we are not computers. Static analysis, unit tests, whatever version of testing you want to do, you should have at least something. No, you don’t need a whole suite to perform regression testing and spit out fancy graphs showing you how shit one of your updates was. But when left in the darkness, you simply cannot know exactly what is happening. Clang has one built in, there are plenty of others like <a href="https://github.com/danmar/cppcheck">Cppcheck</a> out there. I recommend you get comfortable using one. As well, use an AddressSanitizer. Modern compilers have native support built in, oftentimes are just a few optional package installs away at most.</p>
<h2 id="low-config" class="h2-anchor-wrapper">
  <a href="#low-config" class="h2-anchor" aria-label="Copy link to section">#</a>Low Config
</h2><p>I find that a lot of the time I don’t configure my editors a lot. I will go out of way to make some obvious quality of life changes. For example, adding fzf to vim. Do I need it? No. Can I operate without it? Yeah. But the primary idea of this preference is that I can sit down at any computer, if it has it installed already just out of the box, I can get to working right away.</p>
<h2 id="keeping-it-lean" class="h2-anchor-wrapper">
  <a href="#keeping-it-lean" class="h2-anchor" aria-label="Copy link to section">#</a>Keeping it Lean
</h2><p>This is where things really are circumstantial. I’m fortunate that most of the projects that I work with are relatively straightforward in a lot of aspects. The fun thing about large projects is that everything focuses on efficiency and quality within a span of time usually. Even as Astera approached 16,000 lines of code (in itself) I’m starting to notice a good bit of my workflow slow down. Things like <a href="https://github.com/rhysd/vim-clang-format">clang-format</a> on save are starting to add artificial delays. I often ask myself the following questions: Do I need all of the tools I’m using? Are any of my tools causing me to stop and break flow to accomplish something? Is my code arbitrarily verbose? Is there a simpler and more straightforward way to accomplish this?</p>
<h2 id="5-9s-theory" class="h2-anchor-wrapper">
  <a href="#5-9s-theory" class="h2-anchor" aria-label="Copy link to section">#</a>5 9s Theory
</h2><p>This might be something older (than I am) developers already know. But for some reason it’s fallen out of common lingo in programming lately. 5 9s refers to uptime of a given service (99.999%). Some might know it as <a href="https://en.wikipedia.org/wiki/Six_Sigma">six sigma</a>. I was exposed to this when working as a pseudo sysadmin which really gave me a respect for the other side of programming. Those that have to live with our code. Many times you’ll be tasked with maintaining code within a company. The main sticking point is that if something were to happen, be it a career change or getting hit by a <a href="https://en.wikipedia.org/wiki/Bus_factor">bus</a>, there is a distinct possibility that production code you write can and will live on somewhere, maintained by someone who doesn&rsquo;t have perfect context or history behind the reasoning of the code.</p>
<p>My point being, write good tools that work and document them properly. To refer back to Keeping It Simple, use what you need, and don’t settle for “just alright” if you can afford to not. I’ve found that taking the time to set myself up with stable and reliable tools (and auditing them) be it once a year or every few months is infinitely more fruitful than jumping ship to whatever bleeding edge (it’s called bleeding edge for a reason) tech there is.</p>
<h2 id="give-yourself-space" class="h2-anchor-wrapper">
  <a href="#give-yourself-space" class="h2-anchor" aria-label="Copy link to section">#</a>Give yourself space
</h2><p>This is one of those things that requires constant maintenance. It&rsquo;s in part brought to the forefront of my observation due to me reading Deep Work by Cal Newport. I’d sort of tried to do this prior but didn’t have a lot of the words Cal had put into writing. I find I both get into flow faster and stay in it longer if I chunk out my schedule to ignore email, discord, social media etc. Just me, some music, and the code (or whatever I’m working on). This can be a difficult one to put into practice especially if your habits conflict with it. It&rsquo;s been I get some of my best work done in these times. There is the common sentiment of a “10x engineer” that many often wager as a goal. I don’t think that such exists, just a true fully realized 1x engineer.</p>
<h2 id="in-conclusion" class="h2-anchor-wrapper">
  <a href="#in-conclusion" class="h2-anchor" aria-label="Copy link to section">#</a>In Conclusion
</h2><p>One of the common themes here is that less can be more in a lot of situations. Where is it really possible for us to improve not only as professionals but as individuals by making otherwise minor changes? If you actually read this far, I hope you take the time to try some of these ideas out for yourself. I don’t think my words do it complete justice, and am interested in your interpretations of this.</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>game audio</title>
      <link>https://tek256.com/posts/game-audio/</link>
      <pubDate>Fri, 07 Oct 2022 18:40:00 -0700</pubDate>
      <guid>https://tek256.com/posts/game-audio/</guid>
      <description>an introduction to concepts &amp; tools commonly used in game audio production</description>
      <content:encoded><![CDATA[<p>Audio in games is a surprisingly sparse subject when it comes to the technical side. Especially when you&rsquo;re trying to work with it independent of a game engine. The barrier to entry can be pretty great if you&rsquo;ve never worked with it before and want to explore how it actually works. My goal with this article is to help get that ball rolling. As well as explain some concepts that can be hard to find real world definitions for. Things like FMod, Unity, and prebuilt engines in general can expose similar concepts to one another. These being: audio source (think speaker in a room), audio buffer (the data of the sound file), listener (your ears), and basic controls for playback modification like filters and effects on both the listener and source side. The goal of this post is to help explain some concepts that are often overlooked by more experienced developers that less acquainted ones might not have many resources for. Much of this is meant to be universal, but there will be a link to a sample audio framework written by a friend of mine in C99 at the bottom of the page. As well I’ve made an example repository you can find on <a href="https://codeberg.org/tek256/audio">Codeberg!</a></p>
<h2 id="buffers" class="h2-anchor-wrapper">
  <a href="#buffers" class="h2-anchor" aria-label="Copy link to section">#</a>Buffers
</h2><p>Buffers are a relatively straightforward concept, right? Think big array with only a set number of indexes immediately stored. You can fetch more, continue down the buffer, or just straight up modify the data going in for effects. You see this data, <em><strong>is the audio that&rsquo;s getting played back</strong></em>. Beware tho, modifying this data directly can lead to funky outcomes when combined with other layers of the audio system. Generally we try to limit modifying the buffers to just simple <strong>filters</strong> (I&rsquo;ll explain filters more later, just think of it like cutting out certain bits). With these buffers, you pass them to sources that read them and play them back! Note: Generally the data in these buffers is called PCM. PCM stands for Pulse Code Modulation (Amplitude, Frequency, and Phase). This data tells your speakers what to play.</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">pseudo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dm9pZCBjcmVhdGVfYnVmZmVyKHVuc2lnbmVkIGNoYXIqIGZpbGVfZGF0YSwgaW50IGZpbGVfc2l6ZSkgewogIC8vIE9wZW5BTDogYWxHZW5CdWZmZXJzKDEsICZidWZmZXJfaWQpCiAgaW50IGJ1ZmZlcl9pZCA9IGJ1ZmZlcl9jcmVhdGUoKTsKICAvLyBPcGVuQUw6IGFsQnVmZmVyRGF0YShidWZmZXIsIGZvcm1hdCwgZGF0YSwgc2l6ZSwgZnJlcSkKICBidWZmZXJfZGF0YShidWZmZXJfaWQsIGZpbGVfZGF0YSwgZmlsZV9zaXplKTsgCn0="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">create_buffer</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">char</span><span class="o">*</span> <span class="n">file_data</span><span class="p">,</span> <span class="kt">int</span> <span class="n">file_size</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alGenBuffers(1, &amp;buffer_id)
</span></span></span><span class="line"><span class="cl">  <span class="kt">int</span> <span class="n">buffer_id</span> <span class="o">=</span> <span class="nf">buffer_create</span><span class="p">();</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alBufferData(buffer, format, data, size, freq)
</span></span></span><span class="line"><span class="cl">  <span class="nf">buffer_data</span><span class="p">(</span><span class="n">buffer_id</span><span class="p">,</span> <span class="n">file_data</span><span class="p">,</span> <span class="n">file_size</span><span class="p">);</span> 
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="sources" class="h2-anchor-wrapper">
  <a href="#sources" class="h2-anchor" aria-label="Copy link to section">#</a>Sources
</h2><p>While a source could mean a few different things in the programming context, think of it as a floating speaker at a given point in space. Whether 2D or 3D, doesn&rsquo;t make too much of a difference except what you hear. With these sources, like mentioned earlier, you can attach a buffer to play back. You can also generally attach filters and effects (think reverb, chorus, etc, I&rsquo;ll explain this more too). The source is meant to be the place where you dial in what you want to come out of that speaker if you were directly in front of it. Do you want that monster hit to sound super echo-y without making all sounds echo? You should probably attach the reverb effect to the source then.</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">psuedo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dm9pZCBjcmVhdGVfc291cmNlKHZlYzMgcG9zaXRpb24pIHsKICAvLyBPcGVuQUw6IGFsR2VuU291cmNlcygxLCAmc291cmNlX2lkKQogIGludCBzb3VyY2VfaWQgPSBzb3VyY2VfY3JlYXRlKCk7IAogIC8vIE9wZW5BTDogYWxTb3VyY2UzZihzb3VyY2VfaWQsIEFMX1BPU0lUSU9OLCB4LCB5LCB6KQogIHNvdXJjZV9zZXRfcG9zaXRpb24oc291cmNlX2lkLCBwb3NpdGlvbik7IAp9"><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">create_source</span><span class="p">(</span><span class="n">vec3</span> <span class="n">position</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alGenSources(1, &amp;source_id)
</span></span></span><span class="line"><span class="cl">  <span class="kt">int</span> <span class="n">source_id</span> <span class="o">=</span> <span class="nf">source_create</span><span class="p">();</span> 
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alSource3f(source_id, AL_POSITION, x, y, z)
</span></span></span><span class="line"><span class="cl">  <span class="nf">source_set_position</span><span class="p">(</span><span class="n">source_id</span><span class="p">,</span> <span class="n">position</span><span class="p">);</span> 
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="listener" class="h2-anchor-wrapper">
  <a href="#listener" class="h2-anchor" aria-label="Copy link to section">#</a>Listener
</h2><p>The listener is one of the more straightforward concepts in game audio. Think of it as your ears. Some people consider it a microphone so it doesn&rsquo;t have to be tied to a specific entity. Either works. At the listener stage is generally where you want to <em>mix</em> the audio in what is being heard. Keep in mind you can also attach global effects and filters to the listener for when you sounds to be modified uniformly.</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">pseudo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="Ly8gTk9URTogTW9zdCBhdWRpbyBmcmFtZXdvcmtzIGFzc3VtZSB0aGVyZSdzIGFsd2F5cyAKLy8gICAgICAgYSBsaXN0ZW5lciBzbyB5b3Ugc2hvdWxkbid0IG5lZWQgdG8gaW5pdGlhbGl6ZSBpdAp2b2lkIHVwZGF0ZV9saXN0ZW5lcih2ZWMzIHBvc2l0aW9uLCBmbG9hdCBnYWluKSB7CiAgLy8gT3BlbkFMOiBhbExpc3RlbmVyM2YoQUxfUE9TSVRJT04sIHgsIHksIHopOwogIGxpc3RlbmVyX3NldF9wb3NpdGlvbihwb3NpdGlvbik7IAogIC8vIE9wZW5BTDogYWxMaXN0ZW5lcmYoQUxfR0FJTiwgZ2Fpbik7CiAgbGlzdGVuZXJfc2V0X2dhaW4oZ2Fpbik7IAp9"><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="c1">// NOTE: Most audio frameworks assume there&#39;s always 
</span></span></span><span class="line"><span class="cl"><span class="c1">//       a listener so you shouldn&#39;t need to initialize it
</span></span></span><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">update_listener</span><span class="p">(</span><span class="n">vec3</span> <span class="n">position</span><span class="p">,</span> <span class="kt">float</span> <span class="n">gain</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alListener3f(AL_POSITION, x, y, z);
</span></span></span><span class="line"><span class="cl">  <span class="nf">listener_set_position</span><span class="p">(</span><span class="n">position</span><span class="p">);</span> 
</span></span><span class="line"><span class="cl">  <span class="c1">// OpenAL: alListenerf(AL_GAIN, gain);
</span></span></span><span class="line"><span class="cl">  <span class="nf">listener_set_gain</span><span class="p">(</span><span class="n">gain</span><span class="p">);</span> 
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="mixing" class="h2-anchor-wrapper">
  <a href="#mixing" class="h2-anchor" aria-label="Copy link to section">#</a>Mixing
</h2><p>Mixing can be a whole host of things. Like DJing at a live show, mixing in game audio is generally dynamic. Having a good mix can having a game sound great or like complete garbage with no regard for the listener. There&rsquo;s a few steps to mixing in itself but by far the most important is loudness. Keep in mind there&rsquo;s a difference between loudness and volume. Volume is generally at what decibel is something being played. Loudness is how loud something is generally perceived. There&rsquo;s a few categories to it but the one I find most important is the delta of volume. Something that has high volume suddenly can appear louder than something winding up over time. The best example is boiling a frog, where volume is the heat. As well it also includes the range of that sound. Is it too high pitched? Might want to eq (equalize) the high range down so it&rsquo;s not so annoying. Does the sound just need some high frequencies taken out, not muffled? Add a low pass filter to it and tweak the values to match. A useful topic on loudness is, <a href="https://blog.landr.com/lufs-loudness-metering/">LUFS</a> (Loudness Units relative to Full Scale).</p>
<p>Mixing, I think, is generally the art of layering things together well and with proper focus. What is relevant in a song that is crazy memorable on a journey thru an environment is very different from a background song that&rsquo;s just meant to set the mood while you&rsquo;re fighting enemies creating tons of sounds. In combat it&rsquo;s a good idea to prioritize important sounds that might be cues to the player as to exactly what is going on. Another important thing is culling out too many sounds. If you have 600 enemies making the exact same sound in a given period of time, hearing it 600 times can be a little crazy. There&rsquo;s a limit to how much we naturally perceive relative to how loud something already is. So when something is loud and near you, you won&rsquo;t necessarily be able to hear the leafs falling 50 meters away.</p>
<h2 id="effects" class="h2-anchor-wrapper">
  <a href="#effects" class="h2-anchor" aria-label="Copy link to section">#</a>Effects
</h2><p>Effects can be thought of as mathematical formulas for modifying data. All the effects generally do is take some inputs and create an output. I like to think of them as small black boxes I hook all my guitar pedals up to to make it sound different. Reverb is perhaps one of the more prevalent effects used. Reverb has a few inputs to it generally: room size, wet/dry, damp, gain, etc. There’s a large amount of possibility when it comes to effects but generally there’s a set of effects used: reverb, chorus, distortion, echo, flanger, and equalizers.</p>
<h2 id="filters" class="h2-anchor-wrapper">
  <a href="#filters" class="h2-anchor" aria-label="Copy link to section">#</a>Filters
</h2><p>Filters are more like, well, filters. Think about audio this way: there’s 3 main frequency bands we tend to consider: low, mid, and high. Think of low pretty much as bass/booming sounds, mid is roughly where some lower sounding instruments are and much of human talking, while high is all the higher pitched ends of talking, instruments, metal sounds, etc. These categories directly correlate to the frequency of the sound being percieved. For helping cull out some of these bands, we generally use what are aptly named: lowpass filter, highpass filters, and bandpass filters. You can think of them as pretty direct implications of their names. Low pass lets thru low end noises, high pass higher end, and band pass both low and high. Filters like these might be important if you have a sound effect you know occupies a certain frequency, and you want to give it the ability to stand out in the playback. To do that, you can just add a filters to filter around where the sound occupies, giving it a sort of solo effect. If you&rsquo;re interested in learning more about filters, I&rsquo;d recommend this <a href="https://www.edmprod.com/audio-filters/">article</a>. TL;DR Low pass lets low frequencies thru, high pass lets high frequencies thru.</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">pseudo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dm9pZCBmaWx0ZXJfb3V0X2Fubm95aW5nX3NvdW5kcyhzb25nIGFubm95aW5nX3NvbmcpIHsKICAvLyBDcmVhdGUgYSBsb3dwYXNzIGZpbHRlciB0aGF0IGxldHMgYWxsIGZyZXF1ZW5jaWVzIHVuZGVyIDIya2h6IHRocnUKICBsb3dwYXNzX2ZpbHRlciA9IGxvd3Bhc3NfZmlsdGVyX2NyZWF0ZSgyMjAwMC4wZik7CiAgc29uZ19hZGRfZmlsdGVyKGFubm95aW5nX3NvbmcsIGxvd3Bhc3NfZmlsdGVyKTsKfQ=="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">filter_out_annoying_sounds</span><span class="p">(</span><span class="n">song</span> <span class="n">annoying_song</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// Create a lowpass filter that lets all frequencies under 22khz thru
</span></span></span><span class="line"><span class="cl">  <span class="n">lowpass_filter</span> <span class="o">=</span> <span class="nf">lowpass_filter_create</span><span class="p">(</span><span class="mf">22000.0f</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">  <span class="nf">song_add_filter</span><span class="p">(</span><span class="n">annoying_song</span><span class="p">,</span> <span class="n">lowpass_filter</span><span class="p">);</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="keyframes--events" class="h2-anchor-wrapper">
  <a href="#keyframes--events" class="h2-anchor" aria-label="Copy link to section">#</a>Keyframes + Events
</h2><p>Effects and filters are important. What is also important is that you can update the parameters of each over time following key frames/events. There might be specific bits of songs that need a low pass filter during combat but not the rest of the song or when there is no longer other sounds in that frequency range playing. I <strong>strongly</strong> encourage you to not go too over board with this. But it is important to understand that there are many possible layers of complexity when it comes to playing with the sound you’re receiving. Keyframes and Events should be able to trigger different things with regards to your sound, dynamic sound modulation can have really cool effects!</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">psuedo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dm9pZCBlbmVteV9hdHRhY2tzX3VzKCkgewogIC8vIC4uLiB1cGRhdGUgY29sbGlzaW9uLCBnYW1lIHN0YXR1cywgZXRjCiAgc3RhcnRfY29tYmF0X2VmZmVjdHMoKTsKfQoKLy8gRmlsdGVyIG91dCBtb3N0IHRoZSB1cHBlciBlbmQgbm9pc2VzIHNvIGNvbWJhdCBzb3VuZCBlZmZlY3RzIGFyZSBoZWFyZCBjbGVhcmx5CnZvaWQgc3RhcnRfY29tYmF0X2VmZmVjdHMoKSB7CiAgLy8gbGV0IGV2ZXJ5dGhpbmcgYmVsb3cgMTYwMCBoeiB0aHJ1CiAgZmlsdGVyID0gbG93cGFzc19maWx0ZXJfY3JlYXRlKDE2MDAuMGYpOyAKICBmb3Ioc29uZyBjdXJyZW50X3NvbmcgOiBzb25nc19wbGF5aW5nKSB7CiAgICBzb25nX2FkZF9maWx0ZXIoY3VycmVudF9zb25nLCBmaWx0ZXIpOwogICAgLy8gTWF5YmUgbG93ZXIgdGhlIGdhaW4gYXMgd2VsbCwgdW5sZXNzIHdlJ3JlIHBsYXlpbmcgYW4gaW50ZW5zZSBzb25nIQogIH0KfQ=="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">enemy_attacks_us</span><span class="p">()</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// ... update collision, game status, etc
</span></span></span><span class="line"><span class="cl">  <span class="nf">start_combat_effects</span><span class="p">();</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// Filter out most the upper end noises so combat sound effects are heard clearly
</span></span></span><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">start_combat_effects</span><span class="p">()</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// let everything below 1600 hz thru
</span></span></span><span class="line"><span class="cl">  <span class="n">filter</span> <span class="o">=</span> <span class="nf">lowpass_filter_create</span><span class="p">(</span><span class="mf">1600.0f</span><span class="p">);</span> 
</span></span><span class="line"><span class="cl">  <span class="k">for</span><span class="p">(</span><span class="n">song</span> <span class="nl">current_song</span> <span class="p">:</span> <span class="n">songs_playing</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nf">song_add_filter</span><span class="p">(</span><span class="n">current_song</span><span class="p">,</span> <span class="n">filter</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">    <span class="c1">// Maybe lower the gain as well, unless we&#39;re playing an intense song!
</span></span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="audio-codecs" class="h2-anchor-wrapper">
  <a href="#audio-codecs" class="h2-anchor" aria-label="Copy link to section">#</a>Audio Codecs
</h2><p>Audio can be a lot of data if it goes on for long enough. The way we store and transmit audio is generally compressed so that most audio that wouldn&rsquo;t be human perceivable is cut out. The point of the codec is to help compress and cut out unnecessary (open to interpretation) data in audio files. In game development I&rsquo;ve generally run across two main formats for audio, and I&rsquo;ll explain them as such. Note: Codec stands for coder/decoder.</p>
<p>WAV / Wave Format: Wave Format is one of the most straightforward formats you can use. It&rsquo;s good for short sounds that generally don&rsquo;t need compression and thus you can afford to let them be closer to original size. Wave is generally uncompressed meaning the format dictates you store the raw audio data in the file. The file is pretty much just a <a href="https://docs.fileformat.com/audio/wav/#wav-file-header">header</a> on at the start with the data following. That makes loading and streaming it from disk relatively straightforward. Keep track of where you were and you can know where you should go next.</p>
<p>OGG / Vorbis: OGG Vorbis is an open source audio format/container. <code>.ogg</code> files can be deceptively small, as the algorithm is super efficient at cutting out imperceptible noise and saving frames of what will need to be played back. It has quite a bit of configurability, but the main benefit of the system is the almost mind boggling level of compression you can get out of it. Here’s some real world stats. My prized possession of a file: <code>Rebecca Black - Friday.mp3</code> is roughly 5.3 mb. Well, that’s pretty good if you ask me for a 3 minute 47 second absolute banger of a song. Well when I hook that up to ffmpeg and convert it to WAV File, it’s now 39.1 mb. Man, mp3 must be insane… Run it thru ffmpeg again converting that WAV file to OGG yields a file of 2.8 mb. Almost half the size of the mp3 we started with. With that level of compression in mind there are some drawbacks to implementing it. The way the format is laid out means there&rsquo;s almost always a need to use a library that has implemented decoding it (stb, libvorbis) which has inherit overheads in itself. The main tradeoff here is disk space for CPU cycles. Vorbis is primarily used in my projects for music files exclusively. The compression is so great and the streaming implementation, when done correctly, can be almost no cost on modern machines. Keep in mind that wave files are generally advisable for sound effects, because now you&rsquo;re not having to decode 60 smaller files, just a few big ones over time.</p>
<p>After these two examples you might be wondering, why not just use MP3? It’s a good middle ground, it’s almost the defacto standard for compressed audio these days. You can download them pretty easily. Well, historically, mp3 is a licensed technology. Meaning you should probably acquire a license (acquire as in pay for) to use the technology/standard in your software. Software patents are evil, and make it complicated and mundane enough that it’s straight up just not worth it. If you’re concerned about accessibility to getting files to WAV/OGG, I strongly encourage downloading <a href="https://ffmpeg.org/">ffmpeg</a> and using it to convert your audio if your creation software doesn’t export to it immediately (most do).</p>
<figure class="code-block" data-lang="c">
	<figcaption class="code-header">
		<span class="code-title">psuedo-code</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dm9pZCBkZWNvZGVfb2dnX2ZpbGUodW5zaWduZWQgY2hhciogZmlsZV9kYXRhLCBpbnQgZmlsZV9sZW5ndGgpIHsKIHVzYWJsZV9hdWRpb19kYXRhID0gdm9yYmlzX2RlY29kZXJfZGVjb2RlKGZpbGVfZGF0YSwgZmlsZV9sZW5ndGgpOwogCiAvLyB0aGVuIGJ1ZmZlciB0aGUgZGF0YSBpbnRvIGEgYnVmZmVyIGZvciB1c2Ugb3IganVzdCBwcmludCBpdCBmb3IgZnVuc2llcwp9"><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="kt">void</span> <span class="nf">decode_ogg_file</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">char</span><span class="o">*</span> <span class="n">file_data</span><span class="p">,</span> <span class="kt">int</span> <span class="n">file_length</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">usable_audio_data</span> <span class="o">=</span> <span class="nf">vorbis_decoder_decode</span><span class="p">(</span><span class="n">file_data</span><span class="p">,</span> <span class="n">file_length</span><span class="p">);</span>
</span></span><span class="line"><span class="cl"> 
</span></span><span class="line"><span class="cl"> <span class="c1">// then buffer the data into a buffer for use or just print it for funsies
</span></span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<h2 id="tips" class="h2-anchor-wrapper">
  <a href="#tips" class="h2-anchor" aria-label="Copy link to section">#</a>Tips
</h2><ul>
<li>Don&rsquo;t master your sounds to 0 db being the ceiling, there is data loss after you cross 0 db, so amplifying it leads to lower quality</li>
<li>A good atmosphere sound is better than an alright song, don&rsquo;t be afraid to not be playing music constantly</li>
<li>Making music is hard, but it&rsquo;s not the most important audio of your game. Sound effects alone can make a game sound good, bad music can tank it. Add good music and it can be a masterpiece. Find your capabilities and stretch them a little but be realistic when it comes to standards</li>
<li>Listen to your audio in different places. Headphones are always ideal, but not everyone will play every game with great headphones on. Not everyone will play your game inside. Listen to your creations in the car, in your bathroom on a speaker, on your TV, and with quiet headphones. Note: some games offer EQ options based on where you&rsquo;re listen to it, not all these environments are made equal</li>
<li>Good audio doesn’t have to be loud to be heard correctly. Well balanced audio shouldn’t need to have your headphones maxed out at 100% to listen to the beautiful noises you’ve spent so much time making.</li>
</ul>
<h2 id="tools" class="h2-anchor-wrapper">
  <a href="#tools" class="h2-anchor" aria-label="Copy link to section">#</a>Tools
</h2><p>Some of these tools are DAWs (Digital Audio Workstations). Think, Game Engine for creating music/sound. Many of them are so advanced now you can get by without outside equipment. VSTs (Virtual Studio Technology, think, synths/instruments) as generally plugins for helping create sounds. If you’re interested in working in DAWs I strongly recommend starting small. You don’t need to go and buy a midi keyboard (piano kind) to start making music. You can get by making some pretty good stuff with just your computer keyboard, mouse, and decent headphones. Remember, a bad carpenter with a $5000 tool is still bad. Grow out of your tools first.</p>
<p><a href="https://github.com/rxi/aq/">rxi/aq, audio framework in C</a> - Audio framework that has many of the concepts discussed!</p>
<p><a href="https://rxi.itch.io/sfxia">sfxia</a> (windows, linux) - Generate sounds/sound effects</p>
<p><a href="http://www.drpetter.se/project_sfxr.html">sfrx</a> - The OG sound generator for game jams</p>
<p><a href="https://www.ableton.com/en/live/what-is-live/">ableton live</a> - This is my preferred DAW, it’s not open source but it works damn well</p>
<p><a href="https://www.image-line.com/fl-studio/">fl studio</a> - Also known as fruity loops, this also a super capable DAW with tons of documentation/videos on using it</p>
<p><a href="https://www.reaper.fm/">reaper</a> - a cross platform tracker style DAW (linux, mac, windows). Seems very capable, and I&rsquo;ll be trying it more on linunx!</p>
<p><a href="https://freesound.org/">freesound</a> - This is a giant repository of open source / creative commons sounds, I highly recommend contributing and using it!</p>
<p><a href="https://fmod.com/">fmod</a> - If at the end of the day, you just want a tool that will solve most of your problems for integrating / implementing good sounding audio, there are many worse choices than FMod.</p>
<p>and most importantly, patience. Patience will be your greatest tool when working with this kind of tech.</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>an argument for old hardware</title>
      <link>https://tek256.com/posts/an-argument-for-old-hardware/</link>
      <pubDate>Sun, 15 Nov 2020 23:18:01 -0800</pubDate>
      <guid>https://tek256.com/posts/an-argument-for-old-hardware/</guid>
      <description>maybe you shouldn&#39;t upgrade</description>
      <content:encoded><![CDATA[<p>Throughout a lot of this writing, you can substitute old for “bad”. I use quotation marks around “bad” because hardware isn’t inherently <em>bad</em> or anything. It simply is often times slower relative to <em>newer</em> hardware. Knowing this, I offer this forewarning: In pursuit of acquiring better programming skills, don’t downgrade if avoidable. The idea of spending money to get older hardware I feel is a situational circumstance most often rewarded by specific projects, not everyday ones. The specific stance I take on hardware <em>consumerism</em> is one that you should <strong>try</strong> to use your hardware until it is simply unusable. With that being said, I’ll try to expand on the ideas a bit further.</p>
<p>Many times I find myself gawking at new hardware releases, with awe and wonder around the new “efficiencies” they offer. It’s as such that at any time of year I can probably quote a relatively accurate number of the average percentage improvement over the previous generation the latest has brought about. This isn’t an all bad thing for me, I lead a life where I work many different specific disciplines in the Information Technology world such that possibly I’ll need to bring about newer hardware for clients. Tho, that reality is diminishing rapidly with cost-effectiveness improving within cloud hosting services. With minor exceptions I find a lot of focus has been put on consistent upgrading of hardware. The interval seems to have shrunk down to around 2 years or roughly 2 cycles of hardware releases. While this isn’t nearly as bad as related technology, like smartphones, it is becoming eerily similar. The improvements each release are often touted as “revolutionary” or “game changing”, yet in real world usage, are often just iterative improvements. I often find myself thinking,”well, it would make <em>this thing</em> faster” or might save me time in that area. Though, the cost to time benefit is almost never as great as the monkey side of my brain makes it out to be.</p>
<p>A lot of this only works up to a certain extent, right? There’s always exceptions to most things in life, the main point here is more of “if it ain’t broke, don’t replace it” sort of thing. Another thing to consider, especially if you’re still new to programming, is that worse hardware can force you to be more responsible with what you write. I remember the nights spent frustrated with my code because it was “slow”, on my dual core Phenom II 955 with 2GB ram and integrated Radeon HD 4250 Onboard GPU, that took a sizable chunk of that ram as well. Back then I didn’t write in C, or any relatively plain languages either. I was focused on learning Java and using the good ol’ IDE, Eclipse. Neither of these lend themselves to super fast usage, even with somewhat older versions. I’m not claiming to be a great programmer because once upon a time I had bad hardware. Although, I do believe the experience has an inherent value to it for future endeavours.</p>
<p>To sum it all up with a nice little bow tie, think about what hardware you have now, what software you pair it with, and how you can squeeze more juice out of it? I have a few examples of friends running 9 year old CPUs and still keeping pace with development. Future generations might be revolutionary, but for now, can you get by with what you already have, or the cheaper/maybe used version? I know for myself, after having done some <em>very rough and inaccurate</em> tests, I use on average 5-10% of my CPU, and less of my GPU from day to day.</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>the portable developer</title>
      <link>https://tek256.com/posts/the-portable-developer/</link>
      <pubDate>Sun, 20 Sep 2020 04:20:00 -0700</pubDate>
      <guid>https://tek256.com/posts/the-portable-developer/</guid>
      <description>the beauty of system defaults &amp; portability</description>
      <content:encoded><![CDATA[<p>Imagine for a moment if you will, a developer who can work at any desk, with any computer, with any editor. What would that actually look like? How much time would it take for you to master each and every editor, how about operating systems? I&rsquo;ve been thinking about this question a lot the last few days. As I transition into a chapter of my life where portability is becoming more of a factor, I&rsquo;ve been asking these questions. What aspects should I actually nail down before I get hit with potential circumstances of not having my home base?</p>
<p>I think it&rsquo;s fair to say that the idea of being a &ldquo;digital nomad&rdquo; nowadays is easier accomplished given the ever growing black hole that is cloud based platforms. There are all sorts of free things available on the internet for the low low cost of your data and information. I get how it might be displeasing to think about the idea that even free services will profit off of you some way or another. But, I do prefer the inherent reliability of that option to having my laptop stolen and losing everything I&rsquo;m working on. Personally I prefer to self host the bulk of everything and have a background backup task to backblaze.</p>
<p>If there&rsquo;s nothing else you take away from this article, at least take this: offsite backups are your best friend, even if they&rsquo;re an annoying one.</p>
<h2 id="the-code-itself" class="h2-anchor-wrapper">
  <a href="#the-code-itself" class="h2-anchor" aria-label="Copy link to section">#</a>the code itself
</h2><p>Code is an interesting thing when it comes to backups. I&rsquo;m hyper aware of if my code is complete or not, and I generally try to not push incomplete things into a backup or commit. However there is the sad truth that partial code / implemenation completions still are wanted. For this reason I tend to play with multiple git remotes. There&rsquo;s always the public facing remote, which I use as the sort of psuedo-release candidate for commits. Then the backup remote where the code can be stashed without judgement, generally this is a private repository. In terms of hosting I tend to just use a self hosted <a href="https://forgejo.org/">Forgejo</a> instance at the time being, I&rsquo;ve used GitLab and other personal Gitea instances before.</p>
<p>In addition to forgejo, I have a nightly cron job that syncs my forgejo repositories to backblaze. And every once in awhile when I remember to, I&rsquo;ll grab a snapshot and put it on an external hard drive so I have a somewhat recent copy for if the internet goes down.</p>
<h2 id="physical" class="h2-anchor-wrapper">
  <a href="#physical" class="h2-anchor" aria-label="Copy link to section">#</a>physical
</h2><p>Physical security can be a relatively sensitive subject. I generally operate under the assumption that I&rsquo;m not some ultimate badass that&rsquo;s going to defend myself from the vast majority of mankind itself. For this reason I think the alternate of software / hardware aided security sort of steps in. For my laptop, if it&rsquo;s windows it&rsquo;s BitLocker, if it&rsquo;s Linux it&rsquo;s LUKS.</p>
<p>On top of this, a few years ago I invested in a YubiKey and set it up with all of my machines for unlock/decryption usage. If you wanted to take this a step further, having a self destruct or &ldquo;kill switch&rdquo; would be a good idea.</p>
<h2 id="software" class="h2-anchor-wrapper">
  <a href="#software" class="h2-anchor" aria-label="Copy link to section">#</a>software
</h2><p>I remember very clearly when I had discovered <em>portable</em> software. I was in the 7th grade and playing around with running things that weren&rsquo;t allowed, on my Middle School&rsquo;s computers. I&rsquo;m sorry to my technology teacher, but it was me, that got that one program running that you hated. It wasn&rsquo;t anything malicious, I hadn&rsquo;t discovered malware/virus creation yet. But this transitions nicely into the idea of having a portable OS on a flash drive. It&rsquo;s by far not the most <em>elegant</em> of solutions, but having a portable distro on a flash drive with your persistent memory is perhaps one of the more reliable alternatives to downloading software you <em>absolutely need</em> every time. It comes with the caveat of being able to make the computer boot from USB, if a machine is properly secured, you shouldn&rsquo;t be able to get into the BIOS.</p>
<h2 id="conclusion" class="h2-anchor-wrapper">
  <a href="#conclusion" class="h2-anchor" aria-label="Copy link to section">#</a>conclusion
</h2><p>This is just a write up of what I&rsquo;ve been thinking about the last few weeks. It&rsquo;s a contingency plan that has sort of spinning the background these last few months. If you have any ideas / questions, definitely let me know!</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>code hardening</title>
      <link>https://tek256.com/posts/code-hardening/</link>
      <pubDate>Sat, 20 Jun 2020 22:40:35 -0700</pubDate>
      <guid>https://tek256.com/posts/code-hardening/</guid>
      <description>code harding utilities &amp; configurations</description>
      <content:encoded><![CDATA[<p>Hey! Since the 0.01 Release of <a href="https://codeberg.org/tek256/astera/">Astera</a> I&rsquo;ve been working on making the code more reliable and efficient. I&rsquo;ve fortunately not lost much motivation as to moving towards 0.02 and the added features which that will bring along with it.</p>
<p>A lot of this information exists online, but this post is meant to be a sort of introduction &amp; combination of a few different sources. Just as a preface, this is meant for code hardening with clang &amp; gcc. The two have many of the same features, tho some are not interchangable. As I&rsquo;m making a cross platform game library/framework/thing, I test everything I can on whichever popular compilers I can get my hands on. The windows process for this is something that is tailored to that as well as MSVC&rsquo;s respective flags.</p>
<p>Also please keep in mind that these are all tools I use in my own workflow. As I work primarily in C99 and more towards Linux / Unix environment. Thus they&rsquo;ll tend to reflect that as well. However, most of these concepts / tools have direct analogs to Windows as well.</p>
<h2 id="asan" class="h2-anchor-wrapper">
  <a href="#asan" class="h2-anchor" aria-label="Copy link to section">#</a>ASAN
</h2><p>ASAN is the shorter form of saying, &ldquo;AdressSanitizer&rdquo;. It&rsquo;s an open source tool created by Google that helps detect memory leaks, overflows, and various other memory issues. If you&rsquo;re working on something and it seems like you have a memory bug, you&rsquo;re gonna want this in your toolkit. Keep in mind, when using the tool, it&rsquo;ll increase the memory footprint of the program overall substantially. You&rsquo;ll want to make sure you have plenty of overhead.
valgrind &ndash;tool=toolname program
<strong>Installation</strong></p>
<p>Depending on your operating system, you might have to install <code>AddressSanitizer</code> or <code>asan</code> of some sort. Since I&rsquo;m on <a href="https://voidlinux.org/">Void Linux</a> I had to install <code>libsanitizer</code> (and the -devel package, just to be safe) in order for it to work with GCC correctly. Clang seems to sometimes bundle it on it&rsquo;s own as well, if it doesn&rsquo;t appear to work for you try making sure you have <code>llvm</code> installed. On Arch it seemed to not install the library for me. Otherwise without the package it&rsquo;ll appear to give incomplete or ambiguous output!</p>
<p>Other than that, you&rsquo;re pretty much good to go. Any updated / modern (ish) compiler should have support for asan.</p>
<p><strong>Usage</strong></p>
<p>Configuration for this tool is surprisingly simple for what it provides. For my specific configuration I added these compilation options (flags):</p>
<figure class="code-block" data-lang="bash">
	<figcaption class="code-header">
		<span class="code-title">compiler flags</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="LWZzYW5pdGl6ZT1hZGRyZXNzIC1mbm8tb21pdC1mcmFtZS1wb2ludGVyIC1PMiAtZw=="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">-fsanitize<span class="o">=</span>address -fno-omit-frame-pointer -O2 -g</span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<p>If you&rsquo;re using cmake, you&rsquo;ll want to make sure you add <code>-fsanitize=address</code> to your link options as well.</p>
<p>in CMake this looks a little like the following:</p>
<figure class="code-block" data-lang="cmake">
	<figcaption class="code-header">
		<span class="code-title">CMakeLists.txt</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dGFyZ2V0X2NvbXBpbGVfb3B0aW9ucygke1BST0pFQ1RfTkFNRX0KICBQVUJMSUMKICAtZnNhbml0aXplPWFkZHJlc3MgLWZuby1vbWl0LWZyYW1lLXBvaW50ZXIgLU8yIC1nKQp0YXJnZXRfbGlua19vcHRpb25zKCR7UFJPSkVDVF9OQU1FfQogIFBVQkxJQwogIC1mc2FuaXRpemU9YWRkcmVzcyk="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-cmake" data-lang="cmake"><span class="line"><span class="cl"><span class="nb">target_compile_options</span><span class="p">(</span><span class="o">${</span><span class="nv">PROJECT_NAME</span><span class="o">}</span>
</span></span><span class="line"><span class="cl">  <span class="s">PUBLIC</span>
</span></span><span class="line"><span class="cl">  <span class="s">-fsanitize=address</span> <span class="s">-fno-omit-frame-pointer</span> <span class="s">-O2</span> <span class="s">-g</span><span class="p">)</span><span class="err">
</span></span></span><span class="line"><span class="cl"><span class="nb">target_link_options</span><span class="p">(</span><span class="o">${</span><span class="nv">PROJECT_NAME</span><span class="o">}</span>
</span></span><span class="line"><span class="cl">  <span class="s">PUBLIC</span>
</span></span><span class="line"><span class="cl">  <span class="s">-fsanitize=address</span><span class="p">)</span></span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<p>Now let&rsquo;s break down each of the flags, a good reference for these is GCC&rsquo;s page on <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html">Instrumentation Options</a>.</p>
<p>From the documentation you can see that <code>-fsanitize=address</code> is what&rsquo;s enabling the memory error detector, it&rsquo;s the primary flag of the list. On top of this, <code>-fno-omit-frame-pointer</code> ensures that the stack frame pointer isn&rsquo;t omitted for functions that require it. <code>-O2</code> enables all optimizations, which is ultimately what you want to debug memory leaks with since they&rsquo;ll start appearing with more optimizations and less leniant standards of compilation / language usage.</p>
<p>Side tip: If you really want to have fun and harden <em>functionality</em> of the code, enable <code>-fsanitize=undefined</code>. This enables the <code>UndefinedBehaviorSanitizer</code> which, really, really goes into detail about precision of your program. You can find more info on different sanitizers at the link for Instrumentation Options.</p>
<h2 id="valgrind" class="h2-anchor-wrapper">
  <a href="#valgrind" class="h2-anchor" aria-label="Copy link to section">#</a>Valgrind
</h2><p>Checking for memory leaks is often one half of the equation that is memory optimization. Profiling it can prove to be a mysterious and somewhat magical thing for programmers that haven&rsquo;t used tools for it before. You might have heard of Valgrind before, it&rsquo;s a relatively popular tool. If you haven&rsquo;t used it before it&rsquo;s relatively straighforward to use.</p>
<p><strong>Installation</strong></p>
<p>Many operating systems don&rsquo;t come with it installed, so definitely make sure you have it installed.</p>
<p>apt installation would be something like:</p>
<figure class="code-block" data-lang="shell">
	<figcaption class="code-header">
		<span class="code-title">package manager installs</span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="IyBkZWJpYW4gLyB1YnVudHUgLyBhcHQKc3VkbyBhcHQgaW5zdGFsbCB2YWxncmluZAoKIyBhcmNoCnN1ZG8gcGFjbWFuIC1TIHZhbGdyaW5kCgojIHZvaWQgbGludXgKc3VkbyB4YnBzLWluc3RhbGwgdmFsZ3JpbmQ="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># debian / ubuntu / apt</span>
</span></span><span class="line"><span class="cl">sudo apt install valgrind
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># arch</span>
</span></span><span class="line"><span class="cl">sudo pacman -S valgrind
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># void linux</span>
</span></span><span class="line"><span class="cl">sudo xbps-install valgrind</span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<p><strong>Usage</strong></p>
<p>The general usage is pretty easy to grasp, it&rsquo;s usually as follows:</p>
<figure class="code-block" data-lang="shell">
	<figcaption class="code-header">
		<span class="code-title"><span class="code-lang">shell</span></span>
		<button class="code-copy" type="button" aria-label="Copy code to clipboard">copy</button>
	</figcaption>
	<div class="code-body" data-code="dmFsZ3JpbmQgLS10b29sPXRvb2xuYW1lIHByb2dyYW0="><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">valgrind --tool<span class="o">=</span>toolname program</span></span></code></pre></td></tr></table>
</div>
</div></div>
</figure>
<p>There are a few different tools valgrind has, such as <code>memcheck</code> (for memory profiling), <code>massif</code> (heap profiler), or <code>cachegrind</code> (cache &amp; branch prediction profiler).</p>
<p>For more in depth on how to use these tools, check out the valgrind <a href="https://valgrind.org/docs/manual/index.html">manual</a>.</p>
<h2 id="other-useful-flags" class="h2-anchor-wrapper">
  <a href="#other-useful-flags" class="h2-anchor" aria-label="Copy link to section">#</a>Other useful flags
</h2><p>Many of these flags are gathered from Red Hat&rsquo;s page on <a href="https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/">Recommended compiler and linker flags for GCC</a>. I&rsquo;ll just go over a few of them which you might really benefit from.</p>
<p><code>-D_FORTIFY_SOURCE=2</code> - Fortify Source enables some lightweight checks to be used on various string &amp; memory manipulation functions. Some of these checks are run at compile time which will manifest as compiler warnings, others are runtime. The 2 Option just means to use more / most checks.</p>
<p><code>-Wall -pedantic -Wextra</code> - This is maybe the most insanity condusive of them all. I try to only do this to myself once or twice a week at most. It enables all recommended compiler warnings (<code>-Wall</code>)</p>
<p><code>-fplugin=annobin</code> - annobin is meant to be a binary tool which helps generate data about the binary, how it was made, what was used to make it, stuff like that. Red Hat has a <a href="https://developers.redhat.com/blog/2018/02/20/annobin-storing-information-binaries/">good post</a> that goes into detail on the usage of it.</p>
<p><code>-fstack-protector-all</code> / <code>-fstack-protector</code> - This causes more code to be emitted to check for buffer overflows. It does some fun stuff with adding guard variables and more checks, if one of the checks fails, it&rsquo;ll print an error and exit the program.</p>
<p><code>-O2</code> - I referenced this earlier, but it enables the compiler&rsquo;s recommended optimizations. Definitely make sure you have this enabled for anything you&rsquo;re trying to ship.</p>
<p><code>-g</code> - I&rsquo;m pretty sure a lot, if not most, of us have heard / used this flag before. It causes the compiler to generate debugging information. Inverse to the O2 flag, maybe don&rsquo;t have this enabled when you&rsquo;re compiling something to ship!</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>handmade seattle 2019</title>
      <link>https://tek256.com/posts/handmade-seattle-2019/</link>
      <pubDate>Sat, 01 Feb 2020 14:46:50 +0000</pubDate>
      <guid>https://tek256.com/posts/handmade-seattle-2019/</guid>
      <description>video on handmade seattle 2019</description>
      <content:encoded><![CDATA[<p>So this might be a little bit late, but here it is anyway. I finished editing most of the videos from Handmade Seattle 2019.</p>
<center><iframe width="560" height="315" src="https://www.youtube.com/embed/-pXfz_wDP0k" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></center>
<p>There’s a whole playlist, but I won’t really bother putting it in here. I feel it’s probably pretty visible in the video description &amp; ending.</p>
<p>Either way, let me know what you think about the editing! It’s been a few years since I’ve edited down a video of this size, usually I just make shorter meme videos. I’ve been playing around with the <em>psuedo documentary</em> style for the last few months recording events / trips I go on. So maybe expect more of that style in the near future.</p>
<p>Anyways, I’m off to rob a wombat of his rhombus somewhere in the ether and write more code. This video thing isn’t terribly productive for game development.</p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>my bucket list</title>
      <link>https://tek256.com/posts/my-bucket-list/</link>
      <pubDate>Wed, 04 Dec 2019 09:33:19 +0000</pubDate>
      <guid>https://tek256.com/posts/my-bucket-list/</guid>
      <description>stuff I want to do before I die</description>
      <content:encoded><![CDATA[<p>One day I’m going to die. This is a universal truth for each and every one of us. The last few weeks before writing this have been rough for me. That’s why I’m writing this, as a message to my future self to recognize where I was and where I’ve gotten to. I encourage everyone to write a bucket list of their own.</p>
<ul>
<li><s>Make peace with my depression</s></li>
<li>Build my own house</li>
<li><s>Fall in love</s></li>
<li><s>Make a game completely on my own</s></li>
<li>Host a game jam</li>
<li>Make games full time</li>
<li>Build an affordable open source game console</li>
<li><s>Take up drawing (again)</s></li>
<li>Release my game written in my game engine</li>
<li>Create a full experience game release</li>
<li>Start an independent game studio</li>
<li>Paint a mural</li>
<li>Travel to Scotland</li>
<li>Live in another country for more than 3 months</li>
<li><s>Trace my ancestry</s></li>
<li>Write a book</li>
<li>Go sky diving</li>
<li><s>Read 100 books</s></li>
<li><s>Roadtrip across the US</s></li>
<li><s>Take up boxing</s></li>
<li><s>Help someone else achieve a dream</s></li>
<li><s>Mentor someone</s></li>
</ul>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>pi zero: game console</title>
      <link>https://tek256.com/posts/raspberry-pi-zero-as-a-game-console/</link>
      <pubDate>Fri, 08 Nov 2019 09:38:47 +0000</pubDate>
      <guid>https://tek256.com/posts/raspberry-pi-zero-as-a-game-console/</guid>
      <description>making a console out of a pi zero</description>
      <content:encoded><![CDATA[<p><picture>
        <source srcset="/images/pi_zero_quarter_hu_aa2497ada0bae50f.webp" type="image/webp">
        <img src="/images/pi_zero_quarter.jpg" alt="Pi Zero Quarter" title="Pi Zero next to a quarter">
      </picture></p>
<p><em>The above picture is the Raspberry Pi Zero W (Same size as the non-wireless) next to a standard US Quarter.</em></p>
<p><em>The following has been a side project of mine for a few months now. Mostly sitting idle while I do research on breaks.</em></p>
<p>Often times when people are told that someone is making a raspberry pi game console they think one of two things: Someone is building an emulation / retropie machine, or they don’t know what they’re talking about. While I like to think that I might have some idea of what I’m talking about, the latter might be true here as well.</p>
<p>For the last little bit I’ve been poking around the internet looking at different options of raspberry pi operating systems. The idea was to have something suitable to simply host a game binary on for play with little-no overhead. My Google-Foo might not be once it once was, but I couldn’t find anything that was easily accessible for the Raspberry Pi Zero. It seems that this little brother has been left in the dark by most people thinking of using it for anything but automation.</p>
<p>If you actually look at the specs of the machine they’re halfway decent as well. Especially considering the non-wireless option is $5. That’s less than the SD Card I use for terrible storage speeds. If you’re unfamiliar with the exact specifications of the Pi Zero, here they are:</p>
<ul>
<li>Single Core 1GHz Broadcom BCM2835 (ARM11 Core using ARMv6 Arch)</li>
<li>VideoCore 4 GPU (<a href="https://docs.broadcom.com/doc/12358545">Reference, Page 12 has all the good stuff</a>) 250MHz, OpenGL-ES 1.x &amp; 2.0 Support</li>
<li>512MB LPDDR2 SDRAM</li>
<li>USB On-The-Go Port (Breakout for Standard USB Female Header needed)</li>
<li>Mini HDMI (You’re usually going to need an adapter for this)</li>
<li>40 Pin GPIO Identical to RPi A+/B+/2B</li>
<li>CSI Camera Header</li>
<li>Single Green LED</li>
</ul>
<p>The whole system generally runs on the USB Supported 5v. Under load, the Pi Zero and W pull on average less than 1 Watt. Keep in mind this is a little computer that can push 1080p. I’ll be targeting 720p at either 30 or 60 Hz though.</p>
<p>Ok, this is all nice, but what’s the ultimate goal you might ask? To be clear, my goal isn’t to sell you anything. I’m making a bare minimum operating system &amp; tools to bake games into a distro for play on the Pi Zero and Zero W. There isn’t a traditional Desktop Environment or internet browser, literally just what you need to play the game on disk. The goal is that this hardware is cheap enough that it is easily accessible to people.</p>
<p>For all intents and purposes, this project is already closing in on being out of the conceptual phase. I’ve got a decent linux install running with support for OpenGL ES and hardware acceleration. Now it’s just onto making the tooling. The tooling part will take significantly longer than just creating the proof-of-concept. For the start of things I will be releasing a demo game (made using my game engine <a href="https://codeberg.org/tek256/astera/">astera</a>).</p>
<p>I’ll be posting all of the things I have on my <a href="https://codeberg.org/tek256">GitHub</a> in due time. For now I’m not going to release anything until it is at least functional.</p>
<p>I’m intending on keeping this a side project for now, I’ve been tinkering maybe once or twice a week with it while I take a break from Lost Souls development. If you’re interested in the current progress at any point feel free to message me on the <a href="https://tek256.com/discord">discord</a></p>
]]></content:encoded>
    </item>
    
    
    <item>
      <title>beyond the void: a brief history</title>
      <link>https://tek256.com/posts/beyond-the-void-a-brief-history/</link>
      <pubDate>Thu, 20 Oct 2016 18:00:48 +0000</pubDate>
      <guid>https://tek256.com/posts/beyond-the-void-a-brief-history/</guid>
      <description>A brief history of an old project</description>
      <content:encoded><![CDATA[<p><picture>
        <source srcset="/images/btv_hu_8ffa90f180cd3290.webp" type="image/webp">
        <img src="/images/btv.jpg" alt="beyond the void screenshot" title="Beyond the Void Screenshot">
      </picture></p>
<p>Beyond the Void is a dungeon crawler. It has randomly generated dungeons. You can play solo or online. In multiplayer you have 2 main options: You can crawl the dungeon with friends, or control the dungeon to stop them.</p>
<p>I’ve been working on the game in conceptual form for over 3 1/2 years now. There have been numerous iterations of the actual implementation of the game. Leading up to this point, there have been about 4 working prototypes. I live streamed 2 of the iterations, a few might remember.</p>
<h2 id="the-start" class="h2-anchor-wrapper">
  <a href="#the-start" class="h2-anchor" aria-label="Copy link to section">#</a>The Start
</h2><p>It started out as a way for me to pass time. Really something to make that included what I was interested in, Procedural Generation &amp; Doom. Initially it was an FPS, paying homage to the likes of quake in terms of style. I soon realized, I can’t make 3D Models. So, being the John Carmack fanboy I am, I chose to keep it in the same vein and make the style more towards Wolfenstein 3D. Partially because I grew up playing it with my grandpa without my parents really knowing. It was an amazing thrill for a 4 year old me. Still a really large problem remained. I barely knew OpenGL.</p>
<p>A few months passed and I got the first versions of a “game” working. Note, I say “game” because initially it was just a renderer with some distance calculations for interaction. I posted a question on a forum I used to frequent often, Tek Syndicate. Fortunately I was friends with the host of the channel. This lead to the first public appearance of the game:</p>
<center><iframe width="560" height="315" src="https://www.youtube.com/embed/fNvJm4aA82w?start=157" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></center>
<p>The thumbnail is the second ever screenshot I had taken of the implementation. Logan had been gracious enough to promote me. It was just unfortunate that following the few weeks I became ill. I had sort of missed the bus in terms of hype. I sort of fed off of the community hype around the game. Although it was fast fading, I still felt motivation from it for the year to come.</p>
<p>Being the sort of neat freak that I am, I spent the next few months cleaning any code I had made and rewriting what wasn’t “efficient enough”. It was sort of ironic that the game that I had started with the intention of being about my illness, was stifled by it. Nevertheless I droned on. Around December of that year I had a sort of “wholesome mess” as I will call it. To be frank, the game ran like crap. On my AMD FX 8320 it took up 30% CPU usage on idle. Among other things, it had a nice big gaping memory leak which wasn’t noticeable for the first few minutes of play. I wanted to target a reasonable market that could enjoy the game on even a low end computer. Taking up that kind of usage wasn’t particularly good for limited environments. To say the least, I was way in over my head.</p>
<h2 id="relearning" class="h2-anchor-wrapper">
  <a href="#relearning" class="h2-anchor" aria-label="Copy link to section">#</a>Relearning
</h2><img style="float: left; height: 250px;" src="https://i.imgur.com/00LyobL.jpg" alt="OpenGL Superbible"/>
I spent a good 3 – 4 months working completely with OpenGL hammering away at which things should be fastest. I read numerous books like Game Engine Architecture, and OpenGL SuperBible 6th edition. My passion for developing had manifested itself into optimizing myself. By no means was it an efficient time, but I’d say I came out with a little more of an intelligible and comprehensive thought process.
<p>This all gave way to the second revision of Beyond the Void. Boasting a brand new support of proper data structures, the game ran smoother. Dropping the inefficiencies of immediate mode rendering, and adopting the inherent complexities of buffer objects. I had caught up with the times of OpenGL Programming. This is also where I dropped the key points of a story idea. Connecting randomness is a sort of difficult and limiting factor. While its novel, it just added to the workload of making the game.</p>
<h2 id="illness" class="h2-anchor-wrapper">
  <a href="#illness" class="h2-anchor" aria-label="Copy link to section">#</a>Illness
</h2><p>I’m auto immune. I’ve spent my whole life always knowing where the closest hospital is. By the way, military hospitals don’t prove too effective for undiagnosed auto immunes. Unfortunately I was sick again. The usual sort of dying sort of not thing. For the most part I’m pretty good at dealing with being sick. But being stubborn about working on something and being sick don’t mix well. I spent a good 3 months in and out of the hospital. Usually it was that long because it was a particularly serious bout. But it wasn’t, I just didn’t focus on my health. I wasn’t productive, and I wasn’t getting better. So after way too long, I came to the decision I’d have to focus on getting better.</p>
<p>After that I had sort of moved on. I became interested in web technologies for awhile. I worked on a startup and then eventually found myself focusing on school after the summer passed. For the next year I focused mainly on playing League of Legends and improving my general programming. It was around this point that I became good friends with one of my teammates, Sawyer. Without him I would have just given up on the idea and moved on to some random 2D Games, or staying a web developer. It was his moral support that seemingly pushed me back into tackling this game.</p>
<h2 id="mini-engine" class="h2-anchor-wrapper">
  <a href="#mini-engine" class="h2-anchor" aria-label="Copy link to section">#</a>Mini Engine
</h2><img style="float: right;" src="https://i.imgur.com/igBJ3An.png" alt="" />
<img style="float: right;" src="https://i.imgur.com/GHCc8ep.png" alt="" />
<img style="float: right;" src="https://i.imgur.com/X9VTemg.png" alt="" />
<p>Mini Engine was a sort of veil for me to work on more specialized things than just a game. It was initially just an experimental thing to see if I could play around with 3D effectively. It existed as something to do between classes in the college computer lab. Well it ended up being a pseudo version of Beyond the Void. The engine had all the components of a game, just, horribly put together. At the time my struggle was wanting to have as abstract and independent of code as possible as well as everything running as fast as possible. That doesn’t really work out too well given the circumstances. I live streamed some of it and updated the repository fairly regularly compared to past versions. If you want to see the cleaned version of the repository you can check it out here. The main problem of the engine was that there was no collision. At least, good collision. There is something about collision implementations that acts as a roadblock for me. You can only do so much before it, but there are a lot of things that work off of it. To say the least I was frustrated.</p>
<p>Leading up to this point I was preparing some things to show off at a Lan Syndicate. I had gotten most everything done and that included dungeon generation. I was proud of the efficiency of the map data generation. Clocked around 700ms so it wasn’t this big long load screen. Realistically it would take longer since this was a stripped version. I went to the lan with somewhat clouded expectations. I had posted on the Tek Syndicate forum prior, with almost no responses. So I figured I wouldn’t get too much interested in the game. And I didn’t.</p>
<p>The lan was fun, I spent a good bit of it writing code and just walking around and talking to people. I met all of these people I’d known exclusively online in person. I suppose after a few years of no updates they wouldn’t remember the game.</p>
<h2 id="where-beyond-the-void-is-going" class="h2-anchor-wrapper">
  <a href="#where-beyond-the-void-is-going" class="h2-anchor" aria-label="Copy link to section">#</a>Where Beyond the Void is Going
</h2><p>Beyond the Void as it stands is conceptually done. After the demo is out I’ll be opening up pre orders. Note: I’m putting out the demo first so people know what they’re putting their money towards. A few days prior to release I’ll be making a technical post going over some of the features in the game and how I accomplish them. Until then if you have questions, feel free to message me on <a href="https://tek256.com/discord">discord</a>.</p>
<p>Edit (July, 2022): This project is currently dead. It&rsquo;s possible in the distant future I will flesh it out and make it properly. But currently I am working on bigger projects!</p>
]]></content:encoded>
    </item>
    
    
    
    
    
    
  </channel>
</rss>
