<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: In game c++ map editor tutorial with IndieLib engine that dosen&#8217;t use tiles but pieced images like in Braid or Aquaria games</title>
	<atom:link href="http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/feed/" rel="self" type="application/rss+xml" />
	<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/</link>
	<description>Game tutorials for smart beginners and meek geeks</description>
	<pubDate>Mon, 06 Sep 2010 20:53:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Game Engines #1: IndieLib, 2.5d engine using c++ for rapid game development</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-60</link>
		<dc:creator>Game Engines #1: IndieLib, 2.5d engine using c++ for rapid game development</dc:creator>
		<pubDate>Sun, 25 Jan 2009 13:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-60</guid>
		<description>[...] Game tutorials made easy Game tutorials for smart beginners and meek geeks  About      &#171; Tetris tutorial in C++ platform independent focused in game logic for beginners In game c++ map editor tutorial with IndieLib engine that dosen&#8217;t use tiles but pieced images ... [...]</description>
		<content:encoded><![CDATA[<p>[...] Game tutorials made easy Game tutorials for smart beginners and meek geeks  About      &laquo; Tetris tutorial in C++ platform independent focused in game logic for beginners In game c++ map editor tutorial with IndieLib engine that dosen&#8217;t use tiles but pieced images &#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; In bgame/b c++ bmap/b editor tutorial with IndieLib engine that dosen#39;t b&#8230;/b &#187;Free Games</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-50</link>
		<dc:creator>&#187; In bgame/b c++ bmap/b editor tutorial with IndieLib engine that dosen#39;t b&#8230;/b &#187;Free Games</dc:creator>
		<pubDate>Sat, 17 Jan 2009 09:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-50</guid>
		<description>[...] games by Javier L&#195;&#179;pez         &#171; EURweb.com - PACMAN JONES RELEASED FROM COWBOYS: Cornerback out of &#8230; Sharing [...]</description>
		<content:encoded><![CDATA[<p>[...] games by Javier L&Atilde;&sup3;pez         &laquo; EURweb.com - PACMAN JONES RELEASED FROM COWBOYS: Cornerback out of &#8230; Sharing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: So&#8230; my method of collision detection is called bitmap-collision &#171; Ninja pirate</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-47</link>
		<dc:creator>So&#8230; my method of collision detection is called bitmap-collision &#171; Ninja pirate</dc:creator>
		<pubDate>Sun, 11 Jan 2009 15:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-47</guid>
		<description>[...] of adding 3/4 layer-rendering making the games look to have more depth. I got the idea from this site, I really want to implement something similar in the future. If I have the time in the summerbreak [...]</description>
		<content:encoded><![CDATA[<p>[...] of adding 3/4 layer-rendering making the games look to have more depth. I got the idea from this site, I really want to implement something similar in the future. If I have the time in the summerbreak [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier López</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-46</link>
		<dc:creator>Javier López</dc:creator>
		<pubDate>Sun, 11 Jan 2009 15:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-46</guid>
		<description>Hello Jordi!

Thank you for taking your time in order to read the sourcecode! I really appreciate your effort.

I think you are right in EVERYTHING you said. Hopefully it would help in order to improve the tutorial.

Currently I'm working in the next tutorial, and I think I should keep working on it and not to go back to this one. Maybe I'm asking too much, but do you have enough time in order to make the improvements you commented in the sourcecode and to send it to my mail (javierlopezpro [ at ] gmail [ dot ] com).

I will of course credit you and put a link to your blog.

Thank you again!</description>
		<content:encoded><![CDATA[<p>Hello Jordi!</p>
<p>Thank you for taking your time in order to read the sourcecode! I really appreciate your effort.</p>
<p>I think you are right in EVERYTHING you said. Hopefully it would help in order to improve the tutorial.</p>
<p>Currently I&#8217;m working in the next tutorial, and I think I should keep working on it and not to go back to this one. Maybe I&#8217;m asking too much, but do you have enough time in order to make the improvements you commented in the sourcecode and to send it to my mail (javierlopezpro [ at ] gmail [ dot ] com).</p>
<p>I will of course credit you and put a link to your blog.</p>
<p>Thank you again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordi Fita</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-45</link>
		<dc:creator>Jordi Fita</dc:creator>
		<pubDate>Sun, 11 Jan 2009 02:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-45</guid>
		<description>First of all I want to thank you for this tutorial.  It is always interesting to learn how other people do things and is a pleasure to learn new tricks.

I also would like to make some comments about the code presented here.  Please, take all my comments as positive criticism since is what I intend to do, but is not always easy.  So, if something seems to harsh, please excuse me.

I'll start with a non-code issue: the past of draw is "drew" not "drawed".  I know it because I've done this mistake so many times ;-)

I see that you put "using namespace" directives in you headers.  For me, this is a bad practice since it defeats the purpose of namespaces.  Imagine that I have a class called 'vector' to descrive math vectors.  If now I include your header I'm importing in my local namespace all the std namespace that I have included before your header and probably I will get duplicate name errors.  In this case I would use directly std::vector directly.

The std::vector in Resources is used to look up surfaces by id and to traverse, regardless of order, the list of tiles in Listener::CreateBackDropBrushes().  I wonder, why didn't you use an std::map instead?  From my point of view we would get the same (and id linked to a surface) but without the need of a separate structure (SURFACE), faster look up, and easier clean up.  Oh, and in C++ there's no need to use the 'typedef struct structBackDropSurfaces SURFACE' trick.  Just declare the struct as SURFACE and use it as it.

Probably I am nitpicking here, but I normally use ++mIter instead of mIter++ when using iterators (when using iterators "by hand" instead of using standard algorithms like std::for_each and such.)  The reason is because in user defined types (like iterators) it is somewhat better to use pre-increment instead of post-increment for performance reasons (i.e., the post-increment operator needs to create a copy before incrementing in order to return the original value.)  My rule of thumb is: if I don't need to original value use pre-increment.  Of course, your mileage may vary.

I would be a little more const-correct in some methods.  For example, Node::GetLayer() and Node::GetSurfaceId() don't modify the Node object, so I would declare them const.

More nitpicking here: please, use initialization list in constructors.  An initialization list doesn't get worse performance but sometimes it gets better performance, since a constructor doesn't have to create objects just to assign new values later in the constructor's body.

In Map::CloneNode() I don't see why you are making all these calls, since they all use information from the original node that we are trying to copy.  Wouldn't be better to declare a copy constuctor in Node that already does this?  After all this is a Node's responsability, isn't it?  Cloning a node, from my point of view, should be: Node *mNewNode = new Node (*pNode);

Is there a reason because OpenFileDialog returns a char * instead of an std::string?  Using an std::string is easier (mPath.empty() instead of !strcmp(mPath, "")) and harder to make mistakes, as you do in Map::SaveMap() and Map::LoadMap(): the last delete of mPath should be delete[] ;-).  With std::string I don't care and the responsability of who to delete the data is clearer (i.e., the string object.)

Maybe this is a design issue, but when loading and saving Nodes I would let the node object to use a TiXmlElement to save itself.  That way, If we have different Node types, by using inheritance, we can have a virtual method that does the correct thing for each subtype.  I am not sure right now, but I thing this is called the "visitor pattern".  Again, your mileage may vary here too :-)

I prefer the new C++-style castings (static_cast, const_cast, reinterpret_cast, and dynamic_cast) instead of the C-style casts ( (type)var .)  They are easier and safer to use (but no to type, I know.)

And I am stopping here :-)

I really appreciate your work, I just wanted to throw in a little disscusion and possible improvements in an already wonderful work.

Thanks for all!</description>
		<content:encoded><![CDATA[<p>First of all I want to thank you for this tutorial.  It is always interesting to learn how other people do things and is a pleasure to learn new tricks.</p>
<p>I also would like to make some comments about the code presented here.  Please, take all my comments as positive criticism since is what I intend to do, but is not always easy.  So, if something seems to harsh, please excuse me.</p>
<p>I&#8217;ll start with a non-code issue: the past of draw is &#8220;drew&#8221; not &#8220;drawed&#8221;.  I know it because I&#8217;ve done this mistake so many times <img src='http://gametuto.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I see that you put &#8220;using namespace&#8221; directives in you headers.  For me, this is a bad practice since it defeats the purpose of namespaces.  Imagine that I have a class called &#8216;vector&#8217; to descrive math vectors.  If now I include your header I&#8217;m importing in my local namespace all the std namespace that I have included before your header and probably I will get duplicate name errors.  In this case I would use directly std::vector directly.</p>
<p>The std::vector in Resources is used to look up surfaces by id and to traverse, regardless of order, the list of tiles in Listener::CreateBackDropBrushes().  I wonder, why didn&#8217;t you use an std::map instead?  From my point of view we would get the same (and id linked to a surface) but without the need of a separate structure (SURFACE), faster look up, and easier clean up.  Oh, and in C++ there&#8217;s no need to use the &#8216;typedef struct structBackDropSurfaces SURFACE&#8217; trick.  Just declare the struct as SURFACE and use it as it.</p>
<p>Probably I am nitpicking here, but I normally use ++mIter instead of mIter++ when using iterators (when using iterators &#8220;by hand&#8221; instead of using standard algorithms like std::for_each and such.)  The reason is because in user defined types (like iterators) it is somewhat better to use pre-increment instead of post-increment for performance reasons (i.e., the post-increment operator needs to create a copy before incrementing in order to return the original value.)  My rule of thumb is: if I don&#8217;t need to original value use pre-increment.  Of course, your mileage may vary.</p>
<p>I would be a little more const-correct in some methods.  For example, Node::GetLayer() and Node::GetSurfaceId() don&#8217;t modify the Node object, so I would declare them const.</p>
<p>More nitpicking here: please, use initialization list in constructors.  An initialization list doesn&#8217;t get worse performance but sometimes it gets better performance, since a constructor doesn&#8217;t have to create objects just to assign new values later in the constructor&#8217;s body.</p>
<p>In Map::CloneNode() I don&#8217;t see why you are making all these calls, since they all use information from the original node that we are trying to copy.  Wouldn&#8217;t be better to declare a copy constuctor in Node that already does this?  After all this is a Node&#8217;s responsability, isn&#8217;t it?  Cloning a node, from my point of view, should be: Node *mNewNode = new Node (*pNode);</p>
<p>Is there a reason because OpenFileDialog returns a char * instead of an std::string?  Using an std::string is easier (mPath.empty() instead of !strcmp(mPath, &#8220;&#8221;)) and harder to make mistakes, as you do in Map::SaveMap() and Map::LoadMap(): the last delete of mPath should be delete[] ;-).  With std::string I don&#8217;t care and the responsability of who to delete the data is clearer (i.e., the string object.)</p>
<p>Maybe this is a design issue, but when loading and saving Nodes I would let the node object to use a TiXmlElement to save itself.  That way, If we have different Node types, by using inheritance, we can have a virtual method that does the correct thing for each subtype.  I am not sure right now, but I thing this is called the &#8220;visitor pattern&#8221;.  Again, your mileage may vary here too <img src='http://gametuto.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I prefer the new C++-style castings (static_cast, const_cast, reinterpret_cast, and dynamic_cast) instead of the C-style casts ( (type)var .)  They are easier and safer to use (but no to type, I know.)</p>
<p>And I am stopping here <img src='http://gametuto.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I really appreciate your work, I just wanted to throw in a little disscusion and possible improvements in an already wonderful work.</p>
<p>Thanks for all!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meneame.net</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-43</link>
		<dc:creator>meneame.net</dc:creator>
		<pubDate>Fri, 09 Jan 2009 17:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-43</guid>
		<description>&lt;strong&gt;Tutorial: Editor de pantallas &#34;sin tiles&#34;, como el de los juegos Aquaria o Braid usando C++ e IndieLib [ING]...&lt;/strong&gt;

Un tutorial que explica como hace un editor de pantallas en C++ e IndieLib al estilo del que usan juegos como Braid o Aquaria. A diferencia de los usuales motores / editores de tiles, estos juegos usan un sistema en el que el fondo se va creando a part...</description>
		<content:encoded><![CDATA[<p><strong>Tutorial: Editor de pantallas &quot;sin tiles&quot;, como el de los juegos Aquaria o Braid usando C++ e IndieLib [ING]&#8230;</strong></p>
<p>Un tutorial que explica como hace un editor de pantallas en C++ e IndieLib al estilo del que usan juegos como Braid o Aquaria. A diferencia de los usuales motores / editores de tiles, estos juegos usan un sistema en el que el fondo se va creando a part&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pixelame.net</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-42</link>
		<dc:creator>pixelame.net</dc:creator>
		<pubDate>Fri, 09 Jan 2009 17:00:36 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-42</guid>
		<description>&lt;strong&gt;Tutorial: Editor de pantallas &#34;sin tiles&#34;, como el de los juegos Aquaria o Braid usando C++ e IndieLib [ING]...&lt;/strong&gt;

Un tutorial que explica como hace un editor de pantallas en C++ y usando IndieLib al estilo del que usan juegos como Braid o Aquaria. A diferencia de los usuales motores / editores de tiles, estos juegos usan un sistema en el que el fondo se va creando...</description>
		<content:encoded><![CDATA[<p><strong>Tutorial: Editor de pantallas &quot;sin tiles&quot;, como el de los juegos Aquaria o Braid usando C++ e IndieLib [ING]&#8230;</strong></p>
<p>Un tutorial que explica como hace un editor de pantallas en C++ y usando IndieLib al estilo del que usan juegos como Braid o Aquaria. A diferencia de los usuales motores / editores de tiles, estos juegos usan un sistema en el que el fondo se va creando&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smackthat</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-40</link>
		<dc:creator>smackthat</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-40</guid>
		<description>very useful tutorial, thank you!!</description>
		<content:encoded><![CDATA[<p>very useful tutorial, thank you!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tutorial: Editor de pantallas &#8220;sin tiles&#8221;, como el de los juegos Aquaria o Braid</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-39</link>
		<dc:creator>Tutorial: Editor de pantallas &#8220;sin tiles&#8221;, como el de los juegos Aquaria o Braid</dc:creator>
		<pubDate>Fri, 09 Jan 2009 12:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-39</guid>
		<description>[...] Aquí está el tutorial (en la lengua de Shakespeare). [...]</description>
		<content:encoded><![CDATA[<p>[...] Aquí está el tutorial (en la lengua de Shakespeare). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C++ map editor tutorial, it dosent use tiles but pieced images like in Aquaria game at IndieLib - 2d Engine Rapid Game Development</title>
		<link>http://gametuto.com/in-game-c-map-editor-tutorial-with-indielib-engine-that-dosent-use-tiles-but-pieced-images-like-in-braid-or-aquaria-games/#comment-38</link>
		<dc:creator>C++ map editor tutorial, it dosent use tiles but pieced images like in Aquaria game at IndieLib - 2d Engine Rapid Game Development</dc:creator>
		<pubDate>Fri, 09 Jan 2009 12:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://gametuto.com/?p=181#comment-38</guid>
		<description>[...] C++ map editor tutorial, it dosent use tiles but pieced images like in Aquaria game [...]</description>
		<content:encoded><![CDATA[<p>[...] C++ map editor tutorial, it dosent use tiles but pieced images like in Aquaria game [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
