<?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>demo | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/demo/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>Sat, 28 Mar 2020 16:49:44 +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>demo | 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>Linux E-book Progress</title>
		<link>https://learncgames.com/linux-e-book-progress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linux-e-book-progress</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 28 Mar 2020 00:00:44 +0000</pubDate>
				<category><![CDATA[Ebook]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[demo]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=252</guid>

					<description><![CDATA[<p>My Linux rewrite continues with progress as far as chapter 38. This is the first Linux version of asteroids on the left and is a demo of the text writing routines and also loading images from files. It;s drawing all digits from 0 to 99 at random locations on the screen every frame. The number [&#8230;]</p>
The post <a href="https://learncgames.com/linux-e-book-progress/">Linux E-book Progress</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;:14,&quot;href&quot;:&quot;https:\/\/github.com\/David-H-Bolton\/LearnCOnLinux&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250213114627\/https:\/\/github.com\/David-H-Bolton\/LearnCOnLinux&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 10:35:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-09 16:40:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 18:24:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 22:16:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-18 22:19:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-21 22:22:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-25 04:17:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 04:17:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 04:22:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 04:38:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 08:48:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 09:17:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 10:18:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-18 12:43:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 15:14:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-24 15:19:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-27 16:38:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-30 19:05:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-02 19:29:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 21:51:33&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-05 21:51:33&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-253 alignleft" src="https://learncgames.com/wp-content/uploads/2020/03/chapter28.png" alt="Screenshot of the chapter 28 executable" width="600" height="469" srcset="https://learncgames.com/wp-content/uploads/2020/03/chapter28.png 600w, https://learncgames.com/wp-content/uploads/2020/03/chapter28-300x235.png 300w" sizes="(max-width: 600px) 100vw, 600px" />My Linux rewrite continues with progress as far as chapter 38.</p>
<p>This is the first Linux version of asteroids on the left and is a demo of the text writing routines and also loading images from files.</p>
<p>It;s drawing all digits from 0 to 99 at random locations on the screen every frame.</p>
<p>The number at the top is how long it takes to output the text. That value if you can&#8217;t read it is 0.000622, which means it takes 622 microseconds to output 100 numbers or 6.22 micro-seconds each.</p>
<p>This is the routine that does that.</p>
<pre><code class="language-c" data-line="">void RenderEveryThing() {
	int atX, atY;

	renderTexture(textures[PLBACKDROP], 0, 0);
	startTimer(&amp;s);
	for (int i=0;i&lt;100;i++) {
		atX = Random(WIDTH-50) + 1;
		atY = Random(HEIGHT) + 20;
		TextAt(atX, atY, SDL_ltoa(i,buffer,10));
	}	
	stopTimer(&amp;s);
	SDL_RenderPresent(renderer);
	frameCount++;
	UpdateCaption();
}</code></pre>
<p>The most recent uploaded code version (chapter 37) lets you move the player&#8217;s ship around (press q, w or ctrl) , fire bullets (space bar), press a to see random asteroids rotating and moving round (and off) the screen. Press the b key to blow up a few asteroids with explosions and sounds. Enjoy!</p>
<p>Zipped up source code, graphics etc from the forthcoming Linux book can be downloaded from <a href="https://github.com/David-H-Bolton/LearnCOnLinux" target="_blank" rel="noopener noreferrer">Github</a>.</p>The post <a href="https://learncgames.com/linux-e-book-progress/">Linux E-book Progress</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">252</post-id>	</item>
	</channel>
</rss>
