<?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>dev2ool</title>
	<atom:link href="http://www.dev2ool.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dev2ool.com</link>
	<description>Tools for Game Developers</description>
	<lastBuildDate>Tue, 23 Feb 2010 13:49:07 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sprite Grabber</title>
		<link>http://www.dev2ool.com/2010/01/sprite-grabber/</link>
		<comments>http://www.dev2ool.com/2010/01/sprite-grabber/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:38:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hidden]]></category>

		<guid isPermaLink="false">http://www.dev2ool.com/?p=77</guid>
		<description><![CDATA[Sprite Grabber automatically creates optimized texture atlases (sprite sheets) for you, and it&#8217;s super easy to access all of your sprites from within your game source.
]]></description>
			<content:encoded><![CDATA[<p>Sprite Grabber automatically creates optimized texture atlases (sprite sheets) for you, and it&#8217;s super easy to access all of your sprites from within your game source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dev2ool.com/2010/01/sprite-grabber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding Sprite Grabber</title>
		<link>http://www.dev2ool.com/2010/01/understanding-sprite-grabber/</link>
		<comments>http://www.dev2ool.com/2010/01/understanding-sprite-grabber/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 00:16:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sprite Grabber]]></category>

		<guid isPermaLink="false">http://www.dev2ool.com/?p=100</guid>
		<description><![CDATA[To use Sprite Grabber, you just need to setup a few small configuration (text) files. Then, each time you run Sprite Grabber, it will parse these configuration files, and create the texture atlases and support files you specified.

Configuration Files
You&#8217;ll need one master configuration file, this lets Sprite Grabber know where to save any support files, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">To use Sprite Grabber, you just need to setup a few small configuration (text) files. Then, each time you run Sprite Grabber, it will parse these configuration files, and create the texture atlases and support files you specified.<span id="more-100"></span></p>
<p style="text-align: justify;"><a href="http://www.dev2ool.com/wp/wp-content/uploads/2010/01/schematic.png"><img class="aligncenter size-full wp-image-198" title="schematic" src="http://www.dev2ool.com/wp/wp-content/uploads/2010/01/schematic.png" alt="" width="560" height="564" /></a></p>
<h4 style="text-align: justify;">Configuration Files</h4>
<p>You&#8217;ll need one master configuration file, this lets Sprite Grabber know where to save any support files, and which local configuration files to process.</p>
<p>Each local configuration file lets Sprite Grabber know how to build one texture atlas; and may contain any number of sprite groups (shown above as &#8216;SG&#8217;).</p>
<h4>Sprite Groups</h4>
<p>Each sprite group may consist of one or more actual sprites. You set these up in your local configuration file, and include information such as which source bitmap(s) to grab sprites from.</p>
<h4>Box Mode and Sequence Mode</h4>
<p>In Box mode, sprites are grabbed from rectangular areas within a single source bitmap. In Sequence mode, sprites are grabbed from a series of source bitmap files (file000.tga, file001.tga, file002.tga).</p>
<p>You control how sprites are grabbed in the sprite group sections, within the local configuration file.</p>
<h4 style="text-align: justify;">Sprites Header File</h4>
<p style="text-align: justify;">Sprite Grabber will create a .h header file for you to include in your game source files. Inside this .h file, there is a #define value for each sprite group you specified. These values are indexes in to the following table.</p>
<h4>Sprites Data Table</h4>
<p style="text-align: justify;">This is a data table with one 16-byte entry for each sprite you grabbed, containing information such as which texture atlas a sprite is on, it&#8217;s X Y position on the atlas and it&#8217;s size etc.</p>
<h4 style="text-align: justify;">Textures List</h4>
<p style="text-align: justify;">This is a text file containing a list of filenames for each of your texture atlases.</p>
<h4>Accessing Sprites From Your Game Source</h4>
<p style="text-align: justify;">You load in and access the sprite data table from within your game source, using the #defined value in the sprites header file as an index in to the table.</p>
<p style="text-align: justify;">The advantage here, is that you don&#8217;t need to keep track of which texture a sprite is on, or position and size etc; you just have something like the following code:</p>
<p><code>#include "sprite_defines.h"                     // #defines for each sprite group<br />
Spr[SPR_MY_SPRITE_GROUP].Draw(x,y);        // draw my sprite!</code></p>
<p style="text-align: justify;">For simple sprite animations, you can add a frame offset, for example:</p>
<p><code>Spr[SPR_MY_SPRITE_GROUP+frame].Draw(x,y);   // draw my sprite animation frame!</code></p>
<p>As you can see, doing things the Sprite Grabber way, makes for simple and very elegant code!</p>
<p style="text-align: justify;"><a class="mybutton" href="http://www.dev2ool.com/2010/01/inside-our-game-source-code/">Next Up: Inside Your Game Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dev2ool.com/2010/01/understanding-sprite-grabber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inside Your Game Source Code</title>
		<link>http://www.dev2ool.com/2010/01/inside-our-game-source-code/</link>
		<comments>http://www.dev2ool.com/2010/01/inside-our-game-source-code/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 00:12:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sprite Grabber]]></category>

		<guid isPermaLink="false">http://www.dev2ool.com/?p=88</guid>
		<description><![CDATA[You can use the texture atlases and support files however you best see fit; but here&#8217;s how I make use of them.
I have a sprite class &#8216;cSpr&#8217;, and at compile time, I create an array of these, using the #defined value for SPR_MAX in the sprites header file. Same thing with my texture class &#8216;cTex&#8217;:
#include [...]]]></description>
			<content:encoded><![CDATA[<p>You can use the texture atlases and support files however you best see fit; but here&#8217;s how I make use of them.<span id="more-88"></span></p>
<p>I have a sprite class &#8216;cSpr&#8217;, and at compile time, I create an array of these, using the #defined value for SPR_MAX in the sprites header file. Same thing with my texture class &#8216;cTex&#8217;:</p>
<p><code>#include "sprite_defines.h"<br />
cSpr Spr[SPR_MAX];   // SPR_MAX is defined in sprite_defines.h<br />
cTex Tex[TEX_MAX];    // TEX_MAX is defined in sprite_defines.h</code></p>
<p>Then, at run time, on game initialization, I have a function to setup my textures and sprites. Here I do the following:</p>
<ol>
<li>Open my texture list file; using that to setup each of my textures.</li>
<li>Open my sprite data table file; using that to setup each of my sprites.</li>
</ol>
<p>After that, I&#8217;m good to go, and can easily access each sprite using the following code:</p>
<p><code>#include "sprite_defines.h"<br />
Spr[SPR_MY_SPRITE].Draw(x,y);</code></p>
<p>It&#8217;s that simple!</p>
<p><a class="mybutton" href="http://www.dev2ool.com/2010/01/source-bitmap-pre-processing/">Next Up: Source Bitmap Pre-Processing</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dev2ool.com/2010/01/inside-our-game-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Source Bitmap Pre-Processing</title>
		<link>http://www.dev2ool.com/2010/01/source-bitmap-pre-processing/</link>
		<comments>http://www.dev2ool.com/2010/01/source-bitmap-pre-processing/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 00:11:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sprite Grabber]]></category>

		<guid isPermaLink="false">http://www.dev2ool.com/?p=86</guid>
		<description><![CDATA[You can have Sprite Grabber pre-process your source bitmaps, before it grabs sprites from them. You control which (if any) pre-processing stages to perform, in the sprite group sections inside your local config files.
Here are the 3 (optional) pre-processing stages.
Alpha Cut Off
Pixels with an alpha value equal to or less than your specified value, will [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You can have Sprite Grabber pre-process your source bitmaps, before it grabs sprites from them. You control which (if any) pre-processing stages to perform, in the sprite group sections inside your local config files.<span id="more-86"></span></p>
<p style="text-align: justify;">Here are the 3 (optional) pre-processing stages.</p>
<h4 style="text-align: justify;">Alpha Cut Off</h4>
<p style="text-align: justify;">Pixels with an alpha value equal to or less than your specified value, will be removed (alpha set to 0).</p>
<h4 style="text-align: justify;">Replace Pixels</h4>
<p style="text-align: justify;">You set 2 values, a &#8216;from&#8217; value and a &#8216;to&#8217; value. Pixels with an ARGB equal to your &#8216;from&#8217; value, will be set to your &#8216;to&#8217; value.</p>
<h4 style="text-align: justify;">Shrink Bitmap</h4>
<p style="text-align: justify;">You can have Sprite Grabber shrink your source bitmap by a factor of 2, 4, 8 or 16.</p>
<p><a class="mybutton" href="http://www.dev2ool.com/sprite-grabber/">Sprite Grabber Product Information Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dev2ool.com/2010/01/source-bitmap-pre-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
