<?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>thuanta.com &#187; Projects</title>
	<atom:link href="http://thuanta.com/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://thuanta.com</link>
	<description>Thuan's gamedev space on teh InterWeb</description>
	<lastBuildDate>Sat, 19 Apr 2008 19:04:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What I&#8217;ve been up to this term&#8230;</title>
		<link>http://thuanta.com/2008/04/18/what-ive-been-up-to-this-term/</link>
		<comments>http://thuanta.com/2008/04/18/what-ive-been-up-to-this-term/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 22:38:37 +0000</pubDate>
		<dc:creator>Thuan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[gpu]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[u of t]]></category>

		<guid isPermaLink="false">http://thuanta.com/2008/04/18/what-ive-been-up-to-this-term/</guid>
		<description><![CDATA[It&#8217;s been a long while since I&#8217;ve posted because I&#8217;ve been busy trying to finish my last term of undergraduate studies at U of T.  Today was the last day I submitted a course work before starting to study for my exams.
I&#8217;m taking another CSC490 capstone project course and this time I&#8217;m am (or [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long while since I&#8217;ve posted because I&#8217;ve been busy trying to finish my last term of undergraduate studies at U of T.  Today was the last day I submitted a course work before starting to study for my exams.</p>
<p>I&#8217;m taking another CSC490 capstone project course and this time I&#8217;m am (or rather, was) working on a project to simulate fluid dynamics using the <a href="http://en.wikipedia.org/wiki/Lattice_Boltzmann">Lattice Boltzmann Method</a> on a Nvidia 8000 series GPU.  This project was done for PhD student Scott Briggs, and I also worked with James Vaughan.  Here&#8217;s a video of the project:</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/kE-O1NULjNQ&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/kE-O1NULjNQ&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://thuanta.com/2008/04/18/what-ive-been-up-to-this-term/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capstone Project Course: Video Game Design</title>
		<link>http://thuanta.com/2007/10/25/capstone-project-course-video-game-design/</link>
		<comments>http://thuanta.com/2007/10/25/capstone-project-course-video-game-design/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 04:57:42 +0000</pubDate>
		<dc:creator>Thuan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[csc490]]></category>
		<category><![CDATA[snap!]]></category>
		<category><![CDATA[u of t]]></category>

		<guid isPermaLink="false">http://thuanta.com/2007/10/25/capstone-project-course-video-game-design/</guid>
		<description><![CDATA[Thing&#8217;s have been really busy and hectic that I haven&#8217;t had time to stop and think about what to write.  Actually that&#8217;s not true &#8212; a lot of things has happened but I haven&#8217;t had time to chill and write about them.  
I don&#8217;t think I&#8217;ve mentioned this yet but this term I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Thing&#8217;s have been really busy and hectic that I haven&#8217;t had time to stop and think about what to write.  Actually that&#8217;s not true &#8212; a lot of things has happened but I haven&#8217;t had time to chill and write about them. <img src='http://thuanta.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I don&#8217;t think I&#8217;ve mentioned this yet but this term I&#8217;m taking a Computer Science Project Course (CSC490) at school focusing on game design.  The course is being taught by <a href="http://www.cs.toronto.edu/~sengels/">Steve Engels</a> and the course homepage is <a href="http://www.cs.toronto.edu/~sengels/csc490/">here </a>for those who are interested.  Content is somewhat lacking but after all this is a new course and in the past few weeks he has made his slides along the way during course meeting times.  He also asks us to do some research on various game topics like what makes a bad game, what makes games fun, psychology of games, and character design.  Inspired by Jen&#8217;s blog, <a href="http://gigblog.org/"><i>Girls in Gaming</i></a>, the theme for the game design course this year is &#8220;women in gaming&#8221;.  There are roughly 20 students in the course and we have been put into teams up to four.  By the end of the course, each team is to produce a working prototype of an original game that would appeal to women and girls.  I was pretty happy about the topic when I first found out about it.</p>
<p>My team has come up with a game with the working title <i>Snap!</i> where the gameplay is a mix of <i>Metal Gear Solid</i> and <i>Beyond Good &#038; Evil</i>.  Not to give away too much in its early stages, the player would play as a paparazzi who goes around shooting photographs of celebrities in the city and sells the photos for money.  There are assignments the player would have to do in order to progress through the game.  One of the things we&#8217;ll be doing for our game, which I&#8217;ll be responsible for, is using the Wii Remote as the controller input for the game.  I&#8217;ll talk more about the game once we really get a working prototype.</p>
<p>So back to the course: just last week Steve announced to us that the game design course is now available as a regular course offering by the Computer Science Department!  The new course designation is CSC<b>404</b> &#8211; and it&#8217;s kind of fitting IMO.  Actually, the department up until now has been quite reluctant to offer any game related course because they considered it as &#8220;non-educational&#8221; or something of that nature.  But the demand IMO is quite high for game courses as it&#8217;s being asked every year by prospective U of T students only to be disappointed that there wasn&#8217;t any, which was too bad since it&#8217;s a good motivator for getting into Computer Science (like myself &#8212; I went specifically into it because I wanted to get into game development).  But anyway, it&#8217;s now being offered, so yay for the future students who&#8217;ll be taking it.</p>
]]></content:encoded>
			<wfw:commentRss>http://thuanta.com/2007/10/25/capstone-project-course-video-game-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Wii &#8220;Sensor&#8221; Bar project</title>
		<link>http://thuanta.com/2007/07/23/wiisensorbar/</link>
		<comments>http://thuanta.com/2007/07/23/wiisensorbar/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 06:52:26 +0000</pubDate>
		<dc:creator>Thuan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Wii]]></category>

		<guid isPermaLink="false">http://thuanta.com/2007/07/23/wiisensorbar/</guid>
		<description><![CDATA[I meant to post this a few days ago but I was exhausted&#8230; but here it is today.
Introduction
Inspired by the hacks and videos on the InterWeb about being able to use a Nintendo Wii Remote (Wiimote) controller on a PC, I bought a Wiimote a few months back so that I can use it on [...]]]></description>
			<content:encoded><![CDATA[<p>I meant to post this a few days ago but I was exhausted&#8230; but here it is today.</p>
<h5>Introduction</h5>
<p>Inspired by the hacks and <a href="http://www.youtube.com/watch?v=asY_I8y6C0M">videos </a>on the InterWeb about being able to use a Nintendo Wii Remote (Wiimote) controller on a PC, I bought a Wiimote a few months back so that I can use it on a PC via Bluetooth and hopefully dev some games that utilizes its motion based interface.  (Side note: I haven&#8217;t been able to pick up a Wii system yet as it&#8217;s still pretty hard to find a unit without camping out. <img src='http://thuanta.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  )  I&#8217;ve finally had the time to get started on using it.  First step though is to create a homebrew Wii &#8220;Sensor&#8221; Bar.  It&#8217;s really not a sensor bar as the name implies; all it really is is a bunch of infrared LEDs on the both ends of a bar &#8211; an infrared emitter if you will.  The Wiimote controller itself has the IR receivers which it can use to act as a pointing device.</p>
<p><i>Warning: some technical mumbo jumbo below.  </i></p>
<h5>Research</h5>
<p>Sunday evening last week was day 1 when I first started.  I spent the first day doing some research on net, on the forums and wiki of <a href="http://www.wiili.org">WiiLi.org</a> and <a href="http://wiibrew.org">WiiBrew.org</a>.  Most people on <a href="http://www.wiili.org/forum/building-a--und-quotsensor-und-quot-bar-t154.html">this thread</a> made their own bar using only four IR LEDs bought from Radioshack (part <a href="http://www.radioshack.com/product/index.jsp?productId=2062565&#038;cp">#276-143</a>) but I decided I wanted more than four.  Since I plan to use the Wiimote on my PC, I wanted to get power from the USB port which will always be available as long as a PC is around.</p>
<h5> Design </h5>
<p>On the following Monday I spent most of the day coming up with the circuit I wanted.  For electrical engineer majors, this step is probably a no brainer, but I&#8217;m not in electrical engineering and I&#8217;m still new to circuit theory.  I came up with a few designs and verified if it was correct with a couple of kind folks at <a href="http://avrfreaks.net/">AVRfreaks.net</a> (thanks!).  I ended up using the following parts in my design:</p>
<ul>
<li>6 IR LEDs (part# <a href="http://rocky.digikey.com/WebLib/Lite-on/Web%20Data/E4208.pdf">LTE-4208</a> &#8211;  940nm, 1.4V @ 50mA, 20º angle)</li>
<li>A prototype board apparently made by &#8220;Lab-Easy&#8221;, easy to cut with scissors(!).</li>
<li>18 ohms 1/4W resistor</li>
<li><a href="http://www.cypressindustries.com/products/images/ccusbb-32004-00x.gif">USB type B receptacle</a></li>
<li>~20 AWG gauge multi strand wires (for easy soldering)</li>
</ul>
<p>And here&#8217;s the very simple circuit diagram:</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/usb_sensor_sch.png' title='USB Wii Sensor Bar schematic diagram'><img src='http://thuanta.com/wp-content/uploads/2007/07/usb_sensor_sch.png' alt='USB Wii Sensor Bar schematic diagram' /></a></p>
<p>A little bit of circuit theory: It&#8217;s important to note that by default the USB port can only supply a current up to 100mA on the power line.  This circuit, in theory, will draw up to the maximum 100mA provided since there are two series of IR LEDs in parallel.  Drawing anymore could cause some power problems on the USB network&#8230;</p>
<h5>Aesthetics</h5>
<p>For the aesthetics, to make it look somewhat good, I used these from Active Surplus on Queen St. in downtown Toronto: 2 glass containers that will enclose the IR LEDs on each side and a foot long tube thingy made out of hard glue (I think).  In the picture I&#8217;ve already cut the plastic tube down to about 19 cm, which is roughly the distance between the left and right group of IR LEDs on a real Wii sensor bar.  I also made a cut on the right side which is where the USB connector will go.</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_tubes.jpg' title='USB Wii Sensor Bar - glass &#038; plastic tubes'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_tubes.jpg' alt='USB Wii Sensor Bar - glass &#038; plastic tubes' /></a></p>
<h5>Building it </h5>
<p>Tuesday and Wednesday were spent putting and soldering the circuit together.   I first cut out two rectangular pieces of the prototyping board with scissors.  I made them small enough so that each of them can easily fit inside each of the glass containers with the IR LEDs on it.  Then I soldered on an 18 ohms resistor and three of the IR LEDs all in a series for each board.  One one of them I added the USB connector.  This is what the two parts look like afterwards:</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ1.jpg' title='USB Wii Sensor Bar - Circuit boards 1'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ1.jpg' alt='USB Wii Sensor Bar - Circuit boards 1' /></a></p>
<p>Just like on the real sensor bar, the two outer IR LEDs in each group are angled outwards while the ones in between are straight.  I slightly bent the two outer IR LEDs on each side so that they&#8217;re angled while leaving the middle ones straight:</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ2.jpg' title='USB Wii Sensor Bar - Circuit boards 2'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ2.jpg' alt='USB Wii Sensor Bar - Circuit boards 2' /></a></p>
<p>Once that&#8217;s done, all that&#8217;s needed is to to finish the circuit is to connect the ground and +5V lines from both boards to the USB&#8217;s ground and +5V line with wires through the plastic tube to get this:</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ3.jpg' title='USB Wii Sensor Bar - Circuit boards 3'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ3.jpg' alt='USB Wii Sensor Bar - Circuit boards 3' /></a></p>
<p>For the board with the USB connector on it, I stuck that into the plastic tube first on the side with the opening for the USB connector and then I put some hot glue around it so that it would stay in place.</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ4.jpg' title='USB Wii Sensor Bar - USB connector'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_circ4.jpg' alt='USB Wii Sensor Bar - USB connector' /></a></p>
<p>After that I glued on the second board on the other side.  And finally I carefully put on the glass containers on both sides and hot glued them onto the plastic tube.  Now all I needed to do was connect a USB cable to it and voila!</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_done.jpg' title='USB Wii Sensor Bar - Finished'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_done.jpg' alt='USB Wii Sensor Bar - Finished' /></a></p>
<h5> It&#8217;s done! </h5>
<p>Even after plugging it in, the naked human eye can&#8217;t see anything different but if you look at it through a camera you can see a faint purple-ish glow emitting from the LEDs &#8211; it works!</p>
<p><a href='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_works.jpg' title='USB Wii Sensor Bar - It’s on and it works'><img src='http://thuanta.com/wp-content/uploads/2007/07/sensorbar_works.jpg' alt='USB Wii Sensor Bar - It’s on and it works' /></a></p>
<p>I tested the Wii remote with this sensor bar using a test application that comes with <a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx">ManagedWii</a> Wiimote driver library and I was able to pick up IR reception from as far away as 4 metres.  I also tried using the <a href="http://www.vkapadia.com/wii/windows.php">IR Windows mouse cursor script</a> included in the <a href="http://carl.kenner.googlepages.com/">GlovePIE </a>driver and it worked pretty nicely.  The Wiimote was able to move the mouse cursor across my entire 1280&#215;1024 desktop.  I was worried for a bit that the 20º angle range was too small but it doesn&#8217;t seem to be the case, at least not yet&#8230;  </p>
<h5>What&#8217;s next?</h5>
<p>Now that I have my sensor bar, it&#8217;s time to learn some C# and dig into XNA!</p>
]]></content:encoded>
			<wfw:commentRss>http://thuanta.com/2007/07/23/wiisensorbar/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Portfolio: OpenGL game demo Chariot of Fire</title>
		<link>http://thuanta.com/2007/06/24/portfolio-opengl-game-demo-chariot-of-fire/</link>
		<comments>http://thuanta.com/2007/06/24/portfolio-opengl-game-demo-chariot-of-fire/#comments</comments>
		<pubDate>Sun, 24 Jun 2007 07:45:30 +0000</pubDate>
		<dc:creator>Thuan</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://thuanta.com/2007/06/24/portfolio-opengl-game-demo-chariot-of-fire/</guid>
		<description><![CDATA[I have just put a portfolio page for projects that I&#8217;ve worked on so far (actually only one significant work which I am satisfied with.  The rest, although not at the time of completion, I feel a little embarrassed about and could use some more work and refining&#8230;).  Check it out.
]]></description>
			<content:encoded><![CDATA[<p>I have just put a portfolio page for projects that I&#8217;ve worked on so far (actually only one significant work which I am satisfied with.  The rest, although not at the time of completion, I feel a little embarrassed about and could use some more work and refining&#8230;).  <a href="http://thuanta.com/portfolio/chariot-of-fire/">Check it out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thuanta.com/2007/06/24/portfolio-opengl-game-demo-chariot-of-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
