{"id":283,"date":"2025-07-01T15:40:17","date_gmt":"2025-07-01T05:40:17","guid":{"rendered":"https:\/\/nonlinearexperience.com\/?p=283"},"modified":"2025-11-20T11:23:05","modified_gmt":"2025-11-20T01:23:05","slug":"the-knowledge-a-toolchain-workflow","status":"publish","type":"post","link":"https:\/\/nonlinearexperience.com\/index.php\/2025\/07\/01\/the-knowledge-a-toolchain-workflow\/","title":{"rendered":"Toolchain\/workflow"},"content":{"rendered":"<h1 class=\"wp-block-post-title\">Toolchain\/workflow<\/h1>\n\n\n<p>All these tools are free &#8211; or so cheap and good that you should get them\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Artwork<\/h2>\n\n\n\n<p>&nbsp;&#8211; aseprite &gt; auto export to img folder<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Level editor<\/h2>\n\n\n\n<p>&nbsp;&#8211; tiled &gt; auto export to game map folder (.json)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Coding<\/h2>\n\n\n\n<p>Node js<\/p>\n\n\n\n<p>&nbsp;&#8211; vscode &gt; work in src folder &#8211; saving reloads\/relaunches page in browser<\/p>\n\n\n\n<p>runs test server plugin<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>webpack4 as build tool<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">use modules<\/h3>\n\n\n\n<p>&nbsp;&#8211; why?<\/p>\n\n\n\n<p>First, create a lib folder in the src folder. Then make a new file in lib called phaser.js.<\/p>\n\n\n\n<p>The code in phaser.js will simply export window.Phaser from our phaser.js file.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>export default window.Phaser&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>We can then import Phaser in the main.js file. Replace what was in main.js with this:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>import Phaser from &#8216;.\/lib\/phaser.js&#8217;<br>console.dir(Phaser)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">set up the editor to do code completion etc. using type definitions<\/h3>\n\n\n\n<p>Make a folder called types under the src folder and put the phaser.d.ts file there.<\/p>\n\n\n\n<p>Next, create a new file called jsconfig.json at the base of the project on the same level as index. html and insert the following:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>{<br>&nbsp; &nbsp; &#8220;compilerOptions&#8221;: {<br>&nbsp; &nbsp; &#8220;module&#8221;: &#8220;es6&#8221;,<br>&nbsp; &nbsp; &#8220;target&#8221;: &#8220;es6&#8221;<br>&nbsp; }<br>}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This jsconfig.json file is to configure JavaScript handling for VS Code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Usage<\/h3>\n\n\n\n<p>JSDoc annotation<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\/** @type {Phaser.Physics.Arcade.Sprite} *\/<br>player<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>PUBLISH<\/p>\n\n\n\n<p>Consider how you are setting up your folders<\/p>\n\n\n\n<p>Working<\/p>\n\n\n\n<p>Tmx folder &#8211; Tilemap data &#8211; export to production folder<\/p>\n\n\n\n<p>TSX folder &#8211;&nbsp; Tileset data &#8211; export to production folder<\/p>\n\n\n\n<p>Production &#8216;export&#8217; folder<\/p>\n\n\n\n<p>Tileset &#8211; tileset graphics in here<\/p>\n\n\n\n<p>Scripts &gt; set up one to be able to refresh\/relaunch browser<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All these tools are free &#8211; or so cheap and good that you should get them\u2026 Artwork &nbsp;&#8211; aseprite &gt; auto export to img folder Level editor &nbsp;&#8211; tiled &gt; auto export to game map folder (.json) Coding Node js &nbsp;&#8211; vscode &gt; work in src folder &#8211; saving reloads\/relaunches page in browser runs test [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"wp-custom-template-nlx-the-knowledge-page","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-the-knowledge"],"_links":{"self":[{"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":5,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"predecessor-version":[{"id":1010,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/posts\/283\/revisions\/1010"}],"wp:attachment":[{"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nonlinearexperience.com\/index.php\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}