{"@attributes":{"version":"2.0"},"channel":{"title":"Wired Vagrant","link":"https:\/\/wiredvagrant.gitlab.io\/","description":"Recent content on Wired Vagrant","generator":"Hugo -- gohugo.io","language":"en-us","lastBuildDate":"Sun, 29 Nov 2020 12:00:00 +0200","item":[{"title":"Setup Rider for Unity on Linux","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-11-29-setup-rider-for-unity-on-linux\/","pubDate":"Sun, 29 Nov 2020 12:00:00 +0200","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-11-29-setup-rider-for-unity-on-linux\/","description":"<p>Unity comes with its own packaged version of Mono and .NET Core. Unfortunately JetBrains Rider doesn&rsquo;t seem to be able to detect them on Linux and suggests to install Mono by directing you to its official website.<br>\nI only use Mono because of Unity, so I do not really care to have it installed a second time on my machine. I could not find information on how to resolve this online, so here&rsquo;s a short post with a solution!<\/p>\n<p>In Rider go to File &gt; Settings &gt; Build, Execution, Deployment &gt; Toolset and Build<\/p>\n<p>Then you&rsquo;ll find the executables in your Unity (in that case for 2019.4) folder respectively at<br>\nMono: <code>Editor\/Data\/MonoBleedingEdge\/bin\/mono<\/code><br>\n.NET Core CLI: <code>Editor\/Data\/NetCore\/Sdk-2.2.107\/dotnet<\/code><br>\nMSBuild: <code>Editor\/Data\/NetCore\/Sdk-2.2.107\/sdk\/2.2.107\/MSBuild.dll<\/code><\/p>\n<p><figure>\n    <a href=\".\/images\/rider-settings.png\"><img src=\".\/images\/rider-settings.png\" alt=\"\"><\/a>\n    <figcaption>\n        \n    <\/figcaption>\n<\/figure>\n\n<\/p>\n<p>NB: <em>Your .NET Core version may vary depending on your Unity version<\/em>.<\/p>"},{"title":"First GNOME extension published!","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-07-02-first-gnome-extension-published\/","pubDate":"Thu, 02 Jul 2020 20:00:00 +0200","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-07-02-first-gnome-extension-published\/","description":"<p>This follows up on the issue I mentioned previously here: \/posts\/2020-05-18-linux-weak-wifi-signal\/<\/p>\n<p>Bash scripts are great, but not very user friendly. I needed a way to quickly check and control the Power Management option of my Wi-Fi card and it seems an excellent practice for my first GNOME extension, after a couple minor contributions to <a href=\"https:\/\/github.com\/pop-os\/shell\">Pop!_OS Shell<\/a>.<\/p>\n<p>The end results can be found here: <a href=\"https:\/\/extensions.gnome.org\/extension\/3258\/wi-fi-power-management-toggle\/\">https:\/\/extensions.gnome.org\/extension\/3258\/wi-fi-power-management-toggle\/<\/a><\/p>\n<p>Developing it was a trying process. There&rsquo;s a bit of basic documentation to setup your extension, but that&rsquo;s about it. I mostly managed to learn what I needed by just reading <a href=\"https:\/\/gitlab.gnome.org\/GNOME\/gnome-shell\/-\/tree\/master\/js\/ui\">gnome-shell<\/a> source code.<\/p>\n<p>I improved a bit the makefile from Pop!_OS gnome extensions to make it completely standalone and with a way to have the extension removed when I stop debugging by interrupting the task with Ctrl+C, you can take a look <a href=\"https:\/\/gitlab.com\/rthery\/gnome-shell-extension-wifi-power-management-toggle\/-\/blob\/master\/Makefile\">here<\/a>.<\/p>\n<p>Another thing that took some researching was to actually toggle the power management option on the wireless card. Initially I knew only about <code>iwconfig<\/code>, which had a few problems. It doesn&rsquo;t persist after a reboot or waking up from suspend and it requires <code>sudo<\/code>. After having the extension modify some config file and installing a polkit file, both issues were solved, but I wasn&rsquo;t completely satisfied with this.\nThen I stumbled on another command line tool I could use, <code>nmcli<\/code> (<a href=\"https:\/\/developer.gnome.org\/NetworkManager\/stable\/nmcli.html\">https:\/\/developer.gnome.org\/NetworkManager\/stable\/nmcli.html<\/a>) And it could do everything I needed, without admin privileges, permanent after reboot and not global to the card but managed per network. It was PERFECT!<\/p>\n<p>I&rsquo;ll probably try to improve this extension a bit, however I don&rsquo;t see drastic changes coming. Probably just learning how to integrate translations. I&rsquo;ll maybe also rename it to Power Save, which will be clearer for people who do not know about this feature, I initially name it that way based on how it&rsquo;s called in <code>iwconfig<\/code>. And add a small config window, with explanation on what it does.<\/p>"},{"title":"Weak Wi-Fi signal on Linux ? Need more power!","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-05-18-linux-weak-wifi-signal\/","pubDate":"Mon, 18 May 2020 19:30:00 +0200","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-05-18-linux-weak-wifi-signal\/","description":"<p>With mandatory remote work because of the current crisis, I tried to find a quiet room to work from with my laptop. The Wi-Fi signal isn&rsquo;t great, but it&rsquo;s enough to browse the web and work with git.<\/p>\n<p>When my work day was over, I quickly boot back to Pop!_OS and discovered with horror that I could not connect to my wireless network from there. I could see it, but somehow the signal was so weak, it would just not connect at all&hellip; Although I had no problem under Windows 10!<\/p>\n<p>Turns out that in Ubuntu (and by extension Pop!_OS), the power management mode of the wireless card is enabled by default and is really aggressive (although I was not on battery or had any kind of power saving mode enabled).<\/p>\n<p>You can check this by entering <code>iwconfig<\/code> in your Terminal and looking for that last line:<\/p>\n<pre><code>wlo1      IEEE 802.11  ESSID:off\/any  \n          Mode:Managed  Access Point: Not-Associated   Tx-Power=22 dBm   \n          Retry short limit:7   RTS thr:off   Fragment thr:off\n          Power Management:on\n<\/code><\/pre><p>Then to disable it enter <code>sudo iwconfig wlo1 power off<\/code> (where <code>wlo1<\/code> is the actual device id). Note that it will only be effective until you shutdown, reboot or enter sleep mode.<\/p>\n<p>It&rsquo;s a pity that such a critical option is not surfaced in Gnome Settings for wireless connections! I also think it would make sense to integrate it with <a href=\"https:\/\/github.com\/pop-os\/gnome-shell-extension-system76-power\">System76 Power<\/a> gnome extension. I would expect this to be enabled only by default when in Battery Life mode.<br>\n<a href=\"https:\/\/linrunner.de\/tlp\/faq\/radio.html\">TLP<\/a> seems to also be able to manage that for you, so worth having a look at it!<\/p>"},{"title":"Back to writing","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-05-05-back-to-writing\/","pubDate":"Tue, 05 May 2020 11:15:00 +0200","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2020-05-05-back-to-writing\/","description":"<p>Many years have past since the last time I wrote a blog post, but recently the pressure to get back to it has been stronger. I&rsquo;ve decided to indulge it and hopefully this will also help me in organizing my thoughts and focus my time on personal projects.\nThis blog will continue to be about dev and tech, although probably less about game dev and more about open source applications.<\/p>\n<p>For several months I&rsquo;ve been using Linux as my primary OS, I aimed to do it for a long time, but as a gamer, it was always hard to stick to it. Fortunately a lot of people have done great things to improve gaming on Linux recently (particularly Valve with <a href=\"https:\/\/github.com\/ValveSoftware\/Proton\">Proton<\/a>), it now reached a point where I can play almost all my favorite games as well as developed with Unity.<\/p>\n<p>Linux really inspires me, its existence is a testimony of what Humanity is capable of when not driven by greed, but by a bigger and fairer picture. I hope to write more about it here, and maybe inspire at least another person? Who knows.<\/p>"},{"title":"One Button to Build Them All","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2019-02-20-one-button-to-build-them-all\/","pubDate":"Wed, 20 Feb 2019 21:13:58 +0200","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2019-02-20-one-button-to-build-them-all\/","description":"<p>When we worked on <a href=\"https:\/\/theguntlemen.itch.io\/frigul\">FRIG\u016eL<\/a> during the Global Game Jam 2019, I didn&rsquo;t really have the time to look into our build system. I just had 5 minutes before the deadline and went for a quick Windows release build and be done with it.<\/p>\n<p>But it was important to us that the game could be played on as many platforms as possible, considering that being a gamepad only game would make it niche enough.<\/p>\n<h1 id=\"found-the-precious\">Found the Precious<\/h1>\n<p>So when working on the next updates after the jam, I went for a classic Windows, macOS and Linux builds, as well as WebGL so you can play directly from the store page. But switching between four platforms in Unity is cumbersome, especially with WebGL build time! Professionally, I&rsquo;m used to have Jenkins do that work for me, but I wanted something simpler considering the scope of FRIG\u016eL.<\/p>\n<p>So I did what I usually always do, go on GitHub and look for an open source solution to my problem. And lo and behold, I found it in <a href=\"https:\/\/github.com\/Chaser324\/unity-build\">SuperUnityBuild<\/a>! A powerful tool with a lot of customization by Chase Pettit. Which is also  simple to work with if you need to modify it, as the code source is actually very easy to read.<\/p>\n<p>Took only a few minutes to set it up to build for our 4 supported platforms. There&rsquo;s even a system of pre\/post actions to run, and a library of actions available <a href=\"https:\/\/github.com\/Chaser324\/unity-build-actions\">here<\/a>, one of them is to actually upload your builds to itch.io. Set that up as well and eventually got the whole process run on the press of one button! That feels good :)<\/p>\n<h1 id=\"reforge-it\">Reforge it<\/h1>\n<p>Although I admit that I had to modify the library a little, but hey that&rsquo;s what open source is for!<\/p>\n<p>First problem I encountered was the build size, it was enormous compared to my previous builds. Turned out that there&rsquo;s no compression method to select in SuperUnityBuild UI, so the data of the game was taking too much space (almost double the size). I forked the project and fixed that, I added in the UI an advanced option allowing you to select all the Unity BuildOptions you want, including the compression method.\n<figure>\n    <a href=\".\/images\/TgeHAB.png\"><img src=\".\/images\/TgeHAB.png\" alt=\"\"><\/a>\n    <figcaption>\n        \n    <\/figcaption>\n<\/figure>\n\n<\/p>\n<p>Another issue I had was that WebGL upload to itch.io wasn&rsquo;t supported, and the way the channel name was generated didn&rsquo;t fit the format I picked initially. Forked the actions project as well, and added these too.\nShare it with the Community<\/p>\n<p>I&rsquo;ve created pull requests to merge these changes back upstream, but if you are interested, you can find my forks here:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/rthery\/unity-build\">https:\/\/github.com\/rthery\/unity-build<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rthery\/unity-build-actions\">https:\/\/github.com\/rthery\/unity-build-actions<\/a><\/li>\n<\/ul>\n<p>Hopefully this will also save you some time on your projects :)<\/p>\n<p>Next step is setting up a GitLab runner and a Unity Docker image, so that the build is done automatically when I push new release tag to the git repository.<\/p>"},{"title":"Automating build version for mobile projects in Flashdevelop","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2013-04-26-automating-build-version-for-mobile-projects-in-flashdevelop\/","pubDate":"Fri, 26 Apr 2013 17:17:00 +0800","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2013-04-26-automating-build-version-for-mobile-projects-in-flashdevelop\/","description":"<p>Developing my first game for iOS, I quickly had to come up with a way to handle the version of my builds and if possible to do that entirely automatically from when I press build to renaming the compiled .ipa file.<\/p>\n<p>I first got the plugin <a href=\"http:\/\/flashdevelop.org\/community\/viewtopic.php?f=4&amp;t=6150\">Version Number<\/a> for Flashdevelop, which will increment the version of your application when you Build and\/or Test your project. It creates an AS class, so you can easily refer to the version in your code, but will also update your application.xml file automatically, which very handy giving the issue updating iOS application with a similar version number.<\/p>\n<p>Now that\u2019s great, but I wanted to have my Ad-Hoc IPA files (and only them) to include their version number, so here comes a bit of batch file editing\u2026<\/p>\n<p>Let\u2019s start by finding the current version number from application.xml. We can do that in bat\\SetupApplication.bat, find the Output Packages variables and on the line after DIST_NAME, add this:\n<div class=\"highlight\"><pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bat\" data-lang=\"bat\"><span style=\"color:#66d9ef\">FOR<\/span> <span style=\"color:#66d9ef\">\/f<\/span> <span style=\"color:#e6db74\">&#34;tokens=3 delims=&gt;&lt;  &#34;<\/span> <span style=\"color:#ae81ff\">%%<\/span>a <span style=\"color:#66d9ef\">IN<\/span> (<span style=\"color:#e6db74\">&#39;TYPE application.xml ^| FIND &#34;&lt;versionNumber&gt;&#34;&#39;<\/span>) <span style=\"color:#66d9ef\">DO<\/span> <span style=\"color:#66d9ef\">set<\/span> DIST_VERSION=<span style=\"color:#ae81ff\">%%<\/span>a<\/code><\/pre><\/div><\/p>\n<p>We just tell him to retrieve what\u2019s inside the versionNumber tag of the application.xml file (if you have moved it from its default location, make sure to update code with its appropriate path then) and store it in the variable DIST_VERSION.<\/p>\n<p>Now, we can update the batch file handling file output name, which is found in bat\\Packager.bat, look for the following line:\n<div class=\"highlight\"><pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bat\" data-lang=\"bat\"><span style=\"color:#66d9ef\">set<\/span> OUTPUT=%DIST_PATH%\\%DIST_NAME%%TARGET%.%DIST_EXT%<\/code><\/pre><\/div><\/p>\n<p>You can replace it with:\n<div class=\"highlight\"><pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bat\" data-lang=\"bat\"><span style=\"color:#66d9ef\">if<\/span> %TARGET% <span style=\"color:#f92672\">==<\/span> -ad-hoc <span style=\"color:#66d9ef\">set<\/span> OUTPUT=%DIST_PATH%\\%DIST_NAME%%TARGET%-%DIST_VERSION%.%DIST_EXT%\n<span style=\"color:#66d9ef\">if<\/span> <span style=\"color:#66d9ef\">not<\/span> %TARGET% <span style=\"color:#f92672\">==<\/span> -ad-hoc <span style=\"color:#66d9ef\">set<\/span> OUTPUT=%DIST_PATH%\\%DIST_NAME%%TARGET%.%DIST_EXT%<\/code><\/pre><\/div><\/p>\n<p>Where we ask it to add the version number we stored in DIST_VERSION when the output file is building compiled for Ad-Hoc.<\/p>\n<p>And that\u2019s it, if you are OCD with your application version numbers as I am, you will feel hugely relieved!<\/p>"},{"title":"Polygonal map generation and pathfinding","link":"https:\/\/wiredvagrant.gitlab.io\/posts\/2011-10-11-polygonal-map-generation-and-pathfinding\/","pubDate":"Tue, 11 Oct 2011 23:46:00 +0800","guid":"https:\/\/wiredvagrant.gitlab.io\/posts\/2011-10-11-polygonal-map-generation-and-pathfinding\/","description":"<p>I put my nose a while ago in the very interesting <a href=\"http:\/\/www-cs-students.stanford.edu\/~amitp\/game-programming\/polygon-map-generation\/\">world map generation via Voronoi polygons<\/a> by Amit and quickly dreamed to implement such a system for map generation in games.<\/p>\n<p>Around the same time I was also messing around with an <a href=\"https:\/\/www.dauntless.be\/astar\/\">A* library for AS3<\/a> by Dauntless. So I decided to combine both!<\/p>\n<p>The main challenge was to create actual Sprites to contain each territory, as originally the whole map is just contained in one unique Sprite. Once I had the territories, it was then easy to interact with them and implement a pathfinding solution. If I end up cleaning my code, I\u2019ll try to post it on GitHub\u2026 but right now you can already generate maps and play with the pathfinding:<\/p>\n<p><a href=\"http:\/\/sarok.free.fr\/wiredvagrant\/as3voronoi\/\"><figure>\n    <a href=\".\/images\/as3voronoi.png\"><img src=\".\/images\/as3voronoi.png\" alt=\"Click to try!\"><\/a>\n    <figcaption>\n        \n        <p>Click to try!<\/p>\n        \n    <\/figcaption>\n<\/figure>\n\n<\/a><\/p>\n<p><em>PS: It\u2019s been a while since I posted, for various reasons\u2026 Too many good games to play like Space Marine\/Shogun 2, got married and I also got a new job allowing me to do what I love, coding video games<\/em> \ud83d\ude09<\/p>"}]}}