<?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>Blazor | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/blazor/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>Tue, 02 Mar 2021 10:41:57 +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>Blazor | 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>More notes on my Webassembly web development with Blazor</title>
		<link>https://learncgames.com/more-notes-on-my-webassembly-web-development-with-blazor/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-notes-on-my-webassembly-web-development-with-blazor</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 02 Mar 2021 00:00:48 +0000</pubDate>
				<category><![CDATA[Blazor]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2801</guid>

					<description><![CDATA[<p>This is another post in the Inselkampf series. Having spent much of my career creating &#8220;desktop&#8221; application, web always feels a bit different. If it&#8217;s a website then HTML/CSS/PHP + MySql is a reasonable way of working. But when its a web application like a browser game that uses a SQL database, then there&#8217;s a [&#8230;]</p>
The post <a href="https://learncgames.com/more-notes-on-my-webassembly-web-development-with-blazor/">More notes on my Webassembly web development with Blazor</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;:133,&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=4636686&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 12:11:58&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 08:53:53&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-15 13:12:19&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-23 08:45:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 16:41:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-06 14:36:37&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-15 08:04:58&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-30 06:15:52&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-03 02:34:35&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-06 10:26:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-09 18:14:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-13 10:05:24&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 01:55:40&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-20 09:45:45&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 09:45:45&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:134,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4636686&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 12:12:00&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 08:53:54&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-15 13:12:22&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-23 08:45:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 16:41:34&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-06 14:36:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-15 08:04:57&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-30 06:15:52&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-03 02:34:32&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-06 10:26:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-09 18:14:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-13 10:05:27&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-17 01:55:38&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-20 09:07:26&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 09:07:26&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&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;:136,&quot;href&quot;:&quot;https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260204212147\/https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:12:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-09 21:59:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-12 22:35:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 18:15:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 08:45:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-28 12:51:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 14:36:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-15 08:04:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 06:15:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 02:34:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 10:26:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 18:14:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 02:06:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 17:56:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 14:54:22&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 14:54:22&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:137,&quot;href&quot;:&quot;https:\/\/msgpack.org\/index.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260206121511\/https:\/\/msgpack.org\/index.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:54:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 08:53:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 18:15:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 08:45:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 19:22:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 14:36:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 08:04:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-30 06:15:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 02:34:41&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-06 10:26:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 18:14:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-13 10:05:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 01:55:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 09:45:53&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 09:45:53&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:138,&quot;href&quot;:&quot;https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-5.0#:~:text=With%20the%20Blazor%20Server%20hosting,Server%2Dside%20services.&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20220815211219\/https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-5.0&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:12:11&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-02-06 12:12:11&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:139,&quot;href&quot;:&quot;https:\/\/www.virtualmin.com&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260115103406\/https:\/\/www.virtualmin.com\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:12:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-09 21:59:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 13:12:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 18:15:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 13:36:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 14:36:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 08:05:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-30 06:15:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 02:34:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 10:26:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 18:14:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-13 02:06:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 17:56:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 01:47:28&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 01:47:28&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_2802" aria-describedby="caption-attachment-2802" style="width: 300px" class="wp-caption alignleft"><img decoding="async" class="size-medium wp-image-2802" src="https://learncgames.com/wp-content/uploads/2021/02/network-4636686_640-300x129.jpg" alt="Web networking" width="300" height="129" srcset="https://learncgames.com/wp-content/uploads/2021/02/network-4636686_640-300x129.jpg 300w, https://learncgames.com/wp-content/uploads/2021/02/network-4636686_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-2802" 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=4636686">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4636686">Pixabay</a></figcaption></figure>
<p>This is another post in the <a title="Link to posts with Inselkampf in them" href="https://learncgames.com/?s=Inselkampf" target="_blank" rel="nofollow noopener">Inselkampf series</a>. Having spent much of my career creating &#8220;desktop&#8221; application, web always feels a bit different. If it&#8217;s a website then HTML/CSS/PHP + MySql is a reasonable way of working. But when its a web application like a browser game that uses a SQL database, then there&#8217;s a bit of architecting involved.</p>
<p>I&#8217;m using <a title="Link to Microsoft.com on Blazor" href="https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor" target="_blank" rel="nofollow noopener">Blazor</a> because it lets me write C# that runs in the browser. I&#8217;ve never been a JavaScript fan though I realise many people are. I also have to use database. As I&#8217;ve said before Blazor gives you two choices- The WebAssembly version that runs completely in the browser and the Server version that talks to a server using a protocol called SignalR.</p>
<p>I&#8217;m trying to be clever by using the WebAssembly version but having the C# talk to a <a title="Link to Wikipedia about Restful" href="https://en.wikipedia.org/wiki/Representational_state_transfer" target="_blank" rel="nofollow noopener">restful interface</a>. Restful just means it has a bunch of http calls to do things like update, fetch data, login etc. On the server runs a ASP.NET program implementing this. It&#8217;s headless, as in its not outputting any webpages to the browser but just returns data in JSON (or maybe <a title="Link to msgpack.org" href="https://msgpack.org/index.html" target="_blank" rel="nofollow noopener">MessagePack</a>).</p>
<p>This avoids having a SignalR connection for every user logged into the site which is one way to bring a server to its knees. When you create a Blazor Server application, it has a few disadvantages. As <a title="Link to Docs.Microsoft.com on Blazor server" href="https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-5.0#:~:text=With%20the%20Blazor%20Server%20hosting,Server%2Dside%20services." target="_blank" rel="nofollow noopener">Microsoft says</a>: when you use Blazor server.</p>
<ul>
<li>Higher latency usually exists. Every user interaction involves a network hop.</li>
<li>There&#8217;s no offline support. If the client connection fails, the app stops working.</li>
<li>Scalability is challenging for apps with many users. The server must manage multiple client connections and handle client state.</li>
<li>An ASP.NET Core server is required to serve the app. Serverless deployment scenarios aren&#8217;t possible, such as serving the app from a Content Delivery Network (CDN).</li>
</ul>
<p>I&#8217;m also not using the Microsoft authentication but rolling my own. Yes it&#8217;s possibly not perfect but I&#8217;ve done it before. This way I get to generate recovery numbers. (<em>Both GitHub and Gmail offer these</em>). A bunch of one off codes that are used to authenticate you, if you&#8217;ve lost your password or messed up your email then you login with your account number and an authentication code. This is the only way you get to change email and/or password. You just have to keep the codes safe.</p>
<h3>Rolling my own Interface</h3>
<p>So things like logging in, getting current status, updating game play are all done by making a call to an HTTPS routine. This is all behind the scenes so players see nothing. Values are sent as POST parameters and also include a <strong>nonce</strong>. This word (<em>that unfortunately means sex offender in UK English!)</em> , refers to a special code that has to be supplied with each call to the server to authenticate it. Successful logging in returns a nonce that has to be added as a parameter with every call to the server.</p>
<p>The program on the server that serves the restful calls is a simple ASP.NET Razor pages application (<em>Well maybe Razor, I&#8217;m not sure if I need them</em>). Behind the scenes I&#8217;m using MySQL which was installed as part of <a title="Link to VirtualMin.com" href="https://www.virtualmin.com/" target="_blank" rel="nofollow noopener">VirtualMin</a> (<em>the excellent software I use to setup the VPS</em>).</p>The post <a href="https://learncgames.com/more-notes-on-my-webassembly-web-development-with-blazor/">More notes on my Webassembly web development with Blazor</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">2801</post-id>	</item>
		<item>
		<title>Web development- learning Blazor</title>
		<link>https://learncgames.com/web-development-learning-blazor/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=web-development-learning-blazor</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 11 Feb 2021 00:00:01 +0000</pubDate>
				<category><![CDATA[Blazor]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[PBBG]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2649</guid>

					<description><![CDATA[<p>I&#8217;ve talked about Inselkampf in a previous post. it was an example of a PBBG (Persistent Browser Based Game).  Currently if you want to write a web application that updates part of a page without refreshing itself, you have to do it via a JavaScript toolkit. People have been doing this going back about 15 [&#8230;]</p>
The post <a href="https://learncgames.com/web-development-learning-blazor/">Web development- learning Blazor</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;:185,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/kreatikar-8562930\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3411373&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;:186,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3411373&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;:187,&quot;href&quot;:&quot;https:\/\/www.reddit.com\/r\/PBBG&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251222130551\/https:\/\/www.reddit.com\/r\/PBBG\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:31:54&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-11 03:29:39&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-18 18:15:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 01:35:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 15:03:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 01:01:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 11:48:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-15 08:05:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 04:06:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 18:32:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 02:23:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 14:45:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 10:02:07&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-18 01:53:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 09:43:20&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 09:43:20&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_2650" aria-describedby="caption-attachment-2650" style="width: 300px" class="wp-caption alignleft"><img fetchpriority="high" decoding="async" class="size-medium wp-image-2650" src="https://learncgames.com/wp-content/uploads/2021/02/webdesign-3411373_640-300x200.jpg" alt="Web pages" width="300" height="200" srcset="https://learncgames.com/wp-content/uploads/2021/02/webdesign-3411373_640-300x200.jpg 300w, https://learncgames.com/wp-content/uploads/2021/02/webdesign-3411373_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-2650" class="wp-caption-text">Image by <a href="https://pixabay.com/users/kreatikar-8562930/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3411373">Mudassar Iqbal</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3411373">Pixabay</a></figcaption></figure>
<p>I&#8217;ve talked about <a title="Link to post about Inselkampf" href="https://learncgames.com/thinking-about-my-inselkampf-reimagination/" target="_blank" rel="nofollow noopener">Inselkampf</a> in a previous post. it was an example of a <a title="Link to the PBBG subreddit" href="https://www.reddit.com/r/PBBG/" target="_blank" rel="nofollow noopener">PBBG</a> (Persistent Browser Based Game).  Currently if you want to write a web application that updates part of a page without refreshing itself, you have to do it via a JavaScript toolkit. People have been doing this going back about 15 years or so initially using a technology called AJAX.</p>
<p>Refreshing an entire web page takes a few seconds- some of the pages have got really big what with trackers and other things that bloat them up. So being able to update just part is a massive time saver plus it looks good.  Browser games couldn&#8217;t work without it.</p>
<p>Blazor takes things further by letting you update parts of pages, controls but in C#. There are two types of Blazor. WebAssembly (the machine code of the web) which does everything in the browser. It&#8217;s how the <a title="Link to post about new game platform" href="https://learncgames.com/a-newish-game-platform/" target="_blank" rel="nofollow noopener">trains</a> program works. The other type uses a server and does everything server side (controls and data) then sends it to the browser to be rendered.</p>
<p>For my purposes, the WebAssembly one is better. If you have a lot of people connected to a server then the Blazor server can use a fair whack of server resources. Th Blazor WebAssembly will also connect to the server but just to fetch or update data. So I&#8217;ve bought a Udemy course and am soaking up Blazor.</p>
<p>There&#8217;s still all sorts of questions. For example keeping the tick in synch. PBBG games often have a clock where new resources, building construction happen after a few seconds or longer. If you do this on the server then it&#8217;s not so difficult if the browser gets disconnected. In the browser though, it has to update the server or come up with some scheme so the browser and server don&#8217;t drift part. These are all part of the fun designing and programming such games. But I definitely think Blazor offers a lot of potential here.</p>The post <a href="https://learncgames.com/web-development-learning-blazor/">Web development- learning Blazor</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">2649</post-id>	</item>
		<item>
		<title>Amazing multi-platform Asteroids in C#</title>
		<link>https://learncgames.com/amazing-multi-platform-asteroids-in-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazing-multi-platform-asteroids-in-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 06 Feb 2021 00:00:08 +0000</pubDate>
				<category><![CDATA[Blazor]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[asteroids]]></category>
		<category><![CDATA[cross-platform]]></category>
		<category><![CDATA[wasm]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2608</guid>

					<description><![CDATA[<p>Asteroids was the first full arcade game I ever wrote in C. Asteroids in C# takes things to a whole new level.  The solution contains 12 projects in all: Three Blazor projects, a WinForms version, a WPF version, a UWP (Universal Windows Platform) and a Xamarin Android Forms version (shown). You can compile and run [&#8230;]</p>
The post <a href="https://learncgames.com/amazing-multi-platform-asteroids-in-c/">Amazing multi-platform Asteroids 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;:199,&quot;href&quot;:&quot;https:\/\/github.com\/aesalazar\/AsteroidsWasm&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260114025816\/https:\/\/github.com\/aesalazar\/AsteroidsWasm&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:44:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 10:18:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 19:42:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 19:32:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 02:11:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 13:36:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 14:36:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 03:15:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 12:44:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 21:24:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 16:01:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 03:51:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 00:40:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-13 00:41:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 23:23:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 01:38:43&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 01:38:43&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:200,&quot;href&quot;:&quot;https:\/\/docs.microsoft.com\/en-us\/xamarin\/xamarin-forms\/user-interface\/graphics\/skiasharp\/#:~:text=SkiaSharp%20is%20a%202D%20graphics,graphics%2C%20bitmaps%2C%20and%20text.&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20220904010537\/https:\/\/docs.microsoft.com\/en-us\/xamarin\/xamarin-forms\/user-interface\/graphics\/skiasharp\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:44:16&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-02-06 12:44:16&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img decoding="async" class="alignleft size-full wp-image-2609" src="https://learncgames.com/wp-content/uploads/2021/02/android-asteroids.png" alt="Android asteroids" width="395" height="838" srcset="https://learncgames.com/wp-content/uploads/2021/02/android-asteroids.png 395w, https://learncgames.com/wp-content/uploads/2021/02/android-asteroids-141x300.png 141w" sizes="(max-width: 395px) 100vw, 395px" />Asteroids was the first full arcade game I ever wrote in C. <a title="Link to C# Asteroids on GitHub" href="https://github.com/aesalazar/AsteroidsWasm" target="_blank" rel="nofollow noopener">Asteroids in C#</a> takes things to a whole new level.  The solution contains 12 projects in all: Three Blazor projects, a WinForms version, a WPF version, a UWP (<em>Universal Windows Platform</em>) and a Xamarin Android Forms version (shown).</p>
<p>You can compile and run any of the projects though you will need to install and setup a suitable SDK and emulated (<em>or a real device</em>) for the Android.</p>
<p>Written by Howard Uman and ported by Ernie Salazar, this is a wireframe asteroids, more true to the original than my own raster version. Out of curiosity, I created an Android 9.0 emulator (<em>I don&#8217;t have a recent Android phone)</em> and compiled then deployed it to the emulator. The screenshot is grabbed directly from the emulator which has a less than ideal screen ratio. This would work better on a tablet.</p>
<p>The structure of the C# Solution is interesting. All of the game code is in the Base project. All of the other platforms just host the main game window. The game uses the <a title="Link to SkiaSharp documentation" href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/#:~:text=SkiaSharp%20is%20a%202D%20graphics,graphics%2C%20bitmaps%2C%20and%20text." target="_blank" rel="nofollow noopener">SkiaSharp</a> graphics framework for Android Forms.</p>
<p>This is a very nice open source project and an excellent way to see how Blazor works in both Wasm and Server mode, not to mention the Android, WinForms/WPF and UWP versions.</p>
<p>I have an interest in Blazor which lets you write C# code that runs in the browser very easily.  With a bit of workj, this should be runnable on a Linux webserver as well. Something for me to try&#8230;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/amazing-multi-platform-asteroids-in-c/">Amazing multi-platform Asteroids 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">2608</post-id>	</item>
		<item>
		<title>A newish game platform</title>
		<link>https://learncgames.com/a-newish-game-platform/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-newish-game-platform</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sun, 24 Jan 2021 00:00:30 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Blazor]]></category>
		<category><![CDATA[Games]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2484</guid>

					<description><![CDATA[<p>Web games have been largely Flash in the past though that took a nosedive in the &#8216;tens (2010 onwards) and Flash is officially no more as of 2021. The spirit lives on in JavaScript games and there are innumerable games in JavaScript. That said, I&#8217;ve never been that keen on JavaScript. I talked about Web [&#8230;]</p>
The post <a href="https://learncgames.com/a-newish-game-platform/">A newish game platform</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;:232,&quot;href&quot;:&quot;https:\/\/awesomeopensource.com\/project\/AdrienTorris\/awesome-blazor&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250613201344\/https:\/\/awesomeopensource.com\/project\/AdrienTorris\/awesome-blazor&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:01:48&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-11 04:54:05&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 17:07:41&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-27 12:36:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-03 06:13:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-26 18:32:14&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-05 09:19:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-14 19:13:11&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-14 19:13:11&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:233,&quot;href&quot;:&quot;https:\/\/wengier.com\/trains2\/play.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20210917120832\/https:\/\/wengier.com\/trains2\/play.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:01:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 04:54:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 17:07:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 06:13:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 02:32:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 18:32:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 09:19:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 19:13:11&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-14 19:13:11&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-2485" src="https://learncgames.com/wp-content/uploads/2021/01/Blazor_dungeon-300x183.png" alt="Blazor Dungoon" width="300" height="183" srcset="https://learncgames.com/wp-content/uploads/2021/01/Blazor_dungeon-300x183.png 300w, https://learncgames.com/wp-content/uploads/2021/01/Blazor_dungeon-768x469.png 768w, https://learncgames.com/wp-content/uploads/2021/01/Blazor_dungeon.png 837w" sizes="auto, (max-width: 300px) 100vw, 300px" />Web games have been largely Flash in the past though that took a nosedive in the &#8216;tens (<em>2010 onwards</em>) and Flash is officially no more as of 2021. The spirit lives on in JavaScript games and there are innumerable games in JavaScript. That said, I&#8217;ve never been that keen on JavaScript. I talked about Web games in a <a title="Link to post on Web games" href="https://learncgames.com/i-like-web-games/" target="_blank" rel="nofollow noopener">post back in December</a> and particularly that I saw Blazor as a possible game platform.</p>
<p>Today though I discovered <a title="Link to awesome Blazor on GitHub" href="https://awesomeopensource.com/project/AdrienTorris/awesome-blazor" target="_blank" rel="nofollow noopener">Awesome Blazor</a> on GitHub and it includes 18 Blazor web games including a multiplayer dungeon which is shown (I think it looks like a bit Pacmanish personally) . Most of these are ASP .NET Core 3.1 (<em>which became .NET 5 late last year</em>).</p>
<p>Some games will use wasm (<em>Web Assembly</em>) while other use C# in a terminal. As a simple proof of concept but nicely done, have a look at the <a title="Link to online train set" href="https://wengier.com/trains2/play.html" target="_blank" rel="nofollow noopener">virtual train set</a> online.  You can lay track and then run one or more trains along it. Impressive as a demonstration of what you can do with C# and Blazor in a browser.</p>The post <a href="https://learncgames.com/a-newish-game-platform/">A newish game platform</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">2484</post-id>	</item>
	</channel>
</rss>
