<?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>resource manager | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/resource-manager/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, 28 Apr 2020 10:10:53 +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>resource manager | 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>Another mini project &#8211; a resource manager</title>
		<link>https://learncgames.com/another-mini-project-a-resource-manager/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=another-mini-project-a-resource-manager</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 07 May 2020 23:00:53 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[resource manager]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=543</guid>

					<description><![CDATA[<p>In my ebook I talked about professional games using a resource manager. Games like Quake 2 use a .pak file which stores all images, levels etc. The first stage towards writing a resource manager is to have some way of compressing files. Most graphic file formats such as jpg, gif and png are already compressed. [&#8230;]</p>
The post <a href="https://learncgames.com/another-mini-project-a-resource-manager/">Another mini project – a resource manager</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;:541,&quot;href&quot;:&quot;https:\/\/www.libsdl.org\/projects\/SDL_image&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260204203014\/https:\/\/libsdl.org\/projects\/SDL_image\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 15:57:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 02:51:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 09:33:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 14:31:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-21 12:06:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 15:37:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 03:16:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 22:55:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 09:13:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 09:10:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 21:38:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 18:33:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 10:10:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-29 10:16:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-02 02:13:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 11:55:42&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-05 11:55:42&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:737,&quot;href&quot;:&quot;https:\/\/gamedev.stackexchange.com\/questions\/131138\/how-to-pass-png-image-data-directly-to-sdl&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20241127183904\/https:\/\/gamedev.stackexchange.com\/questions\/131138\/how-to-pass-png-image-data-directly-to-sdl&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 18:05:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-12 05:10:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 23:29:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 21:48:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 10:52:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 22:55:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 18:18:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 18:45:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 04:29:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 15:39:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-02 02:13:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-05 11:55:42&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-05 11:55:42&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft size-full wp-image-544" src="https://learncgames.com/wp-content/uploads/2020/04/castle.png" alt="Castle image" width="288" height="209" />In my ebook I talked about professional games using a resource manager. Games like Quake 2 use a .pak file which stores all images, levels etc. The first stage towards writing a resource manager is to have some way of compressing files. Most graphic file formats such as jpg, gif and png are already compressed. But other files like level files aren&#8217;t, typically text and so will compress well.</p>
<p>So a resource manager if it understands the type of resources it is handling can compress or not according to the file type. It will bundle everything into one archive file, and maintain a simple directory indicating where in the archive file each resource file starts, length and type.</p>
<p>However there is the issue of security. The idea of the resource manager is to protect your assets. I have two old games from the Dos days (<em>bought recently on gog.com and playable in Windows</em>)  and a quick glance in the games folder shows some interesting files! That&#8217;s one of them shown above. It&#8217;s parts of a castle. There are hundreds of graphic files just lying there in the open. They are in an older graphic format (.pcx) but <a title="Link to SDL2_Image webpage" href="https://www.libsdl.org/projects/SDL_image/" target="_blank" rel="noopener noreferrer">SDL2_image</a> can read those quite happily.</p>
<p>So not only should a resource manager protect your files, it should obscure them so anyone inspecting them with a binary file editor can&#8217;t easily spot them.</p>
<p>That brings me to the 2nd point about security. Your program has to be able to use the resources directly from the resource manager rather than say unpack them into a folder on disk. According to this <a title="Link to gamedev.stackexchange.com answer" href="https://gamedev.stackexchange.com/questions/131138/how-to-pass-png-image-data-directly-to-sdl" target="_blank" rel="noopener noreferrer">stackexchange answer</a>, SDL2 can do that, so something for me to experiment with.</p>
<p>So I&#8217;m starting on a simple and easy to use resource manager. It&#8217;ll be implemented as a simple library that provides access to images, text files etc. all loaded from a resource file. And there will be a standalone utility to add, delete and list files in that resource file.</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/another-mini-project-a-resource-manager/">Another mini project – a resource manager</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">543</post-id>	</item>
	</channel>
</rss>
