<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: CalSch</title>
    <description>The latest articles on Forem by CalSch (@calsch).</description>
    <link>https://forem.com/calsch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F722451%2Fb555c8bd-1e04-4643-a8c2-d91dc21e339a.png</url>
      <title>Forem: CalSch</title>
      <link>https://forem.com/calsch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/calsch"/>
    <language>en</language>
    <item>
      <title>I need suggestions for my web game</title>
      <dc:creator>CalSch</dc:creator>
      <pubDate>Mon, 28 Mar 2022 22:48:20 +0000</pubDate>
      <link>https://forem.com/calsch/i-need-suggestions-for-my-web-game-4oa5</link>
      <guid>https://forem.com/calsch/i-need-suggestions-for-my-web-game-4oa5</guid>
      <description>&lt;p&gt;I'm making a web game in typescript and deploying to Heroku, should I compile my code before I deploy it? &lt;br&gt;
I feel like that would make collaboration harder (because git would only have the compiled code). &lt;/p&gt;

&lt;p&gt;(Edit) &lt;br&gt;
If I have 2 branches (one for development and one for production), is there an easy way to automatically compile and minify code in development and push to production?&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>heroku</category>
      <category>webdev</category>
      <category>help</category>
    </item>
    <item>
      <title>How should I structure a game engine/graphics library?</title>
      <dc:creator>CalSch</dc:creator>
      <pubDate>Thu, 30 Dec 2021 15:22:26 +0000</pubDate>
      <link>https://forem.com/calsch/how-should-i-structure-a-game-enginegraphics-library-2f6l</link>
      <guid>https://forem.com/calsch/how-should-i-structure-a-game-enginegraphics-library-2f6l</guid>
      <description>&lt;p&gt;I'm writing a graphics library in TypeScript, but I don't really know how to structure it.&lt;/p&gt;

&lt;p&gt;My file structure looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;lib.ts&lt;/code&gt; (Imports and exports everything from the other files)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;game.ts&lt;/code&gt; (Manages and renders the game)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;canvas.ts&lt;/code&gt; (Puts the image data from a &lt;code&gt;Game&lt;/code&gt; object onto a canvas)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;math.ts&lt;/code&gt; (Math definitions like &lt;code&gt;Vec2&lt;/code&gt;, &lt;code&gt;Rect&lt;/code&gt;, and &lt;code&gt;dist()&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;util.ts&lt;/code&gt; (Useful functions like getting a circles bounding box)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sprites.ts&lt;/code&gt; (Sprite classes like &lt;code&gt;CircleSpr&lt;/code&gt; and &lt;code&gt;RectangleSpr&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dst&lt;/code&gt; (The compiled JavaScript code with maps)

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lib.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lib.js.map&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;game.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;game.js.map&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I feel like I'm doing it wrong because I of things like &lt;code&gt;lib.ts&lt;/code&gt; where I just import everything and export it.&lt;/p&gt;

&lt;p&gt;If anyone has made a game engine/graphics library, then please let me know how you structured it :)&lt;/p&gt;

</description>
      <category>help</category>
      <category>discuss</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
