{"id":67,"date":"2025-04-08T12:20:25","date_gmt":"2025-04-08T12:20:25","guid":{"rendered":"https:\/\/thatuglydude.com\/?p=67"},"modified":"2025-04-08T12:20:25","modified_gmt":"2025-04-08T12:20:25","slug":"gamedev-on-windows-and-godot","status":"publish","type":"post","link":"https:\/\/thatuglydude.com\/index.php\/2025\/04\/08\/gamedev-on-windows-and-godot\/","title":{"rendered":"Gamedev on Windows and Godot"},"content":{"rendered":"\n<p>In this post I&#8217;d like to share some of the workflows and setup I use, that might be beneficial to someone in a similar scenario.<\/p>\n\n\n\n<p>My gamedev work environment is Windows. I could be working on Linux, and maybe some things would be simpler &#8211; but I got used to Windows over the years, and this is where all my games are, including the one I&#8217;m trying to remake.<\/p>\n\n\n\n<p>The &#8220;language&#8221; of choice is Godot. It supports both Windows and Linux, and numerous other platforms I presume. I could not find an easy way to reuse code in Godot between projects. At the same time, I must have the code separated into projects to better organize it, and keep it under control.<\/p>\n\n\n\n<p>For example, I have split the game I&#8217;m working on into the following subprojects:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full wp-duotone-unset-1\"><img loading=\"lazy\" decoding=\"async\" width=\"246\" height=\"300\" src=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/list_projects.png\" alt=\"\" class=\"wp-image-68\" \/><\/figure>\n\n\n\n<p>The same can be shown with a dependency graph. The arrow directored from A to B signals &#8220;A depends on B, and must have a symlink to B&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default wp-duotone-unset-2\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"407\" src=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/list_projects_graph.png\" alt=\"\" class=\"wp-image-69\" srcset=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/list_projects_graph.png 633w, https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/list_projects_graph-300x193.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/figure>\n\n\n\n<p>The symlinks on Windows are less intuitive than on Linux. Instead of <code>ln -s<\/code>, we can use <code>MKLINK<\/code>. Make sure to choose the right drive letter first, e.g. <code>F:<\/code>, and then, using absolute paths, to create a symlink in <code>emerald_island<\/code> linking to <code>emerald_assets<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MKLINK \/D \\gamedev\\emerald_island\\assets\\icons \\gamedev\\emerald_assets\\assets\\icons<\/code><\/pre>\n\n\n\n<p>This will only link a directory within the target project, but the entire thing &#8211; but I find it better to split &#8220;what is really needed&#8221; this way. Think about it: a menu of functionalities offered by a project. Exception are larger parts, the <code>emerald_world<\/code> (the actual 3d game) and <code>emerald_menu<\/code> (main menu and party creation). These I link in full.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default wp-duotone-unset-3\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"329\" src=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/symlinks.png\" alt=\"\" class=\"wp-image-70\" srcset=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/symlinks.png 783w, https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/symlinks-300x126.png 300w, https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/symlinks-768x323.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n\n\n<p>A nice thing about new Godot is the icon is changed to indicate it&#8217;s a symlink. It was not the case prior to Godot 4.3, so it&#8217;s a nice touch. I also color-code them: orange for assets, yellow for local code, grey for &#8220;contains symlinks&#8221;, and green for &#8220;is a symlink root&#8221;, as in the following root project, <code>emerald_island<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default wp-duotone-unset-4\"><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"937\" src=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/project_code.png\" alt=\"\" class=\"wp-image-71\" srcset=\"https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/project_code.png 458w, https:\/\/thatuglydude.com\/wp-content\/uploads\/2025\/04\/project_code-147x300.png 147w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/figure>\n\n\n\n<p>With the split of the code, I can also use git with it quite effectively. Every subproject has its own repository. That might be a bit annoying, as we risk getting code out of sync, or difficult to track which versions were compatible. Eventually, I might either migrate to a monorepo, or use git modules (as awful as they are!).<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I&#8217;d like to share some of the workflows and setup I use, that might be beneficial to someone in a similar scenario. My gamedev work environment is Windows. I could be working on Linux, and maybe some things would be simpler &#8211; but I got used to Windows over the years, and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4,8],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-gamedev","category-godot","category-programming"],"_links":{"self":[{"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thatuglydude.com\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}