<?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>pacman | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/pacman/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, 25 Dec 2020 11:26:25 +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>pacman | 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>Pacman in C99 that runs in the browser</title>
		<link>https://learncgames.com/pacman-in-c99-that-runs-in-the-browser/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pacman-in-c99-that-runs-in-the-browser</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 25 Dec 2020 00:00:48 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[pacman]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2164</guid>

					<description><![CDATA[<p>Such a simple game yet still incredibly popular. Pacman is now 40 years old. I must confess, its not one that I was great at (that would be Battle Zone- the 3D wireframe tanks on the moon game- I could play that for an hour for just 10p), This cross-platform implementation by German programmer Andre [&#8230;]</p>
The post <a href="https://learncgames.com/pacman-in-c99-that-runs-in-the-browser/">Pacman in C99 that runs in the browser</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;:302,&quot;href&quot;:&quot;https:\/\/floooh.github.io\/pacman.c\/pacman.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251230203012\/https:\/\/floooh.github.io\/pacman.c\/pacman.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:42:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 18:44:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:45:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 12:16:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 21:12:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 21:03:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:35:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 10:42:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-08 22:30:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 19:13:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 19:42:58&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 19:42:58&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:303,&quot;href&quot;:&quot;https:\/\/github.com\/floooh\/sokol&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260204205102\/https:\/\/github.com\/floooh\/sokol&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:42:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 02:04:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:45:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 12:16:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 21:12:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 21:03:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:35:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-02 23:47:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-08 22:30:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 19:13:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 19:42:59&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 19:42:59&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:304,&quot;href&quot;:&quot;https:\/\/github.com\/nothings\/stb\/blob\/master\/docs\/stb_howto.txt&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260128024832\/https:\/\/github.com\/nothings\/stb\/blob\/master\/docs\/stb_howto.txt&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:43:47&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-02-13 02:04:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:45:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 12:16:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 21:12:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 21:03:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:35:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 10:42:45&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-04-08 22:30:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 19:13:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 19:43:01&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 19:43:01&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:305,&quot;href&quot;:&quot;https:\/\/github.com\/nothings\/stb&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205001936\/https:\/\/github.com\/nothings\/stb&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:43:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 02:04:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 12:45:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 12:16:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 21:12:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 21:03:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:35:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 10:35:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-08 22:30:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 19:13:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 19:42:59&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 19:42:59&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-2166" src="https://learncgames.com/wp-content/uploads/2020/12/pacman-251x300.png" alt="Pacman" width="251" height="300" srcset="https://learncgames.com/wp-content/uploads/2020/12/pacman-251x300.png 251w, https://learncgames.com/wp-content/uploads/2020/12/pacman.png 636w" sizes="(max-width: 251px) 100vw, 251px" />Such a simple game yet still incredibly popular. Pacman is now 40 years old. I must confess, its not one that I was great at (<em>that would be Battle Zone- the 3D wireframe tanks on the moon game- I could play that for an hour for just 10p</em>),</p>
<p>This cross-platform implementation by German programmer Andre Weissflog (aka Flooh) looks spot on and<a title="Link to online version of Pacman" href="https://floooh.github.io/pacman.c/pacman.html" target="_blank" rel="nofollow noopener"> plays it as well</a>. Most of the game has been implemented in one C source file and its definitely worth reading the comments at the top of that file to see how things are done.</p>
<p>For instance &#8220;audio output works through an actual Namco WSG emulator which generates sound samples for 3 hardware voices from a 20-bit frequency counter,  4-bit volume and 3-bit wave type (for 8 wavetables made of 32 sample values each stored in a ROM dump)&#8221;.</p>
<p>The game uses the author&#8217;s <a title="Link to Sokol libraries on GitHub" href="https://github.com/floooh/sokol" target="_blank" rel="nofollow noopener">Sokol libraries</a> which are Simple <a href="https://github.com/nothings/stb/blob/master/docs/stb_howto.txt">STB-style</a> cross-platform libraries for C and C++, written in C. It&#8217;s the first time I'[d come across these and they&#8217;re worthy of a separate look at. <a title="Link to STB Single files library on GitHub" href="https://github.com/nothings/stb" target="_blank" rel="nofollow noopener">STB</a> is a another library that I&#8217;ll also look at in the future. I&#8217;ve added a link to this Pacman to the C Code library. <strong>Happy Christmas!</strong></p>
<p>PS. Also included in the GitHub download is The Pac-man dossier by Jamey Pittman, which is a 48 page PDF and tells you everything about playing Pacman. Stuff like the logic of gameplay, mechanics, easter eggs and the hardware specs of the original game boards not to mention the infamous level 255 overflow.</p>
<p>Interestingly the original hardware was a 3MHZ Z80A with 2 KB of RAM and 16KB of ROM on a 224 x 288 16 colour screen .</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/pacman-in-c99-that-runs-in-the-browser/">Pacman in C99 that runs in the browser</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">2164</post-id>	</item>
	</channel>
</rss>
