pages tagged SDLBeuc's Bloghttps://blog.beuc.net/tags/SDL/Beuc's Blogikiwiki2020-01-04T23:50:31ZTesting GNU FreeDink in your browserhttps://blog.beuc.net/posts/Testing_GNU_FreeDink_in_your_browser/2020-01-04T23:50:31Z2018-05-25T23:37:39Z
<p>Ever wanted to try this weird GNU FreeDink game, but never had the patience to install it?<br />
Today, you can play it with a <a href="https://play.freedink.org/">single click</a> <img src="https://blog.beuc.net/smileys/smile.png" alt=":)" /></p>
<p><a href="https://play.freedink.org/"><img src="https://blog.beuc.net/posts/Testing_GNU_FreeDink_in_your_browser.png" width="1087" height="694" alt="Play GNU FreeDink" class="img" hspace="10" vspace="10" /></a></p>
<p>This is a first version that can be polished further but it works quite well.<br />
This is the original C/C++/SDL2 code with a few tweaks, cross-compiled to WebAssembly (and an <a href="https://play.freedink.org/asmjs/">alternate version in asm.js</a>) with <a href="http://emscripten.org/">emscripten</a>.<br />
Nothing brand new I know, but things are getting smoother, and WebAssembly is definitely a performance boost.</p>
<p>I like distributed and autonomous tools, so I'm generally not inclined to web-based solutions.<br />
In this case however, this is a <em>local</em> version of the game. There's no server side. Savegames are in your browser local storage. Even importing D-Mods (game add-ons) is performed purely locally in the in-memory virtual FS with a custom .tar.bz2 extractor cross-compiled to WebAssembly.<br />
And you don't have to worry about all these Store policies (and Distros policies<code>^W^W^W</code>.</p>
<p>I'm interested in feedback on how well these works for you in your browsers and devices:</p>
<ul>
<li><a href="https://play.freedink.org/">https://play.freedink.org/</a></li>
<li><a href="https://play.freedink.org/asmjs/">https://play.freedink.org/asmjs/</a></li>
</ul>
<p>I'm also interested in tips on how to place LibreJS tags - this is all <a href="https://www.gnu.org/philosophy/javascript-trap.html">free JavaScript</a>.</p>
Meritous: Free game ported on Androidhttps://blog.beuc.net/posts/Meritous:_Free_game_ported_on_Android/2020-01-04T23:50:31Z2013-01-09T17:41:35Z
<p><a href="http://f-droid.org/repository/browse/?fdid=net.asceai.meritous"><img src="https://blog.beuc.net/posts/Meritous1.jpg" width="512" height="307" alt="Base attack" class="img" hspace="10" vspace="10" align="right" /></a></p>
<p>Meritous is a nice, addictive action-adventure dungeon crawl game. Each new game is unique since the dungeon is built in a semi-random fashion. Last but not least, the engine, graphics and sound effects are GPL'd <img src="https://blog.beuc.net/smileys/smile.png" alt=":)" /></p>
<p>The game is based on SDL 1.2, which has an <a href="https://github.com/pelya/commandergenius">unofficial Android variant</a>, so I decided to try and port it on my cell phone!
The port was surprinsingly smooth and only non-SDL fixes (move big stack allocation to heap) were necessary.
Who said it was difficult to program in C on Android? <img src="https://blog.beuc.net/smileys/smile4.png" alt=";)" /></p>
<p>It was also an opportunity to study the build system for F-Droid, an app market for free software apps, where APKs are rebuilt from source. The spec-like file is <a href="http://gitorious.org/f-droid/fdroiddata/blobs/master/metadata/net.asceai.meritous.txt">here</a>.</p>
<p>The game packaging is also being <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696582">ressurected</a> for Debian but is being distressfully held hostage in the <a href="http://ftp-master.debian.org/new.html">NEW queue</a> for 2 weeks!</p>
<p>You can download the very first (aka beta) Android version:</p>
<ul>
<li>for free at <a href="http://f-droid.org/repository/browse/?fdid=net.asceai.meritous">F-Droid</a></li>
<li>for 0.50€ at <a href="https://play.google.com/store/apps/details?id=net.asceai.meritous">GPlay</a> - because publishing at GPlay costs $25 (+30% of sells..)</li>
</ul>
<p>Comments welcome!</p>