<?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>Michel Carroll - Web Developer</title>
	<atom:link href="http://michelcarroll.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://michelcarroll.com</link>
	<description>Montreal Based Web Developer. Specializes in PHP, Wordpress &#38; Game Development.</description>
	<lastBuildDate>Thu, 07 Mar 2013 03:47:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>My Totally Realistic Blog Name Generator</title>
		<link>http://michelcarroll.com/my-blog-name-generator/</link>
		<comments>http://michelcarroll.com/my-blog-name-generator/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 03:47:29 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://michelcarroll.com/?p=500</guid>
		<description><![CDATA[Here it is: Click Here to Refresh]]></description>
				<content:encoded><![CDATA[<p>Here it is: </p>
<p><script>
function updateBlogNameGen() {
 var img = document.getElementById("blognamegen");
 if(img) {
   var imgSrc = img.src;
   imgSrc = imgSrc .split('?')[0];
   img.src = imgSrc+"?" + new Date().getTime();
 }
}
window.onload = function() {
  document.getElementById("updateblogname").onclick = updateBlogNameGen;
};
<!--    -->
</script></p>
<p><a href="#" id="updateblogname">Click Here to Refresh</a></p>
<p><img id="blognamegen" src="http://michelcarroll.com/demos/blog_name_gen/index.php" alt="Blog Name Generator" /></p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/my-blog-name-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Consistently Score 100% Grades in Calculus (and Maths) &#8211; On Practicing</title>
		<link>http://michelcarroll.com/how-score-100-in-calculus/</link>
		<comments>http://michelcarroll.com/how-score-100-in-calculus/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 15:53:54 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://michelcarroll.com/?p=492</guid>
		<description><![CDATA[In this article, I&#8217;m going to help you achieve perfect grades in Calculus class. If you have great determination, 100% is reachable, and you won&#8217;t have to sell your soul to get there. Today, I&#8217;m going to focus on the art of practising intelligently. Practice Often I consider this the most important piece of advice, [...]]]></description>
				<content:encoded><![CDATA[<p>In this article, I&#8217;m going to help you achieve perfect grades in Calculus class. If you have great determination, <strong>100% is reachable</strong>, and you won&#8217;t have to sell your soul to get there.</p>
<p>Today, I&#8217;m going to focus on the art of practising intelligently.</p>
<h3>Practice Often</h3>
<p>I consider this the most important piece of advice, yet also the most obvious, that I can offer you. You aren&#8217;t born with great mathematics abilities, you need to develop them! Scientists are learning more and more that the brain is very adaptable, and never stops changing. By practising calculus often,  you&#8217;re creating new connections, reinforcing good habits, and speeding up the logical thinking necessary to solve problems efficiently.</p>
<p>Like any habit, the more often you exercise it, the more your brain makes it natural. This means practising at different times of day, and practising on a consistent basis.</p>
<h3>Practice Thoroughly</h3>
<p>Textbooks contain thousands of problems for a very good reason; because you&#8217;ll need to drill the fundamentals of calculus into your head. It isn&#8217;t sufficient to understand why a certain theorem or law exists; you need to use it over and over again until you know it and understand it personally &amp; intuitively.</p>
<p>In calculus textbooks, you&#8217;ll often have different types of problems for each chapter:</p>
<p><strong style="line-height: 13px;">Problems that help you understand a theorem or technique</strong></p>
<p>These are very important to do. They&#8217;ll let you know if you understand the basic premise of the chapter.</p>
<p><strong>Problems that give you the opportunity to put it into practice</strong></p>
<p>This is the meat of the chapter. It&#8217;s the drill that will commit the technique to your mind. Do all of these.</p>
<p><strong>Problems that apply the technique to real-world problems</strong></p>
<p>I personally don&#8217;t find these very important. They might be helpful if you&#8217;re having a hard time finding the practical application of a technique. It will probably be more helpful to kinesthetic learners.<em><br />
</em></p>
<p><strong>Challenging or integrative problems</strong></p>
<p>These are very useful as review problems. They will let you know if you&#8217;re ready for an exam, or to move on to the next chapter.</p>
<h3>How to Practice</h3>
<p>I follow these steps when going through the problems section of my textbook:</p>
<ol>
<li>Start from the beginning</li>
<li>Do each problem one after another, checking to see if you have the right answer after each</li>
<li>If you make a mistake, <strong>redo the problem the right way</strong>. Otherwise, you&#8217;re not learning from your mistakes.</li>
<li>Don&#8217;t move on to the next problem until you 100% understand your mistakes in the last one</li>
<li>You may skip a question only if the answer comes very naturally to you</li>
</ol>
<p>Don&#8217;t get frustrated from your mistakes. You have to understand that making mistakes is one of the most important parts of learning. In other words, <strong>you must make mistakes</strong>. Everybody, even the most gifted, make mistakes.</p>
<p>Also, try to always end a practice session if you&#8217;re too tired to concentrate well. Pressing on when you brain is not in an awareness state is like trying to clean a spill using a water saturated cloth. All you&#8217;ll end up doing is spreading the spill.</p>
<h3>Conclusion</h3>
<p>I hope I&#8217;ve helped you become a better math student. I appreciate any feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/how-score-100-in-calculus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GameDevelopersWeb.com Merger</title>
		<link>http://michelcarroll.com/gamedevelopersweb-com-merger/</link>
		<comments>http://michelcarroll.com/gamedevelopersweb-com-merger/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 12:32:30 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://michelcarroll.com/?p=481</guid>
		<description><![CDATA[I recently decided to merge my other blog, gamedevelopersweb.com, with my personal one. I was tired of having to manage both separately, and I feel like my other interests (biology, web development, learning) could have an overlap with game development. For those interested, in order not to lose my SEO ranking for gamedevelopersweb.com, I followed [...]]]></description>
				<content:encoded><![CDATA[<p>I recently decided to merge my other blog, gamedevelopersweb.com, with my personal one. I was tired of having to manage both separately, and I feel like my other interests (biology, web development, learning) could have an overlap with game development.</p>
<p>For those interested, in order not to lose my SEO ranking for gamedevelopersweb.com, I followed these steps:</p>
<ol>
<li>I exported all the posts/comments/categories from GameDevelopersWeb.com and imported into a local installation of WordPress</li>
<li>I reworked the categories and adjusted the theme to fit my personal website blog</li>
<li>I exported them from my local installation into MichelCarroll.com</li>
<li>Quickly after, I added a .htaccess 301 rule for <strong>each</strong> page and article on GameDevelopersWeb.com, including the root domain</li>
<li>I logged into Google Webmaster Tools, and advised them that the domain name change had been made</li>
</ol>
<p>I&#8217;ve yet to see the results of this, so I hope the domain change will go seamlessly.</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/gamedevelopersweb-com-merger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Tower Defense Game using EaselJS &#8211; Part 2 &#8211; Path to Castle</title>
		<link>http://michelcarroll.com/html5-tower-defense-part-2/</link>
		<comments>http://michelcarroll.com/html5-tower-defense-part-2/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 09:02:29 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Game Development]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.gamedevelopersweb.com/?p=452</guid>
		<description><![CDATA[In the last post, we initiated the project, drafted how the game&#8217;s overall look &#38; feel, and drew a red circle as proof that EaselJS is working. In this part, we&#8217;re going to render the path to the castle. The Path to the Castle &#8211; Concept First, let&#8217;s give ourselves an idea of what the [...]]]></description>
				<content:encoded><![CDATA[<p>In the <a href="/html5-tower-defense-part-1">last post</a>, we initiated the project, drafted how the game&#8217;s overall look &amp; feel, and drew a red circle as proof that EaselJS is working. In this part, we&#8217;re going to render the path to the castle.</p>
<h3>The Path to the Castle &#8211; Concept</h3>
<p>First, let&#8217;s give ourselves an idea of what the path is going to need to be, so that we&#8217;re better prepared to code it.</p>
<p>Conceptually, here&#8217;s what its role is in the game:</p>
<ul>
<li>A logical set of way-points for the orcs to follow in order to reach the castle</li>
<li>A logical separation between the orcs and the archers</li>
<li>A visual path, so that the player knows where it begins and where it ends</li>
</ul>
<p>Let&#8217;s try to keep the code as simple as possible, so that we don&#8217;t get tangled in our own logic. In my opinion, the simplest way to represent a path here is as a set of way-points. Here&#8217;s an illustration of what I mean:</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2013/02/IMG_0002.jpg"><img class="size-full wp-image-481 alignnone" title="IMG_0002" src="http://www.michelcarroll.com/wp-content/uploads/2013/02/IMG_0002.jpg" alt="" width="372" height="457" /></a></p>
<p>The big dots represents coordinate points, which we&#8217;re going to represent logically as an array of points. The dotted lines mean that the points are connected sequentially in our game logic to form a linear path.</p>
<p>In order to have a nice background, and to not have to worry about rendering a castle later on, let&#8217;s use a static image background in which to display the game on. We need to keep in mind the size of the image when creating/using a background image, because shrinking/growing it might distort the image. I&#8217;m going to make my image 640 x 480, which will also be the size of my game stage.</p>
<p>Using my master programmer artistic abilities, I present to you with my map:</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2013/02/map.jpg"><img class="size-full wp-image-455 alignnone" title="map" src="http://www.michelcarroll.com/wp-content/uploads/2013/02/map.jpg" alt="" width="640" height="480" /></a><br />
(if you find it too embarrassing, feel free to make/use your own)</p>
<p>Notice how I tried my best to keep the width of the path constant, so that we have an easier time mapping the way-points with the image later on.</p>
<p>It&#8217;s now time to get down to the code.</p>
<h3>The Path to the Castle &#8211; Coding</h3>
<p>First of all, lets move the image file into our project, and render the map to our browser.</p>
<p>Let&#8217;s create a new folder inside the root of our project called <strong>images</strong>, in which we&#8217;ll move <strong>map.jpg</strong> to:</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2013/02/project.jpg"><img class="size-full wp-image-463 alignnone" title="project" src="http://www.michelcarroll.com/wp-content/uploads/2013/02/project.jpg" alt="" width="338" height="124" /></a></p>
<p>Then, lets modify our existing code a bit to render the map using an <strong>Image</strong> class and a <strong>Bitmap</strong> EaselJS object. An <strong>Image </strong>object is equivalent to an <strong>img</strong> HTML tag; Javascript uses it to link to images. The <strong>Bitmap </strong>object is part of the EaselJS namespace; it&#8217;s responsible for knowing <strong>what </strong>to display and <strong>where </strong>to display it on the stage:<br />
<code></p>
<pre>loadGame = function() {
	var canvas = document.getElementById('main');
	stage = new Stage(canvas);

	var mapImg = new Image();
	mapImg.src = "images/map.jpg";

	var mapBitmap = new Bitmap(mapImg);
	mapBitmap.regX = 0;
	mapBitmap.regY = 0;

	stage.addChild(mapBitmap);
	stage.update();
};
</pre>
<p></code><br />
After refreshing, you should now see the map render on your browser.</p>
<p>Now, using an image editor, I&#8217;ve determined where our path coordinate points are going to be . Essentially, using the pixel coordinates (x,y), I took note of where each node is situated. Here they are, in Javascript list form:<br />
<code></p>
<pre>var coordinates = [
	[200, 0],
	[177, 127],
	[289, 152],
	[480, 100],
	[566, 131],
	[575, 250],
	[362, 262],
	[78, 310],
	[80, 394],
	[288, 400]
];
</pre>
<p></code><br />
Using this list, and a simple looping function, lets render lines where the path is going to be, so that we can validate that the waypoints are accurate. Here, I&#8217;m creating a line for each pair of coordinates. Each line is a separate shape that needs to be added separately to the stage in order to render correctly.</p>
<p>Think of the <strong>Graphics</strong> object as the computer&#8217;s pen. Here&#8217;s what I&#8217;m doing step by step:</p>
<ol>
<li>I change the thickness (<strong>setStrokeStyle</strong>) of the pen to 1</li>
<li>I move the pen to a new location (point 1), without actually drawing (<strong>moveTo</strong>)</li>
<li>I put my pen down, and give it a red color (<strong>beginStroke</strong>)</li>
<li>I draw all the way to point 2 (<strong>lineTo</strong>)</li>
<li>I commit the <strong>Shape</strong> to the stage (<strong>addChild</strong>) before drawing a new one</li>
</ol>
<p><code></p>
<pre>
var g = new Graphics();

for(var i = 1; i &lt; coordinates.length; i++)
{
	var s = new Shape(g);
	s.x = 0;
	s.y = 0;

	var point1 = coordinates[i-1];
	var point2 = coordinates[i];

	s.graphics
		.setStrokeStyle(1)
		.moveTo(point1[0], point1[1])
		.beginStroke(Graphics.getRGB(255,0,0))
		.lineTo(point2[0], point2[1]);

	stage.addChild(s);
}

stage.update();
</pre>
<p></code><br />
I put this logic right after the code that renders the map, so that the lines appear on top of the map, and not under.</p>
<p>Here&#8217;s what should be the results:</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2013/02/map_pathed.jpg"><img class="size-full wp-image-478 alignnone" title="map_pathed" src="http://www.michelcarroll.com/wp-content/uploads/2013/02/map_pathed.jpg" alt="" width="702" height="525" /></a></p>
<p>Success! Our coordinates are very accurate!</p>
<h3>Conclusion</h3>
<p>Now we&#8217;re ready drawing orcs, and make them follow the path. This is going to be the next part. Until then, feel free to try it out on your own using what you know so far.</p>
<p>Here&#8217;s the source code of my project at this point: <a href="http://www.michelcarroll.com/blog_assets/tower2/main.js">Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/html5-tower-defense-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Latin Roots &#8211; The &#8220;Pro&#8221;s of Learning Them</title>
		<link>http://michelcarroll.com/latin-roots-the-pros-and-contras-of-learning-them/</link>
		<comments>http://michelcarroll.com/latin-roots-the-pros-and-contras-of-learning-them/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 02:47:16 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://michelcarroll.com/?p=132</guid>
		<description><![CDATA[So I found Memrise a few weeks ago, a website that facilitates memorization. They have a plethora of existing &#8220;flash card&#8221; sets, ranging from memorizing the numbers of Pi to memorizing the names of trees. Their web application actually makes it very fun and interactive tool. Among the existing sets is Latin Prefixes &#38; Roots. Since I&#8217;ll be studying biology [...]]]></description>
				<content:encoded><![CDATA[<p>So I found <a href="http://www.memrise.com/">Memrise</a> a few weeks ago, a website that facilitates memorization. They have a plethora of existing &#8220;flash card&#8221; sets, ranging from memorizing the numbers of Pi to memorizing the names of trees. Their web application actually makes it very fun and interactive tool.</p>
<p>Among the existing sets is <a accesskey="c" href="http://www.memrise.com/course/47754/latin-prefixes-roots-for-sat-vocab/">Latin Prefixes &amp; Roots</a>. Since I&#8217;ll be studying biology next term at school, I figure learning  Latin prefixes will give me an edge. Rather than memorizing all those terms, it might help me better understand where they come from instead. Good deal.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/latin-roots-the-pros-and-contras-of-learning-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command-Based Architecture using Comet</title>
		<link>http://michelcarroll.com/draft-of-command-based-architecture-using-comet/</link>
		<comments>http://michelcarroll.com/draft-of-command-based-architecture-using-comet/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 19:54:25 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Web Architecture]]></category>

		<guid isPermaLink="false">http://michelcarroll.com/?p=119</guid>
		<description><![CDATA[Here&#8217;s a picture I found in my archives from last year. It&#8217;s a rough sketch of how a game developer might use comet to make a command-based architecture for a multi-player browser game. I mocked this up while I was getting my hands dirty in NodeJS. If I had to do something similar now, I would probably go with [...]]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a picture I found in my archives from last year. It&#8217;s a rough sketch of how a game developer might use <a href="http://www.webreference.com/programming/javascript/rg28/index.html">comet</a> to make a command-based architecture for a multi-player browser game.</p>
<p>I mocked this up while I was getting my hands dirty in <a href="http://nodejs.org/">NodeJS</a>. If I had to do something similar now, I would probably go with <a href="http://socket.io/">Socket.IO</a>.</p>
<div id="attachment_118" class="wp-caption alignnone" style="width: 410px"><a href="http://michelcarroll.com/wp-content/uploads/2013/02/node-e1361216688221.jpg"><img class=" wp-image-118 " alt="Command-Based Architecture using Comet" src="http://michelcarroll.com/wp-content/uploads/2013/02/node-e1361216688221.jpg" width="400" height="500" /></a><p class="wp-caption-text">Command-Based Architecture using Comet</p></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/draft-of-command-based-architecture-using-comet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Tower Defense Game using EaselJS &#8211; Part 1 &#8211; Planning &amp; Setup</title>
		<link>http://michelcarroll.com/html5-tower-defense-part-1/</link>
		<comments>http://michelcarroll.com/html5-tower-defense-part-1/#comments</comments>
		<pubDate>Sat, 12 May 2012 11:25:00 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Game Development]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.gamedevelopersweb.com/?p=418</guid>
		<description><![CDATA[You&#8217;ve been entrusted by a great and mighty game designer with the task of bringing his original game idea to life. Because of the slow death of Flash technology, and its replacement with canvas HTML5 technology, you have chosen to learn and use it. You also chose EaselJS as Javascript library to make your transition [...]]]></description>
				<content:encoded><![CDATA[<p>You&#8217;ve been entrusted by a great and mighty game designer with the task of bringing his original game idea to life.<br />
Because of the slow death of Flash technology, and its replacement with canvas HTML5 technology, you have chosen to learn and use it.<br />
You also chose <a title="EaselJS" href="http://www.createjs.com/#!/EaselJS" target="_blank">EaselJS</a><br />
as Javascript library to make your transition into the canvas world easier.</p>
<h3>Game Concept</h3>
<p>Orcs are coming to destroy your castle. You must train and position archers to slow their advance until the cavalry come.</p>
<h3>Game Elements</h3>
<ul>
<li>Orcs come in waves.  At the end of the wave, if the castle is still standing, the player wins.</li>
<li>Orcs come in different varieties: slow, fast, strong, weak, gold loot.</li>
<li>Archers come in different varieties: strong, long range, slowing effect, cost.</li>
<li>Orcs follow a predetermined path leading to the castle.</li>
<li>Archers stay from one round to the next, but can be sold back for half its cost.</li>
<li>Archers can be positioned anywhere on the map not within X feet from the path.</li>
</ul>
<p>Now that the requirements are put down on paper, let&#8217;s make a quick sketch of how this game is going to look like.<br />
This will give us some insight on which visual elements will need to be defined, and their relationship to one another.</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2012/05/sketch1.jpg"><img class="aligncenter size-full wp-image-425" title="HTML5GameDev" src="http://www.michelcarroll.com/wp-content/uploads/2012/05/sketch1.jpg" alt="" width="600" height="565" /></a></p>
<p>After some quick white-boarding, the game&#8217;s concept is much clearer in everybody&#8217;s mind. This is often a good way of brainstorming an interface and game flow, especially for visually dominant people like me. If you don&#8217;t already have a white-board in your office, I strongly recommend you purchase one.</p>
<p><em>Please note that for the sake of simplicity, I&#8217;m not putting a lot of emphasis on the game assets, such as the images. In other words, I know I&#8217;m a crappy artist, give me a break here&#8230;</em></p>
<h3>Setting up your project</h3>
<p>I&#8217;ve chosen to use <a href="http://www.jetbrains.com/webstorm/">WebStorm</a>, an IDE specializing in Javascript. You can, of course, use whichever environment you&#8217;re comfortable with.</p>
<p><strong>Important!!</strong></p>
<p>In order to correctly run this application, it&#8217;s going to need to be accessed through a web server (even your localhost will do). The reason for this being that the application will fetch image files in a different way than a normal HTML website. What I did was download an use <a href="http://www.wampserver.com/en/">WAMP</a>, an easy to install Windows linux server. I then moved my project folder inside <strong>C:/wamp/www/</strong>, and access it through the address <strong>http://localhost/tower_defense/</strong>.</p>
<p>I like keeping my file hierarchies simple and standard. Generally, I&#8217;ll keep all my source files inside a folder called <strong>src</strong>, and I&#8217;ll have a folder called <strong>vendor</strong> in the root of my project where I&#8217;ll put all third-party libraries inside. You can download the EaselJS library from either their <a href="https://github.com/CreateJS/EaselJS/">Github</a> repository or directly from their <a href="http://www.createjs.com/#!/EaselJS/download">website</a>. You can then place the contents of the library inside a folder called <strong>easeljs</strong> inside vendor.</p>
<p>This being a Javascript project, we&#8217;ll only need one HTML page to display the canvas. Per convention, we should call that one <strong>index.html</strong>.</p>
<p>Here&#8217;s a quick look at the file structure so far:</p>
<p><a href="http://www.michelcarroll.com/wp-content/uploads/2012/05/Capture1.png"><img class="aligncenter size-full wp-image-431" title="Capture" src="http://www.michelcarroll.com/wp-content/uploads/2012/05/Capture1.png" alt="" width="376" height="300" /></a></p>
<p>The index page will need to reference both the EaselJS library as well as our own game code. EaselJS ships with a minified file  containing the entire library. One of the reasons they do this to make it easy for programmers to include it in their project. The minified file is contained inside the <strong>lib</strong> folder, and is called something similar to <strong>easeljs-0.4.2.min.js</strong> (yours might be a different version).</p>
<p>Lets also create a blank Javascript file inside <strong>src </strong>called<strong> main.js </strong>which will later be responsible for initiating the game, and putting all the game components together.</p>
<p>Lets modify the <strong>index.html </strong>file to include both easeljs and our main JS file:</p>
<p><code></p>
<pre>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;HTML5 Tower Defense&lt;/title&gt;

    &lt;script src="vendor/easeljs/lib/easeljs-0.4.2.min.js"&gt;&lt;/script&gt;
    &lt;script src="src/main.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p></code></p>
<p>So far so good. To complete the setup, lets initiate a canvas, and draw a shape into it using an EaselJS function to make sure our pieces are working well together.</p>
<p>We&#8217;re going to add a canvas to the index file, call it <strong>main</strong> by setting it an ID. We&#8217;re all going to run a function called <strong>loadGame </strong>on body load. Here&#8217;s what it will look like:</p>
<p><code></p>
<pre>&lt;body onload="loadGame()"&gt;
    &lt;canvas id="main" width="800" height="600"&gt;&lt;/canvas&gt;
&lt;/body&gt;</pre>
<p></code></p>
<p>In our <strong>main.js</strong>, we&#8217;ll create a <strong>loadGame </strong>function that will simply initiate the canvas scene and draw a circle inside of it.<br />
Don&#8217;t worry if you don&#8217;t understand what&#8217;s going on in this function yet; the tutorial will go more in depth in the later posts.<br />
This is mainly used as a test to make sure the setup is correct.</p>
<p><code></p>
<pre>loadGame = function() {
    var canvas = document.getElementById('main');
    stage = new Stage(canvas);

    var g = new Graphics();
    g.setStrokeStyle(1);
    g.beginStroke(Graphics.getRGB(0,0,0));
    g.beginFill(Graphics.getRGB(255,0,0));
    g.drawCircle(0,0,3);
    var s = new Shape(g);
    s.x = 100;
    s.y = 100;
    stage.addChild(s);
    stage.update();
};</pre>
<p></code></p>
<p>If when you visit the web adresse (http://localhost/tower_defense/ in my case), you see a small red circle, your setup is complete. If not, open up the Javascript console (Ctrl-Shift-J in Chrome), and verify that the page isn&#8217;t throwing any errors.</p>
<p>That was the first part of the tutorial. Let me know in the comments if you have any comments, suggestions, or need help.</p>
<p>Here&#8217;s a <a href="http://www.michelcarroll.com/html5-tower-defense-part-2/">link to part 2</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/html5-tower-defense-part-1/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Simple Javascript HTML5 game example using EaselJS</title>
		<link>http://michelcarroll.com/simple-javascript-html5-game-example-using-easeljs/</link>
		<comments>http://michelcarroll.com/simple-javascript-html5-game-example-using-easeljs/#comments</comments>
		<pubDate>Sun, 06 May 2012 16:43:56 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Game Development]]></category>

		<guid isPermaLink="false">http://www.gamedevelopersweb.com/?p=406</guid>
		<description><![CDATA[I made a simple canvas game today as a way of getting initiated to the EaselJS library. You may download the source code in the post. I've also included the game itself embedded in the page.]]></description>
				<content:encoded><![CDATA[<p>I made a simple canvas game today as a way of getting my feet wet using <a title="EaselJS" href="http://www.createjs.com/#!/EaselJS" target="_blank">EaselJS</a> library.</p>
<p>You may download the source code here: <a href="https://github.com/MichelCarroll/SimpleEaselJSGame">https://github.com/MichelCarroll/SimpleEaselJSGame</a></p>
<p>Here&#8217;s the game embedded inside the page, as a demonstration of how easy HTML5 games are to publish seamlessly on the web:</p>
<p><script type="text/javascript" src="http://michelcarroll.com/blog_assets/easeljs/vendor/easeljs/lib/easeljs-0.4.2.min.js"></script><script type="text/javascript" src="http://michelcarroll.com/blog_assets/easeljs/src/game.js"></script><script>jQuery(document).ready(function() { loadGame("mainGameDiv", "http://michelcarroll.com/blog_assets/easeljs/assets/"); });</script><canvas id="mainGameDiv" width="600" height="600" style="border: darkgrey solid medium"></canvas></p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/simple-javascript-html5-game-example-using-easeljs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xtreme Game Programming Method</title>
		<link>http://michelcarroll.com/xtreme-game-programming-method/</link>
		<comments>http://michelcarroll.com/xtreme-game-programming-method/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 06:42:49 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Game Development]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.gamedevelopersweb.com/?p=344</guid>
		<description><![CDATA[I&#8217;m taking an opportunity to write about my Xtreme Game Programming method. Perhaps I&#8217;ll gain some insight on how to improve it. Basically, this method is meant to insure that adequate time is spent on the most important aspects of game development. Also, by keeping the iterations as short as humanly possible, I&#8217;m injecting as [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m taking an opportunity to write about my Xtreme Game Programming method. Perhaps I&#8217;ll gain some insight on how to improve it.</p>
<p>Basically, this method is meant to insure that adequate time is spent on the most important aspects of game development. Also, by keeping the iterations as short as humanly possible, I&#8217;m injecting as much feedback into the loop as I can.<br />
<img class="aligncenter size-medium wp-image-352" title="Xtreme Game Development" src="http://www.michelcarroll.com/wp-content/uploads/2011/06/2011-06-20-06.22.17.jpg6-225x300.jpg" alt="" width="225" height="300" /><br />
The<strong> first step</strong>, the design phase, lets the developer plan out the next feature of his application (or the basic outline if he hasn&#8217;t already done so). I estimate that this part shouldn&#8217;t last longer than 25 minutes. This step should ideally begin with a mini-brainstorming session, followed by filtering the most captivating feature out, and expanding on it. It should focus on the user experience, and not the technical aspects. However, a gut feeling of whether it&#8217;s a small enough enhancement will definitely come in handy to keep the iteration short.</p>
<p>The <strong>second step</strong> is the planning &amp; redaction of a set of function tests to ensure the correct functioning of the feature. This forces the developer to imagine and expand the end result before committing to it. I anticipate this step to take 15 minutes. According to TDD (or test-driven development), this is an essential exercise in order to forge a perfect user experience. Also, the test will make sure that the feature isn&#8217;t broken when come the time to add more. However, an iteration might be chosen to re-work/replace a feature, in which case perhaps the functional test will be re-worked itself.</p>
<p>The <strong>third step</strong> is the planning &amp; redaction of a set of unit tests to ensure the correct functioning of the individual units inside the application. I anticipate this step to take 10 minutes. This step, like the last, forces the developer to be proactive, and to imagine the simplest set of objects that should be required to accomplish this goal. This is also a TDD practice. At this point, the developer should have began imagining how this feature will fit into the application, and its exact implementation. However, the thinking should remain abstract, in order to make the application easy to understand to prying eyes.</p>
<p>The <strong>fourth step</strong> is to finally start implementing the feature into the application, and make the new function &amp; unit tests pass. According to TDD, at first, the developer&#8217;s sole purpose should be to make the tests pass, no matter how simplistic the code chosen to do so might be. The relevancy of this is to keep the implementation as simple as possible, and not code things that don&#8217;t need to be coded. I&#8217;m thinking that it should take around 10 minutes.</p>
<p>This<strong> fifth step(s)</strong> of the method are the refactoring steps. This step is repeated 4 times in a row, each lasting 5 minutes. During the phase, the developer sets out to make the code more robust, clean, and separate the responsibilities where they belong. Now that I think about it, this step should definitely be clocked at no more than 20 minutes, but can be divided in smaller cycles (2-4 minutes), or bigger cycles (6-8 minutes) depending on the size of the re-factor.</p>
<p>The <strong>sixth (and my favorite) step</strong> is to play the game! If the developer isn&#8217;t ready to take his creation out on a test run, he should perhaps rethink his initial purpose in creating a game. Plus, this lets him see the application from the user&#8217;s perspective, which will let him better design the next feature when come the next iteration. Even if the game is small/simple that that point, I think it&#8217;s important to at least spend 10 minutes playing through the actions, and giving yourself feedback on the strong points/weak points of the game. One should focus on having fun at that point, but also imagine possible improvements to the game.</p>
<p>The developer should ideally move directly to the feature design step after having test-played the game. The reason for this is that the game experience is still fresh inside the developer&#8217;s psyche, so designing the next feature will definitely be more effective. A break can be taken afterwards.</p>
<p>Hope you enjoyed this!</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/xtreme-game-programming-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acheiving Personal Goals &#8211; Video Game Style</title>
		<link>http://michelcarroll.com/acheiving-goals-video-game/</link>
		<comments>http://michelcarroll.com/acheiving-goals-video-game/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 08:15:56 +0000</pubDate>
		<dc:creator>MichelCarroll</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[goal setting]]></category>
		<category><![CDATA[personal goals]]></category>

		<guid isPermaLink="false">http://www.gamedevelopersweb.com/?p=264</guid>
		<description><![CDATA[The majority of us are easily distracted from our personal goals. We don&#8217;t see immediate value, so we stop achieving them. We just don&#8217;t see the benefit until it&#8217;s staring at us in the face! You&#8217;ll be glad to know that I&#8217;ve found a cheat code to achieving life goals. Read on if you&#8217;re ready [...]]]></description>
				<content:encoded><![CDATA[<p>The majority of us are easily distracted from our personal goals. We don&#8217;t see immediate value, so we stop achieving them.</p>
<p><strong>We just don&#8217;t see the benefit until it&#8217;s staring at us in the face!</strong></p>
<p>You&#8217;ll be glad to know that I&#8217;ve found a cheat code to achieving life goals. Read on if you&#8217;re ready to change your life for the better!</p>
<h4>The Secret? The Same Way Video Games Keep You Hooked</h4>
<p>Remember the last time you completed a level in a video game? Satisfying, isn&#8217;t it?</p>
<p>Can we apply the same mentality to personal goals? Yes!</p>
<p>I&#8217;ve developed a technique inspired from video games. Let me show you how it works:</p>
<h2>The Principle</h2>
<p>Our goals get forgotten about because the value is too far to keep us motivated. Video games know excellent techniques to keep you playing to the very last level.</p>
<p>Here are the primary ones:</p>
<ul>
<li>Visual progress bar</li>
<li>Incremental rewards</li>
<li>Specific &amp; achievable goals</li>
</ul>
<p>I&#8217;m going to introduce you to a goal achieving strategy that uses all 3 of these elements.</p>
<h3>1. The Mighty Progress Bar</h3>
<p>When you&#8217;re doing the right thing, video games let you know right away. Most games use a progress bar to do this.</p>
<p>When you can&#8217;t see progress being done, your brain sees the goal as either being <strong>0%</strong> done, or <strong>100%</strong> done. We&#8217;re all wired this way.</p>
<p>However, <strong>progress is always incremental</strong>! And making progress obvious is the key to giving yourself immediate feedback. This is why <strong>progress bars</strong> are so effective.</p>
<p>Here&#8217;s a basic progress bar I currently use for one of my goals:</p>
<p><img class="aligncenter size-full wp-image-265" title="Goal Setting Progress Bar" src="http://www.michelcarroll.com/wp-content/uploads/2011/03/ProgressBar_step1-e1301387585586.jpg" alt="Step 1 in Setting Goals like a Video Game" width="501" height="113" /></p>
<h3>2. The Incremental Reward System</h3>
<p>Visually showing goals being achieved is motivating, but not as much as obvious rewards.</p>
<p>The brain also needs to be constantly reminded of it&#8217;s purpose. That&#8217;s why good game designers use rewards to keep players motivated.</p>
<p>I&#8217;ve added 3 incrementing rewards. Here&#8217;s my updated progress bar:</p>
<p><img class="aligncenter size-full wp-image-266" title="Goal Setting Progress Bar" src="http://www.michelcarroll.com/wp-content/uploads/2011/03/ProgressBar_step2.jpg" alt="Step 2 in Setting Goals like a Video Game" width="520" height="160" /></p>
<p>Your rewards don&#8217;t need to be excessive, but they need to be convincing.</p>
<p>Ideally, these rewards compliment the effect of achieving the goal. IE: the mountain bike is enjoyed more fully in a fit &amp; exercised body.</p>
<p>Take that, evasive mind!</p>
<h3>3. The S.M.A.R.T Goal</h3>
<p>S.M.A.R.T is an acronym for the most important characteristics a goal must possess in order to maximize it&#8217;s power:</p>
<p><strong>S pecific<br />
M easurable<br />
A cheivable<br />
R ealistic<br />
T ime sensitive<br />
</strong></p>
<p>Video games are no fools when it comes to defining goals. If they were, the players would quickly get confused, discouraged, or annoyed, and leave!</p>
<p>Isn&#8217;t that what often happens to personal goals?</p>
<p>Don&#8217;t fall for it. <strong>Be smart!</strong> (pun intended)</p>
<h2>Instructions</h2>
<p>Use this tool wisely &#8211; You may actually get what you wish for!</p>
<h3>1. Choose 2 Goals to Begin</h3>
<p>By choosing too many, you risk overwhelming yourself. Oh, and remember to make sure your goals are S.M.A.R.T!</p>
<h3>2. Draw a Huge &amp; Fancy Progress Bar on a Big Paper, or Whiteboard</h3>
<p>Notice that I didn&#8217;t mention using a computer/PDA? That&#8217;s because our brains have an extremely short attention span when it comes to computers/gadgets.</p>
<p>Trust me. Offline is better for our purpose.</p>
<h3>3. Fill in your goal, units of increment, and progressive rewards</h3>
<p>Think long &amp; hard about your rewards. Make sure you will deliver the promise.</p>
<h3>4. Display the bar where you&#8217;re sure to notice it everyday.</h3>
<p>The office or bedroom is often a good idea.</p>
<h3>5. Make marking down progress a daily ritual</h3>
<p>When you get a part done, mark it as soon as you can.</p>
<h3>6. Always deliver your promised reward</h3>
<p><strong>Very important!</strong> If you skimp out at that glorious moment, you risk losing motivation &amp; momentum.</p>
<h2>In Closing</h2>
<p>Please comment out your thoughts &amp; feedback. I really wants this strategy to work for well for me as for everybody else reading this article.</p>
<p>If I can get enough positive feedback, I will post a second part to cover more information &amp; scenarios.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://michelcarroll.com/acheiving-goals-video-game/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
