<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Articles on speps.fr</title>
		<link>http://speps.fr/tags/articles/</link>
		<description>Recent content in Articles on speps.fr</description>
		<generator>Hugo</generator>
		<language>en-gb</language>
		
		
		
		
			<lastBuildDate>Wed, 08 Jul 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="http://speps.fr/tags/articles/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Water Masking in Sea of Thieves</title>
				<link>http://speps.fr/articles/water-masking-sea-of-thieves/</link>
				<pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate>
				<guid>http://speps.fr/articles/water-masking-sea-of-thieves/</guid>
				<description>&lt;p&gt;While working on the Rendering Team at &lt;a href=&#34;https://www.rare.co.uk&#34;&gt;Rare Ltd&lt;/a&gt; between 2015 and 2019 on &lt;a href=&#34;https://seaofthieves.com&#34;&gt;Sea of Thieves&lt;/a&gt;, I was tasked with finding a solution to carve holes in our infinite water mesh used for the ocean.&lt;/p&gt;&#xA;&lt;p&gt;This was a very interesting task that ended up using some uncommon GPU features in a creative way.&lt;/p&gt;&#xA;&lt;h2 id=&#34;demo&#34;&gt;Demo&lt;/h2&gt;&#xA;&lt;div style=&#34;text-align:center&#34;&gt;&lt;iframe src=&#34;http://speps.fr/masking-demo/&#34; width=&#34;800&#34; height=&#34;600&#34; frameborder=&#34;0&#34;&gt;&lt;/iframe&gt;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Rowboat model: &lt;a href=&#34;https://opengameart.org/content/low-poly-boat&#34;&gt;https://opengameart.org/content/low-poly-boat&lt;/a&gt;, mask mesh made manually in Blender&lt;/p&gt;&#xA;&lt;h2 id=&#34;algorithm&#34;&gt;Algorithm&lt;/h2&gt;&#xA;&lt;p&gt;The goal was to mask out parts of the ocean that were crossing the inside of the boats. This can be achieved using a stencil buffer depending on the viewpoint of the player. However, in Sea of Thieves, the players can climb onboard, and walk around the ship below decks (with multiple decks). Another use case was the addition of caves on islands, if a cave was going under the ocean level we would need to hide parts of the ocean mesh that crosses the cave. Note that this could possibly still be done using a stencil buffer with increment/decrement, but I think I remember trying and it wasn&amp;rsquo;t suited because our water didn&amp;rsquo;t write depth, and would have been quite expensive to re-render into the stencil to try and change the count. All in all, this meant that a more advanced solution was necessary.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Trespasser - C&#43;&#43; archeology and oxidization - Part 1 Loading Scene Data</title>
				<link>http://speps.fr/articles/trespasser-part1/</link>
				<pubDate>Thu, 21 Jan 2021 13:31:42 +0000</pubDate>
				<guid>http://speps.fr/articles/trespasser-part1/</guid>
				<description>&lt;p&gt;This series will be about the video game Jurassic Park Trespasser. My goal is to be able to play the game by rewriting its source code in Rust based on the original C++ code base. Hopefully discovering interesting things along the way.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-this-project&#34;&gt;Why this project?&lt;/h2&gt;&#xA;&lt;p&gt;Not sure why I like this game, I only played it properly once, never finished it but I was amazed by the technical aspects of it. Even with all the technical issues, I&amp;rsquo;m sure all the fans will agree that being chased by a clumsy raptor while trying to wrangle a rifle with one hand is an experience that only this game can give.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Torus Trooper - Rebooting a 15 year-old game written in D - Part 3 WebAssembly</title>
				<link>http://speps.fr/articles/torus-trooper-part3/</link>
				<pubDate>Sun, 26 Jul 2020 21:36:11 +0000</pubDate>
				<guid>http://speps.fr/articles/torus-trooper-part3/</guid>
				<description>&lt;p&gt;See also&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part1&#34;&gt;Part 1 - Compiling a new executable&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part2&#34;&gt;Part 2 - Running the game for the first time&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part3&#34;&gt;Part 3 - Porting to WebAssembly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part4&#34;&gt;Part 4 - Final steps&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;removing-glu-dependency&#34;&gt;Removing GLU dependency&lt;/h2&gt;&#xA;&lt;p&gt;GLU is the OpenGL Utility library from SGI. It&amp;rsquo;s an API with helpful functions that work along with OpenGL. In our project, it&amp;rsquo;s used to create a view matrix using &lt;code&gt;gluLookAt&lt;/code&gt;. So the fix here is just to copy the code for that method from the original SGI code which has a permissive licence, i.e. the SGI licence.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Torus Trooper - Rebooting a 15 year-old game written in D - Part 2 Running</title>
				<link>http://speps.fr/articles/torus-trooper-part2/</link>
				<pubDate>Sun, 19 Jul 2020 22:23:30 +0000</pubDate>
				<guid>http://speps.fr/articles/torus-trooper-part2/</guid>
				<description>&lt;p&gt;See also&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part1&#34;&gt;Part 1 - Compiling a new executable&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part2&#34;&gt;Part 2 - Running the game for the first time&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part3&#34;&gt;Part 3 - Porting to WebAssembly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part4&#34;&gt;Part 4 - Final steps&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;From part 1, I stopped after successfully compiling a new executable, but will it run?&lt;/p&gt;&#xA;&lt;p&gt;Answer is&amp;hellip; NO!&lt;/p&gt;&#xA;&lt;p&gt;Alright, let&amp;rsquo;s dig into it!&lt;/p&gt;&#xA;&lt;h2 id=&#34;d1s-stdfilelistdir&#34;&gt;D1&amp;rsquo;s &lt;code&gt;std.file.listdir&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-plaintext&#34; data-lang=&#34;plaintext&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;core.exception.RangeError@src\abagames\tt\barrage.d(110): Range violation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;----------------&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;0x00448944 in _d_newarrayU&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;0x0041734B in void abagames.tt.barrage.Barrage.addBml(immutable(char)[], immutable(char)[], float, bool, float)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;D1 used to have a function named &lt;code&gt;listdir&lt;/code&gt; in Phobos. It can&amp;rsquo;t be found in &lt;code&gt;undead&lt;/code&gt; unfortunately. However, a quick search later here is what I found in the official docs:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Torus Trooper - Rebooting a 15 year-old game written in D - Part 1 Compiling</title>
				<link>http://speps.fr/articles/torus-trooper-part1/</link>
				<pubDate>Sun, 12 Jul 2020 19:46:57 +0000</pubDate>
				<guid>http://speps.fr/articles/torus-trooper-part1/</guid>
				<description>&lt;p&gt;See also&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part1&#34;&gt;Part 1 - Compiling a new executable&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part2&#34;&gt;Part 2 - Running the game for the first time&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part3&#34;&gt;Part 3 - Porting to WebAssembly&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://speps.fr/articles/torus-trooper-part4&#34;&gt;Part 4 - Final steps&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;While exploring D recently, I remembered a game I played while at university 15 years ago. For a long time, I couldn&amp;rsquo;t remember the name at all, only that it was from a Japanese developer. After some search wrangling, I finally managed to find the name of the game: &lt;strong&gt;Torus Trooper!&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Setup Hugo with Travis CI and GitHub Pages</title>
				<link>http://speps.fr/articles/hugo-setup/</link>
				<pubDate>Sun, 24 Jan 2016 11:26:57 +0000</pubDate>
				<guid>http://speps.fr/articles/hugo-setup/</guid>
				<description>&lt;h2 id=&#34;disclaimer&#34;&gt;Disclaimer&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;This article is now obsolete as TravisCI added severe limitations to their free tier. Use GitHub Actions which is &lt;a href=&#34;https://github.com/speps/speps.github.io/blob/sources/.github/workflows/main.yml&#34;&gt;what I used to replace the workflow&lt;/a&gt; described here. Main difference with the usual tutorials is that I commit the &lt;code&gt;hugo&lt;/code&gt; binary so I know what version is used and the website isn&amp;rsquo;t broken by Hugo updates.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This article aims to introduce and show how to generate your &lt;a href=&#34;http://gohugo.io&#34;&gt;Hugo&lt;/a&gt; site on &lt;a href=&#34;http://travis-ci.org&#34;&gt;Travis CI&lt;/a&gt; and then deploy it automatically to &lt;a href=&#34;https://pages.github.com&#34;&gt;GitHub Pages&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Debugging a DirectX memory leak</title>
				<link>http://speps.fr/articles/directx-refcount/</link>
				<pubDate>Sat, 10 Aug 2013 21:31:30 +0000</pubDate>
				<guid>http://speps.fr/articles/directx-refcount/</guid>
				<description>&lt;p&gt;&lt;strong&gt;NOTE from 2026: this seems quite obvious now, but I never really dug into how the ref count was working before, so it was a revelation at the time. Keeping the article for posterity to remind myself how much I learned since.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;A short tale (with pictures and code) of a recent debugging session.&lt;/p&gt;&#xA;&lt;p&gt;DirectX uses reference counting to handle the destruction of its resources. When creating a resource, the handle returned by DirectX already has a reference counter of 1. When this resource is not needed anymore, you call Release, each call decrements the reference counter by 1. However, the memory allocated by DirectX for this resource will only be released when the reference counter reaches 0.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
