<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C# | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/category/c-3/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Fri, 07 Apr 2023 19:29:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>C# | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Debugging C# on Ubuntu and you get</title>
		<link>https://learncgames.com/debugging-c-on-ubuntu-and-you-get/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debugging-c-on-ubuntu-and-you-get</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 07 Apr 2023 23:01:33 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3246</guid>

					<description><![CDATA[<p>So you&#8217;re trying to debug C# code on Linux, maybe Ubuntu. You&#8217;ve installed .NET 6 or 7, you&#8217;ve built your solution in Visual Studio on your Windows PC, published it then copied the files over to the Linux box. But when you run it, you get an error &#8220;Unable to find debugger script at&#8221;. It&#8217;s [&#8230;]</p>
The post <a href="https://learncgames.com/debugging-c-on-ubuntu-and-you-get/">Debugging C# on Ubuntu and you get</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:29,&quot;href&quot;:&quot;https:\/\/developercommunity.visualstudio.com\/t\/Failed-to-launch-debug-adapter-due-to-fa\/1359155&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260206110839\/https:\/\/developercommunity.visualstudio.com\/t\/Failed-to-launch-debug-adapter-due-to-fa\/1359155&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:35:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-09 15:01:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-12 19:49:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-16 18:55:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 02:01:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 16:01:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 00:17:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 00:09:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 02:18:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 04:32:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-13 08:50:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 15:02:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-20 00:37:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 00:39:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-28 00:36:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-01 03:18:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 12:42:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-07 20:34:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 04:24:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-14 12:17:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 20:10:04&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-21 04:03:01&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 04:03:01&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft size-full wp-image-3249" src="https://learncgames.com/wp-content/uploads/2023/04/vs-debugger2.png" alt="vs-debugger-popup" width="420" height="190" srcset="https://learncgames.com/wp-content/uploads/2023/04/vs-debugger2.png 420w, https://learncgames.com/wp-content/uploads/2023/04/vs-debugger2-300x136.png 300w" sizes="(max-width: 420px) 100vw, 420px" /></p>
<p>So you&#8217;re trying to debug C# code on Linux, maybe Ubuntu. You&#8217;ve installed .NET 6 or 7, you&#8217;ve built your solution in Visual Studio on your Windows PC, published it then copied the files over to the Linux box. But when you run it, you get an error &#8220;Unable to find debugger script at&#8221;. It&#8217;s time to debug your Linux app from your Windows Visual Studio.</p>
<p>Now there is a <a title="Link to Developer Community for Visual Studio" href="https://developercommunity.visualstudio.com/t/Failed-to-launch-debug-adapter-due-to-fa/1359155" target="_blank" rel="nofollow noopener">Microsoft support issue</a> for this and it&#8217;s less than helpful. Read below to see how I fixed it.</p>
<p>Only, as soon as it tries to attach over SSH (with username, password, IP etc), you get this popup on the left. &#8220;Computer says no&#8221;.</p>
<p>Looking in the VS Output folder you see the text below or something similar. For whatever reason, it failed to create a hidden folder in your home folder. To fix this, all you have to do is create that folder. It&#8217;s .vs-debugger under your home folder.</p>
<p>If you&#8217;re not familiar with .folders on Linux, note that the . at the front of the name means it&#8217;s a hidden folder. A simple <strong>ls</strong> command will not reveal it. If you use the File Manager, you can click the settings in the top right and tick the Show Hidden Files. Then you can do a <strong>cd ~</strong> followed by a <strong>mkdir .vs-debugger</strong>. And View in files to confirm that it&#8217;s there.</p>
<p><img decoding="async" class="alignleft size-full wp-image-3248" src="https://learncgames.com/wp-content/uploads/2023/04/vs-debugger1.png" alt="" width="641" height="144" srcset="https://learncgames.com/wp-content/uploads/2023/04/vs-debugger1.png 641w, https://learncgames.com/wp-content/uploads/2023/04/vs-debugger1-300x67.png 300w" sizes="(max-width: 641px) 100vw, 641px" />Now the only pain with debugging is that the application must be running for Visual Studio to attach to it. I was debugging a utility that is run, does its business and closes. So to debug it, I added this as the first line in main() in program.cs</p>
<p>Console.ReadKey();</p>
<p>So run it, let it sit waiting for a key then attach visual studio&#8217;s debugger to your app over SSH, add your breakpoints and hit a key. Simples!</p>The post <a href="https://learncgames.com/debugging-c-on-ubuntu-and-you-get/">Debugging C# on Ubuntu and you get</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3246</post-id>	</item>
		<item>
		<title>Is Tiobe Index misinformation?</title>
		<link>https://learncgames.com/is-tiobe-index-misinformation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=is-tiobe-index-misinformation</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sun, 15 Jan 2023 00:00:05 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[rankings]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3188</guid>

					<description><![CDATA[<p>Every month a new Tiobe Index is published purporting to show the most popular programming languages. Except, if you look at other programming language popularity surveys, lists etc, the Tiobe Index increasingly seems to be at odds with everybody else. Take the programming language C. As you can imagine I have a particular interest in [&#8230;]</p>
The post <a href="https://learncgames.com/is-tiobe-index-misinformation/">Is Tiobe Index misinformation?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignleft size-medium wp-image-3195" src="https://learncgames.com/wp-content/uploads/2023/01/2094394-300x200.jpg" alt="news, false, concept" width="300" height="200" srcset="https://learncgames.com/wp-content/uploads/2023/01/2094394-300x200.jpg 300w, https://learncgames.com/wp-content/uploads/2023/01/2094394-1024x682.jpg 1024w, https://learncgames.com/wp-content/uploads/2023/01/2094394-768x512.jpg 768w, https://learncgames.com/wp-content/uploads/2023/01/2094394.jpg 1280w" sizes="(max-width: 300px) 100vw, 300px" />Every month a new Tiobe Index is published purporting to show the most popular programming languages. Except, if you look at other programming language popularity surveys, lists etc, the Tiobe Index increasingly seems to be at odds with everybody else.</p>
<p>Take the programming language C. As you can imagine I have a particular interest in it. I was at first delighted when I saw it at #3 in the Tiobe Index. In fact, in their most recent index it is listed as the 2nd most popular programming language. Well that is just crazy. No matter how much I might want it, there is no way on Earth that it is the 2nd most popular programming language.</p>
<p>It&#8217;s not just me saying it. Let&#8217;s look at who else says it.</p>

<table id="tablepress-1" class="tablepress tablepress-id-1">
<thead>
<tr class="row-1">
	<th class="column-1">Site</th><th class="column-2">C's Ranking</th><th class="column-3">Comments</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1"><a href="https://www.tiobe.com/tiobe-index/">Tiobe Index</a></td><td class="column-2">2</td><td class="column-3">Updated monthly</td>
</tr>
<tr class="row-3">
	<td class="column-1"><a href="https://octoverse.github.com/2022/top-programming-languages">GitHub Octoverse Programming languages</a></td><td class="column-2">9</td><td class="column-3">Annually- this is October 2022</td>
</tr>
<tr class="row-4">
	<td class="column-1"><a href="https://www.reddit.com/r/programming/wiki/faq/#wiki_what_language_reddits_are_there.3F">Reddit Programming languages</a></td><td class="column-2">10</td><td class="column-3">Subreddits for programming languages</td>
</tr>
<tr class="row-5">
	<td class="column-1"><a href="https://redmonk.com/sogrady/2022/10/20/language-rankings-6-22/">Red Monk Programming Language Rankings</a></td><td class="column-2">10</td><td class="column-3">June 2022. Updated every 6 months</td>
</tr>
<tr class="row-6">
	<td class="column-1"><a href="https://survey.stackoverflow.co/2022/#technology">StackOverflow developer survey</a></td><td class="column-2">11</td><td class="column-3">Annually</td>
</tr>
<tr class="row-7">
	<td class="column-1"><a href="https://www.statista.com/statistics/793628/worldwide-developer-survey-most-used-languages/#:~:text=As%20of%202022%2C%20JavaScript%20and,55%20percent%20using%20HTML%2FCSS.">Statista most used programming languages 2022</a></td><td class="column-2">11</td><td class="column-3"></td>
</tr>
<tr class="row-8">
	<td class="column-1"><a href="https://www.hackerrank.com/research/developer-skills/2023">Hackerrank Developer skills report 2023</a></td><td class="column-2">12</td><td class="column-3"></td>
</tr>
</tbody>
</table>
<!-- #tablepress-1 from cache -->
<p>There are other programming language lists or surveys but those show what I mean.  No one else has C anywhere that high. Here it&#8217;s in positions 9-12 with an average roughly around 10.5 if you exclude Tiobe or 9.3 if you don&#8217;t.  I think their methodology is flawed and biased by age. Older languages appear to carry more weight.</p>
<p>Never mind C, what about JavaScript? Everyone else has it in first place (except HackerRank who has it in 4th). Tiobe index has it in 7th. Misinformation is defined as “false information that is spread, regardless of intent to mislead.”. Maybe that&#8217;s a bit harsh but that&#8217;s how I regard the Tiobe Index.</p>The post <a href="https://learncgames.com/is-tiobe-index-misinformation/">Is Tiobe Index misinformation?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3188</post-id>	</item>
		<item>
		<title>And with a bit of help I got it fixed</title>
		<link>https://learncgames.com/and-with-a-bit-of-help-i-got-it-fixed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=and-with-a-bit-of-help-i-got-it-fixed</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 09 Mar 2022 00:00:27 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Nuget]]></category>
		<category><![CDATA[SkiaSharp]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3026</guid>

					<description><![CDATA[<p>Thanks to suggestions in the Reddit CSharp subreddit (you can view the entire thread here), I fixed the missing file issue and SkiaSharp is now happily outputting graphics on the VPS.  I&#8217;m referring to the More Programming Joys blog entry I posted yesterday. There were two things that were needed to fix it. Add a [&#8230;]</p>
The post <a href="https://learncgames.com/and-with-a-bit-of-help-i-got-it-fixed/">And with a bit of help I got it fixed</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:60,&quot;href&quot;:&quot;https:\/\/www.reddit.com\/r\/dotnet\/comments\/t8yg53\/c_application_with_skiasharp_on_ubuntu_2004_is&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:61,&quot;href&quot;:&quot;https:\/\/www.nuget.org\/packages\/SkiaSharp.NativeAssets.Linux\/2.88.0-preview.209&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260206113019\/https:\/\/www.nuget.org\/packages\/SkiaSharp.NativeAssets.Linux\/2.88.0-preview.209&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:35:54&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 00:39:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 02:24:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-16 18:55:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-21 16:38:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 04:32:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 12:31:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 00:39:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 00:34:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 00:37:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 00:39:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-22 00:32:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-26 00:55:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 00:39:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-02 20:46:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 04:38:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 12:30:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 20:19:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 04:12:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-19 12:06:56&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-19 12:06:56&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:62,&quot;href&quot;:&quot;https:\/\/nuget.org&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260204222129\/https:\/\/www.nuget.org\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:28:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 04:39:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-14 01:16:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 14:30:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 00:43:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 04:32:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 12:31:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 00:38:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 08:30:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 00:37:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 00:39:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-22 00:32:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-26 00:55:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 00:39:22&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-02 20:46:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 04:38:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 12:30:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 20:19:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 04:13:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-19 12:06:52&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-19 12:06:52&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img loading="lazy" decoding="async" class="alignleft wp-image-3028 size-full" src="https://learncgames.com/wp-content/uploads/2022/03/visual-studio-target-runtime-dialog.png" alt="Visual Studio Publish Target runtime dialog" width="545" height="499" srcset="https://learncgames.com/wp-content/uploads/2022/03/visual-studio-target-runtime-dialog.png 545w, https://learncgames.com/wp-content/uploads/2022/03/visual-studio-target-runtime-dialog-300x275.png 300w" sizes="auto, (max-width: 545px) 100vw, 545px" />Thanks to suggestions in the Reddit CSharp subreddit (you can view the entire thread <a title="Link to Csharp subreddit on Reddit" href="https://www.reddit.com/r/dotnet/comments/t8yg53/c_application_with_skiasharp_on_ubuntu_2004_is/" target="_blank" rel="nofollow noopener">here</a>), I fixed the missing file issue and SkiaSharp is now happily outputting graphics on the VPS.  I&#8217;m referring to the <a title="Link to Blog entry on More Programming Joys" href="https://learncgames.com/more-programming-joys/" target="_blank" rel="noopener">More Programming Joys</a> blog entry I posted yesterday.</p>
<p>There were two things that were needed to fix it.</p>
<ol>
<li>Add a package to the solution. This was the <a title="Link to SkiaSharp.NativeAssets.Linux" href="https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.88.0-preview.209" target="_blank" rel="nofollow noopener">SkiaSharp.NativeAssets.Linux</a> package and I used Nuget to add it to my Windows solution. If you haven&#8217;t used <a title="Link to Nuget.org" href="https://nuget.org" target="_blank" rel="noopener">Nuget</a>, it&#8217;s a great package manager and makes it very easy to add packages.</li>
<li>On the <em>Visual Studio Publish page</em>, I needed to change the Target Runtime to <strong>linux-x64</strong>. That&#8217;s the dialog above. When I clicked the Publish it put all the files including the library that was missing (libSkiaSharp.so) into the Target location and once uploaded it worked.</li>
</ol>The post <a href="https://learncgames.com/and-with-a-bit-of-help-i-got-it-fixed/">And with a bit of help I got it fixed</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3026</post-id>	</item>
		<item>
		<title>More Programming Joys</title>
		<link>https://learncgames.com/more-programming-joys/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-programming-joys</link>
					<comments>https://learncgames.com/more-programming-joys/#comments</comments>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 08 Mar 2022 00:00:48 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Serilog]]></category>
		<category><![CDATA[Skia]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3021</guid>

					<description><![CDATA[<p>So I&#8217;ve been doing some .NET programming. First on Windows because I can debug it there then &#8220;Publish it&#8221; which puts all the files (compiled in release) needed, including any dlls into one folder and upload it to a VPS using WinSCP. I&#8217;ve also got a terminal session connected by Putty. I use Serilog for [&#8230;]</p>
The post <a href="https://learncgames.com/more-programming-joys/">More Programming Joys</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:63,&quot;href&quot;:&quot;https:\/\/serilog.net&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260103212351\/https:\/\/serilog.net\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:28:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 04:39:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-14 10:25:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 14:30:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-21 04:35:54&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-24 12:51:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-28 00:38:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 20:03:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 18:33:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 00:39:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 00:37:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 22:43:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 11:58:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-26 20:35:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 00:31:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 10:33:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 19:52:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-10 03:41:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 11:32:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 19:24:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 03:16:26&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 03:16:26&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:64,&quot;href&quot;:&quot;https:\/\/github.com\/serilog\/serilog&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251216014112\/https:\/\/github.com\/serilog\/serilog&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:29:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 00:39:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 02:24:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 18:55:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-21 08:35:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:51:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 00:38:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 20:03:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 18:33:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 00:39:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 00:37:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 22:43:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 11:58:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 20:35:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 00:31:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 10:33:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 19:52:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 03:41:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-13 11:32:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 19:24:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 03:16:30&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 03:16:30&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:65,&quot;href&quot;:&quot;https:\/\/stackoverflow.com\/questions\/44428405\/i-am-using-net-core-with-c-sharp-on-linux-lib-system-drawing-is-missing&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20181104053240\/https:\/\/stackoverflow.com\/questions\/44428405\/i-am-using-net-core-with-c-sharp-on-linux-lib-system-drawing-is-missing&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:29:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 20:36:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 01:01:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-19 00:40:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 19:08:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 04:24:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 00:39:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 10:44:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 17:23:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 00:37:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 00:39:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-22 00:32:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-26 00:55:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 00:39:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-02 20:46:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 04:38:54&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 12:30:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 20:19:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 04:12:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-19 12:06:54&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-19 12:06:54&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:66,&quot;href&quot;:&quot;https:\/\/github.com\/mono\/SkiaSharp\/issues\/1341&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250109034858\/https:\/\/github.com\/mono\/SkiaSharp\/issues\/1341&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:29:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 10:18:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 12:39:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 14:30:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-21 16:38:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-26 04:32:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 04:40:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 17:31:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 18:37:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 06:24:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 00:37:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 22:43:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 11:59:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 20:35:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 00:31:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 10:33:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 19:52:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 03:41:44&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-13 11:32:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 19:24:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 03:16:21&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 03:16:21&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img loading="lazy" decoding="async" class="alignleft size-full wp-image-3023" src="https://learncgames.com/wp-content/uploads/2022/03/map.jpg" alt="Game Map" width="100" height="100" />So I&#8217;ve been doing some .NET programming. First on Windows because I can debug it there then &#8220;Publish it&#8221; which puts all the files (compiled in release) needed, including any dlls into one folder and upload it to a VPS using WinSCP. I&#8217;ve also got a terminal session connected by Putty. I use Serilog for logging and SkiaSharp for graphics.</p>
<p>First bug was a missing file but it was a stupid error on my part. I had the file in a path under the home folder and had used ~ in the file&#8217;s path. You can use ~ in Bash- it means your home folder, but not in a file path in an application. Putting in the full path fixed the bug. D&#8217;oh.</p>
<p>Because it&#8217;s .NET (6) that I&#8217;m using, you don&#8217;t get configuration stuff the same as you did with .NET Framework. I store some config information in a file and define the path with these lines of code which work on both Linux and Windows.</p>
<pre><code class="language-csharp" data-line=""> bool IsWindows =&gt; RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
 var appSettingsFilePath = IsWindows ? @&quot;c:\turfwar\twConfig.json&quot; : &quot;/home/user/turfwar/twConfig.json&quot;;</code></pre>
<p>I like <a title="Link to serilog website" href="https://serilog.net/" target="_blank" rel="noopener">Serilog</a> ( with project on <a title="Link to Serilog on GitHub" href="https://github.com/serilog/serilog" target="_blank" rel="nofollow noopener">Github</a> at ). Nice and simple logging but flexible enough. As this application is a command line app run whenever, it&#8217;s easier to view the logs afterwards.</p>
<h2>Why use SkiaSharp?</h2>
<p>I was quite happy to use System.Drawing but <a title="Link to StackOverflow question about .NET Core on Linux" href="https://stackoverflow.com/questions/44428405/i-am-using-net-core-with-c-sharp-on-linux-lib-system-drawing-is-missing" target="_blank" rel="nofollow noopener">according to this</a>, There are issues with libgdiplus. So I thought I&#8217;d try SkiaSharp as I&#8217;m doing stuff with Flutter and Skia is the library that underpins that. This is what it takes to create a 100 x100 grey coloured Bitmap in SkiaSharp, add yellow dots and save it to disk as a .jpg. That&#8217;s what you see up above.</p>
<pre><code class="language-csharp" data-line="">        internal void SaveBitMap(int id, string filename, Gang gang)
        {
            var info = new SKImageInfo(100, 100);
            using var surface = SKSurface.Create(info);
            SKCanvas myCanvas = surface.Canvas;

            // clear the canvas / fill with white
            myCanvas.DrawColor(new SKColor(0x99, 0x99, 0x99));

            // draw the dots, one for each block
            foreach (var block in Blocks)
            {
                if (block.Owner == id)
                {
                    myCanvas.DrawPoint(block.X*5/2, block.Y*5/2, SKColors.Yellow);
                }
            }

            // Now save to filename
            var mainCanvasImage = surface.Snapshot();
            var TempTIFbitmap1 = SKBitmap.Decode(mainCanvasImage.Encode());
            using (var image = SKImage.FromBitmap(TempTIFbitmap1))
            using (var data = image.Encode(SKEncodedImageFormat.Jpeg, 100))
            {
                // save the data to a stream
                using (var stream = File.OpenWrite(filename))
                {
                    data.SaveTo(stream);
                }
            }
        }</code></pre>
<p>It works fine on Windows but on Linux, (Ubuntu 20.04) I hit bug #2. &#8220;System.TypeInitializationException: The type initializer for &#8216;SkiaSharp.SKImageInfo&#8217; threw an exception.&#8221;. And that&#8217;s where I am at the moment.  <a title="Link to Bug discussion for SkiaSharp" href="https://github.com/mono/SkiaSharp/issues/1341" target="_blank" rel="nofollow noopener">This</a> is similar.  I&#8217;ll keep you informed.</p>The post <a href="https://learncgames.com/more-programming-joys/">More Programming Joys</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://learncgames.com/more-programming-joys/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3021</post-id>	</item>
		<item>
		<title>It&#8217;s that book again</title>
		<link>https://learncgames.com/its-that-book-again/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=its-that-book-again</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 01 Mar 2022 09:18:03 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[book]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3010</guid>

					<description><![CDATA[<p>One of my favourites and one that I actually bought twice in my life and of course I have mentioned before. Originally I bought it back in 1982 and more recently in 2015 along with the sister &#8220;More Computer Games&#8221; book. The reason  I mention it because there&#8217;s an ongoing project to do the games [&#8230;]</p>
The post <a href="https://learncgames.com/its-that-book-again/">It’s that book again</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:70,&quot;href&quot;:&quot;https:\/\/github.com\/coding-horror\/basic-computer-games?utm_campaign=explore-email&amp;utm_medium=email&amp;utm_source=newsletter&amp;utm_term=weekly&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img loading="lazy" decoding="async" class="alignleft size-full wp-image-884" src="https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames.jpg" alt="Basic Computer games book" width="355" height="436" srcset="https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames.jpg 355w, https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames-244x300.jpg 244w" sizes="auto, (max-width: 355px) 100vw, 355px" />One of my favourites and one that I actually bought twice in my life and of course I have mentioned before. Originally I bought it back in 1982 and more recently in 2015 along with the sister &#8220;More Computer Games&#8221; book. The reason  I mention it because there&#8217;s an <a title="Link to Project on GitHub" href="https://github.com/coding-horror/basic-computer-games?utm_campaign=explore-email&amp;utm_medium=email&amp;utm_source=newsletter&amp;utm_term=weekly" target="_blank" rel="noopener">ongoing project</a> to do the games in it in languages other than BASIC.</p>
<p>The languages they&#8217;ve chosen are:</p>
<ul dir="auto">
<li>Java</li>
<li>Python</li>
<li>C#</li>
<li>VB.NET</li>
<li>JavaScript</li>
<li>Ruby</li>
<li>Delphi / Object Pascal</li>
<li>Perl</li>
</ul>
<p>I no, it&#8217;s sad. No C&#8230; But given that it includes C#, I&#8217;ll let them off.</p>The post <a href="https://learncgames.com/its-that-book-again/">It’s that book again</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3010</post-id>	</item>
		<item>
		<title>Using JSON as a datastore in C#</title>
		<link>https://learncgames.com/using-json-as-a-datastore-in-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-json-as-a-datastore-in-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 01 Jan 2022 00:00:29 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Techniques]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3002</guid>

					<description><![CDATA[<p>For some not too complex applications, JSON can be a very handy way to store data rather than say using a database. It also has the advantage of storing data of varying sizes. For instance Lists with varying numbers of items. I created a Saveable generic class below that you use as an ancestor class [&#8230;]</p>
The post <a href="https://learncgames.com/using-json-as-a-datastore-in-c/">Using JSON as a datastore in C#</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:71,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/geralt-9301\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5113918&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260128125116\/https:\/\/pixabay.com\/users\/geralt-9301\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:07&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 20:35:59&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 10:15:04&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 00:35:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-22 08:38:06&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-26 04:32:17&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-02 04:40:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-05 06:20:34&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-08 07:10:02&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-12 08:36:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-16 00:37:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-20 00:37:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-24 00:39:09&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-27 21:41:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-01 04:35:20&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-04 12:42:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 20:34:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 12:23:52&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-14 22:51:36&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 12:09:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 20:02:11&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 20:02:11&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:72,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5113918&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 20:35:53&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 10:15:04&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 00:35:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-22 00:43:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-25 02:25:26&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-28 14:15:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 00:33:37&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-07 21:06:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-12 08:36:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-16 00:37:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-20 00:37:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-24 00:39:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-27 21:41:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-01 04:35:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-04 12:42:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 20:34:48&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 16:11:07&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-15 00:34:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 12:09:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 20:02:12&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 20:02:12&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_3004" aria-describedby="caption-attachment-3004" style="width: 640px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="size-full wp-image-3004" src="https://learncgames.com/wp-content/uploads/2022/01/shapes.jpg" alt="Shapes" width="640" height="427" srcset="https://learncgames.com/wp-content/uploads/2022/01/shapes.jpg 640w, https://learncgames.com/wp-content/uploads/2022/01/shapes-300x200.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-3004" class="wp-caption-text">Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5113918">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5113918">Pixabay</a></figcaption></figure>
<p>For some not too complex applications, JSON can be a very handy way to store data rather than say using a database. It also has the advantage of storing data of varying sizes. For instance Lists with varying numbers of items. I created a Saveable generic class below that you use as an ancestor class for that you wish to Save/Load an IList of whatever.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre><code class="language-csharp" data-line="">    public class SaveAble&lt;T&gt;
    {
        private string _error = &quot;&quot;;
        string LastError()
        {
            return _error;
        }
        public IList&lt;T&gt;? Load(string filePath)
        {
            if (!File.Exists(filePath))
            {
                Log.Error(&quot;Missing file {filePath}&quot;);
                _error = $&quot;Missing file {filePath}&quot;;
                return null;
            }

            var content = File.ReadAllText(filePath);
            if (string.IsNullOrEmpty(content))
            {
                Log.Error(&quot;{filePath} file is empty&quot;);
                _error=$&quot;{filePath} file is empty&quot;;
                return null;
            }

            return JsonSerializer.Deserialize&lt;IList&lt;T&gt;&gt;(content, new JsonSerializerOptions
            {
                PropertyNameCaseInsensitive = true
            })!;
        }

        public bool Save(string filename,IList&lt;T&gt; collection)
        {
            var options = new JsonSerializerOptions
            {
                WriteIndented = true,
                PropertyNameCaseInsensitive = true
            };
            try
            {
                var bytes = JsonSerializer.SerializeToUtf8Bytes(collection, options);
                File.WriteAllBytes(filename, bytes);
                return true;
            }catch (Exception ex)
            {
                _error = $&quot;Exception:{ex.Message}&quot;;
                return false;
            }
        }

    }
</code></pre>
<p>Just define your class MyClasses from SaveAble&lt;MyClass&gt;</p>
<p>where MyClass is the class you have a List of. Then you can do</p>
<pre>MyClasses myclasses;</pre>
<pre>myclasses.Save("filename",List&lt;MyClass&gt;) and

List&lt;MyClass&gt; list = myclasses.Load("filename");</pre>
<p>It is fast. On my PC (now six years old), it can load a 99,000 line JSON file in well under a second.</p>The post <a href="https://learncgames.com/using-json-as-a-datastore-in-c/">Using JSON as a datastore in C#</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3002</post-id>	</item>
		<item>
		<title>Why C# for the server?</title>
		<link>https://learncgames.com/why-c-for-the-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-c-for-the-server</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 31 Dec 2021 00:00:30 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Game]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2997</guid>

					<description><![CDATA[<p>There are plenty of other programming languages that would do.  Programming languages are just tools but C# comes with several advantages. I know it pretty well, having been using it since 2005. With .NET 6 (and 5), it&#8217;s easy to create applications that run on Linux. This lowers the cost for hosting. I&#8217;m setting the [&#8230;]</p>
The post <a href="https://learncgames.com/why-c-for-the-server/">Why C# for the server?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:73,&quot;href&quot;:&quot;https:\/\/docs.microsoft.com\/en-gb\/dotnet\/core\/tutorials\/top-level-templates&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20211214130431\/https:\/\/docs.microsoft.com\/en-gb\/dotnet\/core\/tutorials\/top-level-templates&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 04:39:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 16:00:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 18:55:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 20:02:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:51:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 00:38:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 00:33:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 00:36:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 00:39:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 08:04:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 00:34:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 00:37:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-27 00:39:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 00:31:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 12:45:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 20:37:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 04:27:48&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-13 12:17:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 20:12:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 04:04:48&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 04:04:48&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_2998" aria-describedby="caption-attachment-2998" style="width: 512px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="size-full wp-image-2998" src="https://learncgames.com/wp-content/uploads/2021/12/Csharp_Logo.png" alt="https://commons.wikimedia.org/wiki/File:Csharp_Logo.png" width="512" height="512" srcset="https://learncgames.com/wp-content/uploads/2021/12/Csharp_Logo.png 512w, https://learncgames.com/wp-content/uploads/2021/12/Csharp_Logo-300x300.png 300w, https://learncgames.com/wp-content/uploads/2021/12/Csharp_Logo-150x150.png 150w, https://learncgames.com/wp-content/uploads/2021/12/Csharp_Logo-250x250.png 250w" sizes="auto, (max-width: 512px) 100vw, 512px" /><figcaption id="caption-attachment-2998" class="wp-caption-text">From Wikimedia</figcaption></figure>
<p>There are plenty of other programming languages that would do.  Programming languages are just tools but C# comes with several advantages.</p>
<ol>
<li>I know it pretty well, having been using it since 2005.</li>
<li>With .NET 6 (and 5), it&#8217;s easy to create applications that run on Linux. This lowers the cost for hosting. I&#8217;m setting the game on a low cost VPS.</li>
<li>Also on Linux, ASP.NET works pretty well for both Websites and Web Apis.</li>
<li>I like some of the recent changes in C#. And Visual Studio 2022 Community Edition is pretty good. For instance the JSON handling has got better and better.</li>
</ol>
<p>Do you know what Hello World in C# looks like now? Here it is in its entirety.</p>
<pre>Console.WriteLine("Hello, World!");

</pre>
<p>That&#8217;s a console application. One line! Follow <a href="https://docs.microsoft.com/en-gb/dotnet/core/tutorials/top-level-templates">the link</a> for more details about the C# templates. Note, there&#8217;s no usings there either. That&#8217;s because applications now start with a default set in C# 10 and .NET 6 (you get both if you install VS 2022). And if you want a particular namespace that you&#8217;ve written to be available to all source code in a project, you can just add this:</p>
<pre>global using xyz;</pre>
<p>And it becomes available everywhere without needing any more usings.</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/why-c-for-the-server/">Why C# for the server?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2997</post-id>	</item>
		<item>
		<title>A new beginning &#8211; C#</title>
		<link>https://learncgames.com/a-new-beginning-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-new-beginning-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 30 Dec 2021 10:43:20 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[This website]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[postal]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2991</guid>

					<description><![CDATA[<p>You may have noticed, I stopped posting here a while back because basically I ran out of ideas for C related games stuff plus I was doing other stuff that wasn&#8217;t relevant (Delphi, C#). I will get back to finishing my 2nd eBook, but for now, I&#8217;m working on a web/mobile game that isn&#8217;t really [&#8230;]</p>
The post <a href="https://learncgames.com/a-new-beginning-c/">A new beginning – C#</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:74,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/7089643-7089643\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5019558&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:75,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5019558&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 03:12:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 10:25:43&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-17 10:43:20&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-21 02:01:59&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-24 12:51:47&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-28 00:38:55&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 00:33:37&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-07 20:21:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-12 08:36:58&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-16 00:37:34&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-20 00:37:26&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-24 08:39:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-27 22:35:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-31 13:26:35&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-04 01:33:18&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 12:35:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 06:22:46&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-15 00:34:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 12:09:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 20:02:12&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 20:02:12&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:76,&quot;href&quot;:&quot;https:\/\/kjcgames.com&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251206190258\/http:\/\/kjcgames.com\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 03:12:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-14 16:38:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-19 00:40:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 12:39:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 04:24:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 23:52:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 02:52:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 12:40:10&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-14 00:37:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 00:39:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 16:53:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 00:30:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-28 05:22:50&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-31 13:26:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 04:35:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-07 12:35:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 03:15:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-15 04:15:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 12:09:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 20:02:15&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 20:02:15&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:77,&quot;href&quot;:&quot;https:\/\/kjcgames.com\/warlord\/warlord.htm&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20220124064658\/https:\/\/kjcgames.com\/warlord\/warlord.htm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 03:12:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 01:16:48&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-17 10:43:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 20:02:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 15:08:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 00:38:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 00:33:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 00:36:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 00:39:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 00:37:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-20 00:37:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-24 00:39:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 00:36:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 13:26:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 04:35:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 12:35:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 04:25:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 12:17:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 20:10:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 04:03:05&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 04:03:05&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:78,&quot;href&quot;:&quot;https:\/\/kjcgames.com\/quest\/quest.htm&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250822102506\/http:\/\/kjcgames.com\/quest\/quest.htm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 03:12:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 10:25:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 10:43:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 20:02:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 15:08:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 00:38:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 00:33:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 00:36:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 08:36:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 00:37:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-20 00:37:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-24 00:39:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 00:36:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 13:26:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 04:35:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 12:35:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 20:25:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 04:16:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 12:11:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 20:04:05&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 20:04:05&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:79,&quot;href&quot;:&quot;https:\/\/www.kjcgames.com\/quest\/questrules\/credits.htm&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20220124161245\/https:\/\/www.kjcgames.com\/quest\/questrules\/credits.htm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:37:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 03:12:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 12:39:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 00:35:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-22 08:38:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-25 14:01:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-01 00:31:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 04:35:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 00:39:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 00:31:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 00:37:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 00:40:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 00:30:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 05:23:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 13:26:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 04:35:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 12:35:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 00:38:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 20:15:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 04:09:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 12:02:56&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 12:02:56&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_2993" aria-describedby="caption-attachment-2993" style="width: 640px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="size-full wp-image-2993" src="https://learncgames.com/wp-content/uploads/2021/12/postal.png" alt="Postage " width="640" height="489" srcset="https://learncgames.com/wp-content/uploads/2021/12/postal.png 640w, https://learncgames.com/wp-content/uploads/2021/12/postal-300x229.png 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-2993" class="wp-caption-text">Image by <a href="https://pixabay.com/users/7089643-7089643/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5019558">Please Don&#8217;t sell My Artwork AS IS</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=5019558">Pixabay</a></figcaption></figure>
<p>You may have noticed, I stopped posting here a while back because basically I ran out of ideas for C related games stuff plus I was doing other stuff that wasn&#8217;t relevant (Delphi, C#).</p>
<p>I will get back to finishing my 2nd eBook, but for now, I&#8217;m working on a web/mobile game that isn&#8217;t really C related. However I thought I&#8217;d cover development of it here. as (a) part of it is C# (so technically it&#8217;s C and (b) it&#8217;s a game.  The backend part is C#, the front end Flutter which is Dart. I&#8217;m also going back to my old game design roots as the game architecture is &#8216;Postal Game&#8217;.</p>
<h3>What is &#8216;Postal Game&#8217; architecture?</h3>
<p>Well first a little potted history.</p>
<p>Back before the web existed (late 80s), people used to play games by post. They&#8217;d fill in a postcard with the orders, post it to the game provider who would enter the details in a computer, process the game then print the results out and post that back. I discovered this (in the UK) back in 1986 and created a postal game: Casus Belli. A 16 player version of Empire. It ran for a year or so and I even attended a postal games conference with a stall back at the start of 1987 in London. By chance, the stall next to mine was run by KJC Games and we got chatting. Kevin J Cropper (The KJC of KJC Games) said &#8220;If I ever wanted to sell the game contact me&#8221; and at the end of 1987 I did and found myself working for <a href="https://kjcgames.com/">KJC Games</a> as a game designer and programmer in Cleveleys (just North of Blackpool). It was a small cottage industry in the UK and KJC Games was the biggest fish in this admittedly small pond.</p>
<p>Over the next two and a half years I created the 100 player version of Casus called Warlord. Long after I left they ran games across the web and though they don&#8217;t run it any more you can still see <a href="https://kjcgames.com/warlord/warlord.htm">the page</a> for it. My big creation was a 1,000 player postal game called <a href="https://kjcgames.com/quest/quest.htm">Quest</a> which KJC still runs. Not bad for a game created in 1989! They still have my name in the <a href="https://www.kjcgames.com/quest/questrules/credits.htm">Advanced rules </a>which is nice as I last did some work on it in 1996. It took me a year and 40,000 lines of code (Turbo Pascal 5) to create. The others listed helped test it, made suggestions and Steven Fairbrother who came along after I left, fixed my bugs.  When you write 40,000 lines of code in a year, there are a few bugs included&#8230;</p>
<p>So each turn gets posted in, processed, printed and posted back. The architecture is the same except its all now sent across the web. There&#8217;s a front end programmed in Flutter. This makes it possible to use the same code for Web and mobile development. The game is processed at a fixed rate. In this case I&#8217;m going for every three hours but slower or faster is possible. When it&#8217;s time, all orders are processed and the results made available to be fetched from the web or mobile device.</p>
<h3>Pros and Cons</h3>
<p>A Game Processing Engine (GPE) is a completely different kettle of fish from your traditional multi player game server. Hardware requirements are much less and you don&#8217;t manage multiple players all at once. Basically the game web/mobile uploads a zip file from each player to send in the orders and then fetches one containing the results. The GPE maintains game state, processes all orders, outputs all results and backs up the game, both before processing each turn (in case it goes wrong so it can be fixed and rerun) and afterwards,</p>
<p>So I&#8217;ll be posting here about my progress, programming issues and so on. If you have any queries, please don&#8217;t add them as comments &#8211; I delete any non-technical comments so instead use the contact form via the About me link on the top.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/a-new-beginning-c/">A new beginning – C#</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2991</post-id>	</item>
		<item>
		<title>Work in Progress &#8211; Web game</title>
		<link>https://learncgames.com/work-in-progress-web-game/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=work-in-progress-web-game</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 26 Feb 2021 00:00:35 +0000</pubDate>
				<category><![CDATA[Blazor]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[inselkampf]]></category>
		<category><![CDATA[wip]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2757</guid>

					<description><![CDATA[<p>I did some investigative work on this at the weekend, This is my Inselkampf type web game. Although I know C#, I&#8217;m fairly new to ASP.NET and Blazor. Now the first thing you&#8217;ll notice about most Blazor examples on the web is that many look like the screenshot. In particular, the purple gradient down the [&#8230;]</p>
The post <a href="https://learncgames.com/work-in-progress-web-game/">Work in Progress – Web game</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:135,&quot;href&quot;:&quot;https:\/\/dotnet.microsoft.com\/apps\/aspnet\/web-apps\/blazor&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20211208202908\/https:\/\/dotnet.microsoft.com\/apps\/aspnet\/web-apps\/blazor&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:12:02&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-09 21:59:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 16:38:11&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 18:15:28&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-22 03:15:35&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-26 04:32:16&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-02 04:40:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 21:12:26&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-09 01:36:03&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-13 08:37:13&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-17 00:37:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 00:40:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 00:30:33&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-28 05:25:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-01 04:35:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 06:21:44&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-07 16:19:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 02:10:47&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-14 08:11:18&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 17:53:44&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 01:44:27&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 01:44:27&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:142,&quot;href&quot;:&quot;https:\/\/www.freecodecamp.org\/news\/css-example-css3&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251117003357\/https:\/\/www.freecodecamp.org\/news\/css-example-css3\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:13:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 12:38:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-14 01:16:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 00:35:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 12:37:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 04:32:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 04:40:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 00:38:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 20:40:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-15 00:40:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 00:34:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 00:37:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 00:39:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 00:31:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 10:32:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 18:24:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-10 04:27:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 12:17:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 20:12:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 04:04:55&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 04:04:55&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:143,&quot;href&quot;:&quot;https:\/\/gridbyexample.com\/examples&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251206002303\/https:\/\/gridbyexample.com\/examples\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:13:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 12:38:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 16:38:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 18:15:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 20:37:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 00:38:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 00:33:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 00:36:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 02:07:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 00:40:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-18 16:35:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 00:32:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 00:55:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-30 00:39:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-02 20:46:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 04:38:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 12:30:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-12 20:19:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 04:13:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-19 12:06:59&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-19 12:06:59&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:144,&quot;href&quot;:&quot;https:\/\/gridbyexample.com\/examples\/example13&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260130225314\/https:\/\/gridbyexample.com\/examples\/example13\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:13:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 20:36:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 00:35:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 18:15:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 04:34:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 04:24:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 15:02:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 00:39:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 08:30:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 00:37:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 16:56:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 00:40:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 00:30:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 05:25:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-01 04:35:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 12:42:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 20:34:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 10:09:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 18:01:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 04:09:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 12:02:53&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 12:02:53&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img loading="lazy" decoding="async" class="alignleft size-medium wp-image-2758" src="https://learncgames.com/wp-content/uploads/2021/02/blazor-app-300x194.png" alt="Blazor App" width="300" height="194" srcset="https://learncgames.com/wp-content/uploads/2021/02/blazor-app-300x194.png 300w, https://learncgames.com/wp-content/uploads/2021/02/blazor-app-768x497.png 768w, https://learncgames.com/wp-content/uploads/2021/02/blazor-app.png 880w" sizes="auto, (max-width: 300px) 100vw, 300px" />I did some investigative work on this at the weekend, This is my <a title="Link to previous blog entries on Inselkampf" href="https://learncgames.com/?s=inselkampf" target="_blank" rel="nofollow noopener">Inselkampf type web game</a>. Although I know C#, I&#8217;m fairly new to ASP.NET and <a title="Link to Blazor articles on Microsoft.com" href="https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor" target="_blank" rel="nofollow noopener">Blazor</a>. Now the first thing you&#8217;ll notice about most Blazor examples on the web is that many look like the screenshot. In particular, the purple gradient down the left hand side.</p>
<p>So my first job was find out where that&#8217;s defined and try changing it. In the project which is Blazor WebAssembly, there&#8217;s a shared folder and it contains two .css files. MainLayout.razor.css and NavMenu.razor.css. These are the files you need to alter.</p>
<p>Now its probably seven or eight years since I last touched CSS and it has come on quite a bit since then. I discovered css-grid which simplifies things enormously.  If you want to find out more about CSS, take a look on <a title="Link to FreeCodeCamp.org on CSS3" href="https://www.freecodecamp.org/news/css-example-css3/" target="_blank" rel="nofollow noopener">FreeCodeCamp.org</a>. <a title="Link to gridbyexample.com examples" href="https://gridbyexample.com/examples/" target="_blank" rel="nofollow noopener">This site</a> has lots of example layouts using CSS-Grid and I went for <a href="https://gridbyexample.com/examples/example13/">Redefining Grid Areas with Media Queries. </a></p>
<p>This lets you specify a width so you can have a responsive website which adapts to mobile phones as well as desktop. I merged the css and HTML from the example into the project and although its an early stage, I&#8217;m quite pleased with it.</p>
<p><img loading="lazy" decoding="async" class="alignleft size-medium wp-image-2760" src="https://learncgames.com/wp-content/uploads/2021/02/game-framework-300x117.png" alt="Game framework" width="300" height="117" srcset="https://learncgames.com/wp-content/uploads/2021/02/game-framework-300x117.png 300w, https://learncgames.com/wp-content/uploads/2021/02/game-framework-1024x400.png 1024w, https://learncgames.com/wp-content/uploads/2021/02/game-framework-768x300.png 768w, https://learncgames.com/wp-content/uploads/2021/02/game-framework.png 1081w" sizes="auto, (max-width: 300px) 100vw, 300px" /> This is very early. The font, colours etc will all change but this has given me a web template with round corners, header, footer and two sidebars.</p>
<p>If I shrink the width of the browser the two sidebars move to positions above and below the main content like this below. It would have taken a lot more effort before css-grid to do this.</p>
<p><img loading="lazy" decoding="async" class="alignleft wp-image-2766 size-medium" src="https://learncgames.com/wp-content/uploads/2021/02/narrow-game-framework-1-300x196.png" alt="Narrow game framework" width="300" height="196" srcset="https://learncgames.com/wp-content/uploads/2021/02/narrow-game-framework-1-300x196.png 300w, https://learncgames.com/wp-content/uploads/2021/02/narrow-game-framework-1.png 649w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/work-in-progress-web-game/">Work in Progress – Web game</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2757</post-id>	</item>
		<item>
		<title>An interesting project- Converting BASIC Computer Games</title>
		<link>https://learncgames.com/an-interesting-project-converting-basic-computer-games/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-interesting-project-converting-basic-computer-games</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Mon, 22 Feb 2021 00:00:57 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[book]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2719</guid>

					<description><![CDATA[<p>Yes it&#8217;s that book again, one I have mentioned a few times.  Now there&#8217;s a project to convert all of the games from the book into C#, Java, JavaScript, Python, Ruby and VB.NET. As with all Git sites, you can download all code from the site in a zip file or individual files. So far [&#8230;]</p>
The post <a href="https://learncgames.com/an-interesting-project-converting-basic-computer-games/">An interesting project- Converting BASIC Computer Games</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:152,&quot;href&quot;:&quot;https:\/\/github.com\/coding-horror\/basic-computer-games&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251207040248\/https:\/\/github.com\/coding-horror\/basic-computer-games&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:20:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 20:35:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 00:35:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 08:38:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-22 18:20:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 04:24:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 00:39:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 10:44:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 12:22:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 00:31:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 00:37:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-20 16:39:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 17:52:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 00:36:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-01 04:35:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 12:42:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 14:49:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 16:32:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 00:34:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 12:09:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 20:02:14&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 20:02:14&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img loading="lazy" decoding="async" class="alignleft size-medium wp-image-884" src="https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames-244x300.jpg" alt="Basic Computer games book" width="244" height="300" srcset="https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames-244x300.jpg 244w, https://learncgames.com/wp-content/uploads/2020/06/basiccomputergames.jpg 355w" sizes="auto, (max-width: 244px) 100vw, 244px" />Yes it&#8217;s that book again, one <a title="Link to blog entry about BASIC Computer games" href="https://learncgames.com/added-the-sources-of-another-game/" target="_blank" rel="nofollow noopener">I have mentioned a few times.</a>  Now there&#8217;s <a title="Link to GitHub project to convert BASIC Computer games" href="https://github.com/coding-horror/basic-computer-games" target="_blank" rel="nofollow noopener">a project</a> to convert all of the games from the book into C#, Java, JavaScript, Python, Ruby and VB.NET. As with all Git sites, you can download all code from the site in a zip file or individual files. So far though its very early in the project and there&#8217;s only a .BAS file in each of the subfolders for each of the games in the book. If you fancy getting involved, pick a game, a language and start coding. Sadly there&#8217;s no desire for C or C++ but that still leaves C# .</p>
<p>I still have this book and its sequel (<em>More BASIC Computer games!</em>) but to be honest I wouldn&#8217;t have bothered with most of the games in either book. They are all very much of the era (1978) which was just on the cusp of the home computer revolution and so were mostly obsolete within seven or eight years, due mainly to the terminal I/O. They&#8217;re ok for learning programming and of course you could run them in a Linux terminal.</p>The post <a href="https://learncgames.com/an-interesting-project-converting-basic-computer-games/">An interesting project- Converting BASIC Computer Games</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2719</post-id>	</item>
	</channel>
</rss>
