new post about SDL
This commit is contained in:
parent
c0004665de
commit
13d43d5f35
BIN
images/2018-06-06/a.mp4
Normal file
BIN
images/2018-06-06/a.mp4
Normal file
Binary file not shown.
59
posts/SDL2 on MacOS with SDL2_image.html
Normal file
59
posts/SDL2 on MacOS with SDL2_image.html
Normal file
|
@ -0,0 +1,59 @@
|
|||
<video width="426" height="240" controls="true">
|
||||
<source src="../images/2018-06-06/a.mp4">
|
||||
</video>
|
||||
|
||||
<p><time datetime="2018-06-06">2018–06–06</time></p>
|
||||
|
||||
<p><em>Above is a video from Craig Forresters Leilani’s Island. I’m pretty sure it’s made in SDL2 + C/C++. Even if it isn’t… look at that shit, it’s amazing.</em></p>
|
||||
|
||||
<p>Twitter: <a href="https://twitter.com/ishisoft">@ishisoft</a></p>
|
||||
|
||||
<p>YouTube Video: <a href="https://www.youtube.com/watch?v=SbqW2iOcvL4">Gameplay</a></p>
|
||||
|
||||
<h3 id="straythoughts">Stray Thoughts</h3>
|
||||
|
||||
<p>After the tutorial part.</p>
|
||||
|
||||
<h3 id="theactualarticle">The Actual Article</h3>
|
||||
|
||||
<p>SDL2 is the answer for someone reading a coding tutorial for C or C++ and thinking</p>
|
||||
|
||||
<blockquote>
|
||||
<p>“CLI output is cool, but I want to make programs that run inside Windows and have graphics.”</p>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="https://medium.com/@edkins.sarah/set-up-sdl2-on-your-mac-without-xcode-6b0c33b723f7">This beautiful tutorial by Sarah Edkins</a> gives most of the info needed. She skips mentioning what “brew” actually <em>is</em>. (Home)brew is a way to install and keep tabs on command-line programs on OSX. If you don’t have it, you’ll need it, and in either case, you’ll want it.</p>
|
||||
|
||||
<p>Just follow her tutorial.</p>
|
||||
|
||||
<p>Now that that’s done, some other things I had to google and I want to spare you from:</p>
|
||||
|
||||
<ul>
|
||||
<li>You’re gonna need more than <strong>bmp</strong> files in your program, so you’re gonna need <strong>SDL2_image.h</strong>. You install that like you installed SDL2: brew, then copy the files into the same folders as before.</li>
|
||||
</ul>
|
||||
|
||||
<pre><code class="```Bash"> Brew install SDL2_image
|
||||
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>You’ll have to update the make-file to refer to the <code>.h</code> file. After</li>
|
||||
</ul>
|
||||
|
||||
<pre><code class="```Bash"> -l SDL2-2.0.0
|
||||
|
||||
</code></pre>
|
||||
|
||||
<p>add</p>
|
||||
|
||||
<pre><code class="```Bash"> -l SDL2_image
|
||||
|
||||
</code></pre>
|
||||
|
||||
<p>Notice that the hyphen-plus-l is added again. This is vital. Also remember that you can use <code>\ </code> to make new lines.</p>
|
||||
|
||||
<h3 id="aforementionedstraythoughts">Aforementioned stray thoughts</h3>
|
||||
|
||||
<p>With what little sparetime I have, it felt kinda good to sit down for a few hours the other night, just to spend time on a project that didn’t look like it would amount to anything but me feeling good about what I’d done.</p>
|
||||
|
||||
<p>I’d wanted to give SDL2 with plain C another go. Why? The usual reasons of wanting to feel like I’d made something myself, and gain some knowledge of C. After setting everything up, and doing a few parts of LazyFoos tutorials, it occured to me that if I shared this little evening, I could save some people some trouble.</p>
|
Loading…
Reference in New Issue
Block a user