<?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>chain reaction | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/chain-reaction/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, 29 Dec 2020 15:06:04 +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>chain reaction | 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>Thinking about future C tutorials</title>
		<link>https://learncgames.com/thinking-about-future-c-tutorials/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thinking-about-future-c-tutorials</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 30 Dec 2020 00:00:32 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[atoms]]></category>
		<category><![CDATA[chain reaction]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2229</guid>

					<description><![CDATA[<p>The tutorials I&#8217;ve done have followed a fairly &#8220;standard&#8221; model. Learn a feature, learn a new feature and so on. But what if this isn&#8217;t the best way to try and teach C? I can&#8217;t remember how I learnt C. I&#8217;m not actually sure that I did which sounds weird but I learnt C++ nearly [&#8230;]</p>
The post <a href="https://learncgames.com/thinking-about-future-c-tutorials/">Thinking about future C tutorials</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;:285,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/anandkz-3271136\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2111539&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;:286,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2111539&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 13:29:54&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-13 03:33:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-23 16:08:35&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-28 04:10:04&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 16:22:22&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-10 06:34:14&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-03 10:42:47&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-15 09:30:07&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-15 09:30:07&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:287,&quot;href&quot;:&quot;https:\/\/www.reddit.com\/r\/C_Programming\/comments\/kl2l0b\/what_do_you_guys_think_its_the_best_way_to&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20230617023700\/https:\/\/www.reddit.com\/r\/C_Programming\/comments\/kl2l0b\/what_do_you_guys_think_its_the_best_way_to\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:29:56&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-13 03:33:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 16:08:35&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-28 04:10:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 16:22:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-10 06:34:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 10:35:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 09:30:07&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-15 09:30:07&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_2232" aria-describedby="caption-attachment-2232" style="width: 300px" class="wp-caption alignleft"><img fetchpriority="high" decoding="async" class="size-medium wp-image-2232" src="https://learncgames.com/wp-content/uploads/2020/12/molecules-2111539_640-300x169.jpg" alt="Molcules" width="300" height="169" srcset="https://learncgames.com/wp-content/uploads/2020/12/molecules-2111539_640-300x169.jpg 300w, https://learncgames.com/wp-content/uploads/2020/12/molecules-2111539_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-2232" class="wp-caption-text">Image by <a href="https://pixabay.com/users/anandkz-3271136/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2111539">Anand Kumar</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2111539">Pixabay</a></figcaption></figure>
<p>The tutorials I&#8217;ve done have followed a fairly &#8220;standard&#8221; model. Learn a feature, learn a new feature and so on. But what if this isn&#8217;t the best way to try and teach C?</p>
<p>I can&#8217;t remember how I learnt C. I&#8217;m not actually sure that I did which sounds weird but I learnt C++ nearly 28 years ago (<em>I bought a book on C++ programming while on a weekend holiday in York</em>). I learnt more C++ four years later when I was working on a football game. That project lasted six months and then the designer of the game decided to visit India and never came back and the whole thing fell though.</p>
<p>Fast forward to 2006 when I started writing the About C, C++ and C# column for about.com. Because I knew C++, I sort of knew C without explicitly having learnt it, Back then C++ was a superset of C. It still mostly is but there is the odd divergence.</p>
<p>This morning I was reading <a title="Link to best way to learn thread in the C Reddit" href="https://www.reddit.com/r/C_Programming/comments/kl2l0b/what_do_you_guys_think_its_the_best_way_to/" target="_blank" rel="nofollow noopener">this thread on reddit</a>. &#8220;<em>What do you guys think its the best way to improve your coding</em>?&#8221; and it got me thinking about the C tutorials. I know that I like to learn by working on small projects. Most games are too big for a tutorial (heck you can get a book out of them).</p>
<p>So I got to thinking, what is a simple game that would make for a good set of C tutorials? I even dug out the two books <strong>BASIC Computer games</strong> and <strong>More BASIC Computer games </strong>for inspiration. However in the end I decided on the game atoms. Here are the rules.</p>
<h3>Rules for Atoms (aka Chain Reaction)</h3>
<p>This takes place on an 8 x 8 board. Each turn you and then your opponent. Add 1 to any cell on the board. At the start all cells are empty with a value of 0. When you add 1 to a cell, it turns red or blue if the computer is playing. If a cell reaches 4 then it is cleared to 0 and all four cells around it (horizontal and vertical) have 1 added to them and become the player&#8217;s colour.  Cells in the corner only need to reach 2 to explode while cells at edges need 3.</p>
<p>When there are enough atoms on the board, a chain reaction can take place and you win if your atoms replace your opponents or lose in the opposite case.</p>
<p>To keep the tutorials simple this will be a console game. Each cell will be blank or show the number of atoms in the cell followed by a C (for computer) or P for Player instead of colours.  I&#8217;ll start the first tutorial tomorrow.</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/thinking-about-future-c-tutorials/">Thinking about future C tutorials</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">2229</post-id>	</item>
	</channel>
</rss>
