<?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>Andonuts.net &#187; tiles</title>
	<atom:link href="http://andonuts.net/tag/tiles/feed/" rel="self" type="application/rss+xml" />
	<link>http://andonuts.net</link>
	<description>A blog about some nerd.</description>
	<lastBuildDate>Wed, 09 Feb 2011 21:49:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>GMG &#8211; Using Tiles</title>
		<link>http://andonuts.net/2009/10/gmg-using-tile/</link>
		<comments>http://andonuts.net/2009/10/gmg-using-tile/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 04:54:04 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Game Maker Guide]]></category>
		<category><![CDATA[game maker]]></category>
		<category><![CDATA[tiles]]></category>

		<guid isPermaLink="false">http://dcmsoftware.net/?p=69</guid>
		<description><![CDATA[Game Maker Guide tutorial number two: Using Tiles. Still part of my old stuff, new ones will come after the next one. I. Get a Tileset! I will be demonstrating with this tileset from Mother 3, ripped/edited by Ranger. It&#8217;s rather large, but that&#8217;s no problem! II. Loading it into Game Maker This is pretty [...]]]></description>
			<content:encoded><![CDATA[<p>Game Maker Guide tutorial number two: <em><strong>Using Tiles</strong></em>. Still part of my old stuff, new ones will come after the next one.</p>
<p><span id="more-69"></span></p>
<p><strong>I. Get a Tileset!</strong><br />
I will be demonstrating with <a href="http://dcmsoftware.net/GMG/Tutorials/Using_Tiles/TazmilyDay.png">this tileset</a> from Mother 3, ripped/edited by <a href="http://starmen.net/forum/?t=usrinfo&amp;id=7458">Ranger</a>. It&#8217;s rather large, but that&#8217;s no problem!</p>
<p><strong>II. Loading it into Game Maker<br />
</strong>This is pretty simple, actually. Add a new background by clicking the picture icon in the toolbar. Click load background in the window that pops up, and browse for your tileset. When you&#8217;ve done that, your screen will look similar to this:<br />
<img src="http://andonuts.net/GMG/Tutorials/Using_Tiles/Shot1.PNG" alt="Background Properties" width="500" height="318" /><br />
As you can see, I&#8217;ve done a few things already. To enable a background to function as a tileset, you&#8217;ll need to do the following:</p>
<ul>
<li><strong>Check &#8220;Use as tile set&#8221;: </strong>This is an import step; if you don&#8217;t do this, you won&#8217;t have a tileset!</li>
<li><strong>Enter the values on the right:</strong> These define how the tileset is set up. Each of my tiles are 32&#215;32 pixels, you can see where I filled that in. The offset values indicate how far from the left or top your tileset begins. If there were, say, 12 pixels of empty space from the top of the image to the top of my first tile, and 8 pixels from the left of the image to the left of my first tile, I would use a horizontal offset of 8 and a vertical offset of 12. The seperation (horizontal/vertical sep) values indicate how many pixels of empty space are between each tile.</li>
<li><strong>Transparency:</strong> When using transparency in Game Maker, you must make sure that the <strong>bottom-left pixel</strong> is the color you want to represent transparency. In my case, I made the bottom-left pixel pink, this means that any pink in the tileset image will not be shown. Sometimes it&#8217;s a good idea to just add an entire row of transparent color on the bottom of your image by increasing the image&#8217;s height by one. (Useful for when the bottom-left pixel must be a different color than the transparent color.)</li>
</ul>
<p><strong>III. Using the Tiles</strong><br />
Once you&#8217;ve finished setting up the tileset, it&#8217;s time to go into the room and make a map with the tiles you just made.<br />
In the room editor, click the &#8220;Tiles&#8221; tab. Your screen will then look similar to this:<br />
<a href="http://"><img src="http://andonuts.net/GMG/Tutorials/Using_Tiles/Shot2.PNG" alt="Room Editor" width="500" height="463" /></a><br />
Simply select a tile from the left and click in the room to add it. Using different layers, you can place tiles over one another, or enable the player object to move under them. Tiles on layers with positive numbers will be below those with smaller, or negative numbers, basically the layer order goes from largest to smallest, with largest on the bottom. Unlike in RPG Maker, you cannot specify whether or not a specific tile is solid, you must use invisible wall objects for that which I&#8217;ll explain in the next section.</p>
<p><strong>IV. Solid &#8220;Tiles&#8221;</strong><br />
To make solid tiles, you&#8217;re going to need two things &#8211; an object and a sprite. Just make a non-transparent sprite the size of one tile (Mine would be 32&#215;32) and fill it with some color. (Black shows up the best.) You can call it <span>spr_block</span> or something similar. Then you&#8217;ll simply create a new object and assign it the sprite you just made. You can name it <span>obj_block</span> or something similar. Uncheck visible, you don&#8217;t want blocks all over your room. Then check solid so other solid objects can&#8217;t go through it. You&#8217;ll have to do checks with your player to ensure that the place you&#8217;re moving to is free, otherwise you&#8217;ll move over the blocks. (<span>place_free()</span>, or the drag &amp; drop &#8220;If a position is collision free&#8221;) You can change the shape of your wall sprite if you need to, like for odd shaped tiles.</p>
<p>Once you&#8217;ve added your tiles and objects to the room, go test it out! Have fun making maps.</p>
<p>If you have any questions or comments, post them in the topic mentioned above.</p>
]]></content:encoded>
			<wfw:commentRss>http://andonuts.net/2009/10/gmg-using-tile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

