
<?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>Vjeux &#187; Project</title>
	<atom:link href="http://blog.vjeux.com/category/project/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.vjeux.com</link>
	<description>French Web Developer</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:30:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Project &#8211; SC2Mapster</title>
		<link>http://blog.vjeux.com/2010/project/project-sc2mapster.html</link>
		<comments>http://blog.vjeux.com/2010/project/project-sc2mapster.html#comments</comments>
		<pubDate>Mon, 22 Mar 2010 09:09:08 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=1061</guid>
		<description><![CDATA[Starcraft II has been a beta for a month and I've been actively working on the map making features. The Galaxy Map Editor has not been released yet however it is already possible to do edit the map files.
My goal is not to develop a map but to build a community around that editor. With [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1060" class="wp-caption alignright" style="width: 210px"><a href="http://www.sc2mapster.com/" title="Starcraft 2 Maps"><img src="http://blog.vjeux.com/wp-content/uploads/2010/03/sc2mapster-logo.png" alt="SC2Mapster" title="SC2Mapster" width="200" height="169" class="size-full wp-image-1060" /></a><p class="wp-caption-text"><a href='http://www.sc2mapster.com/' title='Starcraft 2 Maps'>SC2Mapster</a></p></div>
<p>Starcraft II has been a beta for a month and I've been actively working on the map making features. The Galaxy Map Editor has not been released yet however it is already possible to do edit the map files.</p>
<p>My goal is not to develop a map but to build a community around that editor. With Curse co-workers we have launched the website <a href="http://www.sc2mapster.com/">SC2Mapster.com</a>.</p>
<p>In order to prepare the future We set up a documentation wiki. It is being filled by the community and currently contains the <a href="http://www.sc2mapster.com/api-docs/functions/">function listing</a>, the <a href="http://www.sc2mapster.com/api-docs/game-files/xml/">xml files descriptions</a>, a <a href="">Galaxy language overview</a> and <a href="http://www.sc2mapster.com/api-docs/">much more</a> ...</p>
<p>Here is a small part of the function listing:</p>
<blockquote style="text-align: left;">
<h5>Trigger</h5>
<p>Triggers are function that are executed when an event occur. These functions allow the user to create new triggers from custom functions and bind them to different events.</p>
<ul>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/trigger-create/">TriggerCreate</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/string/">string</a> func) - Create a new trigger from a function</li>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/trigger-output/">TriggerDebugOutput</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/int/">int</a> triggerDebug, <a href="http://wiki.sc2mapster.com/sc2-api/types/text/">text</a> message, <a href="http://wiki.sc2mapster.com/sc2-api/types/bool/">bool</a> UI) - Display a message in the trigger debug panel</li>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/trigger-add-event-map-init/">TriggerAddEventMapInit</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/int/">int</a> player, <a href="http://wiki.sc2mapster.com/sc2-api/types/trigger/">trigger</a> t) - Register a trigger that will be executed on map initialization</li>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/wait/">Wait</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/fixed/">fixed</a> seconds, <a href="http://wiki.sc2mapster.com/sc2-api/types/int/">int</a> timezone) - Pause the current trigger without blocking</li>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/trigger-add-event-chat-message/">TriggerAddEventChatMessage</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/trigger/">trigger</a> t, <a href="http://wiki.sc2mapster.com/sc2-api/types/int/">int</a> player, <a href="http://wiki.sc2mapster.com/sc2-api/types/string/">string</a> message, <a href="http://wiki.sc2mapster.com/sc2-api/types/bool/">bool</a> strict) - Register a trigger that will be executed on Chat Messages</li>
<li><a href="http://wiki.sc2mapster.com/sc2-api/functions/event-chat-message/">EventChatMessage</a>(<a href="http://wiki.sc2mapster.com/sc2-api/types/bool/">bool</a> strict) - Message content available on TriggerAddEventChatMessage callback</li>
</ul>
<p>This is a preview of the <a href="http://www.sc2mapster.com/api-docs/functions/">Starcraft II Galaxy Functions API</a>.
</p></blockquote>
<p>The website also hosts many map making related projects such as <a href="http://www.sc2mapster.com/maps/">maps</a>, <a href="http://www.sc2mapster.com/assets/">galaxy scripts</a> or <a href="http://www.sc2mapster.com/assets/">tilesets</a>. In order to prove that we are able to start working, I've been working on a Tower Defense: <a href="http://www.sc2mapster.com/maps/mapster-td/">Mapster TD</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2010/project/project-sc2mapster.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; WoW Genuine</title>
		<link>http://blog.vjeux.com/2010/project/project-wow-genuine.html</link>
		<comments>http://blog.vjeux.com/2010/project/project-wow-genuine.html#comments</comments>
		<pubDate>Fri, 22 Jan 2010 10:16:03 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[recruitment]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=982</guid>
		<description><![CDATA[Working on the World of Raids Guild Recruitment I needed to make sure the user was really member of the guild he claimed to represent. Since there is no official API and we don't want to ask for the user login and password, we had to find an other way.
The idea is to take advantage [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_988" class="wp-caption alignright" style="width: 185px"><a href="http://www.wowgenuine.com/"><img src="http://blog.vjeux.com/wp-content/uploads/2010/01/wowgenuine1-175x300.png" alt="WoW Genuine" title="WoW Genuine" width="175" height="300" class="size-medium wp-image-988" /></a><p class="wp-caption-text"><a href='http://www.wowgenuine.com/'>WoW Genuine</a></p></div>
<p>Working on the <a href="/2009/project/project-wor-guild-recruitment.html">World of Raids Guild Recruitment</a> I needed to make sure the user was really member of the guild he claimed to represent. Since there is no official API and we don't want to ask for the user login and password, we had to find an other way.</p>
<p>The idea is to take advantage of the official Armory. When the user logs off the game, his character profile is updated on the website. To make sure the user is who he pretends to be, we are going to ask him to make a change on his character, wait for the armory to update and verify.</p>
<p>Since it's a tool that can be useful to anyone, we decided to make it a standalone service with an open API. If you have a World of Warcraft website and feel the need to verify that your users are genuine, this is your chance!</p>
<p>It has been in activity since the launch of the recruitment tool. So far 100 conflicts have been automatically resolved thanks to this tool.</p>
<p>Check out <a href="http://www.wowgenuine.com/">WoW Genuine.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2010/project/project-wow-genuine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; WoR Guild Recruitment</title>
		<link>http://blog.vjeux.com/2009/project/project-wor-guild-recruitment.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-wor-guild-recruitment.html#comments</comments>
		<pubDate>Wed, 23 Dec 2009 17:26:27 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[recruitment]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=646</guid>
		<description><![CDATA[World of Raids Guild Recruitment
Guild recruitment is a recurrent problem in World of Warcraft, many attempt have been made but none succedeed so far. After a brainstorming we decided that the following points were crucial.

The guild recruiter has to spend less time as possible to set-up a guild and maintain it.
The guild search must be [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_647" class="wp-caption alignright" style="width: 310px"><a href="http://blog.vjeux.com/wp-content/uploads/2009/12/wor-recruit-search.png"><img src="http://blog.vjeux.com/wp-content/uploads/2009/12/wor-recruit-search-300x276.png" alt="World of Raids Guild Recruitment Search" title="wor-recruit-search" width="300" height="276" class="size-medium wp-image-647" /></a><p class="wp-caption-text"><a href='http://www.worldofraids.com/recruitment/'>World of Raids Guild Recruitment Search</a></p></div>
<h3>World of Raids Guild Recruitment</h3>
<p>Guild recruitment is a recurrent problem in World of Warcraft, many attempt have been made but none succedeed so far. After a brainstorming we decided that the following points were crucial.</p>
<ul>
<li>The guild recruiter has to spend less time as possible to set-up a guild and maintain it.</li>
<li>The guild search must be easy and focus on what people expect from their guild.</li>
</ul>
<p>With these points in mind, we had to find technical responses in order to make the <a href="http://www.worldofraids.com/recruitment/">World of Raids Guild Recruitment Tool</a>.</p>
<ul>
<li><strong>What You See Is What You Get</strong>: The guild management interface is the final display, there is no intermediate step.</li>
<li><strong>Tailored Widgets</strong>: About every widget has been heavily customized to fit the user need.</li>
<li><strong>Automatic Save</strong>: Every time you make a change, it is automatically published and available to anyone!</li>
<li><strong>Javascript Search</strong>: Having all the guilds fetched during the loading allows to have a complex filtering system instantly updated.</li>
</ul>
<h3>Guild Search</h3>
<p>Looking for a guild should no more be a pain! You just have to tweak the filters and result appear sorted as you edit them! No more long page reload or even ajax requests. It is instant!</p>
<p>We focused hard on making filters one click away. We also took great care of the raid time filter, it is an important aspect of the guild choice that is too often avoided because of its complexity.</p>
<p><object width="100%" height="400"><param name="movie" value="http://www.youtube.com/v/leoCXK8lDf8&#038;hl=fr_FR&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/leoCXK8lDf8&#038;hl=fr_FR&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400"></embed></object></p>
<p>For more details on the optimizations made, see the post <a href="/2009/javascript/guild-recruitement-search-optimizations.html">Guild Recruitement – Search Optimizations</a>.</p>
<h3>Guild Management</h3>
<p>Our original goal was to be able to create a guild in less than a minute (yes, 60 seconds!) and we pretty much did it. The proof in the following video.</p>
<p>In order to achieve this, we opted for a Wysiwyg approach to remove the need of making two interfaces for both display and edition. Every widget has been tailored to fit the user needs. For example, as soon as you enter your name and realm, it automatically gathers your progression from the official website.</p>
<p><object width="100%" height="400"><param name="movie" value="http://www.youtube.com/v/qyQuPpPLTmo&#038;hl=fr_FR&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qyQuPpPLTmo&#038;hl=fr_FR&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-wor-guild-recruitment.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; Fooo</title>
		<link>http://blog.vjeux.com/2009/project/project-fooo.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-fooo.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 18:46:41 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=376</guid>
		<description><![CDATA[Presentation
Fooo is my first year school project written in Delphi. During 8 months, Vladimir Nachbaur, Alban Perillat-Merceroz, Felix Abecassis and I developed a game that mimics Warcraft III and achieved to be major of the promotion. 
We tried to make no use of copyrighted Warcraft files, however, a large majority of custom models are based [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_377" class="wp-caption alignright" style="width: 106px"><a href="http://hgf.fooo.fr/en/index.html"><img src="http://blog.vjeux.com/wp-content/uploads/2009/09/fooo_avatar1.png" alt="Fooo" title="Fooo" width="96" height="96" class="size-full wp-image-377" /></a><p class="wp-caption-text"><a href='http://hgf.fooo.fr/en/index.html'>hgf.fooo.fr</a></p></div>
<h2>Presentation</h2>
<p><a href="http://hgf.fooo.fr/en/index.html">Fooo</a> is my first year school project written in Delphi. During 8 months, Vladimir Nachbaur, Alban Perillat-Merceroz, Felix Abecassis and I developed a game that mimics Warcraft III and achieved to be major of the promotion. </p>
<p>We tried to make no use of copyrighted Warcraft files, however, a large majority of custom models are based on Warcraft files at some point and use some of their textures. All the interface graphic, icons, models has been made by fans and we are using them with their approbation.</p>
<p>What's the game able to do :</p>
<ul>
<li>Animated 3D Models</li>
<li>Interface in XML/Lua</li>
<li>Building &#038; Unit creation</li>
<li>Group and Subgroup management</li>
<li>Group movement with formations</li>
<li>Ranged &#038; Melee Attacks</li>
<li>Multiplayer over LAN or Internet</li>
<li>Ingame Chat</li>
<li>2 Races: Treants and Rats</li>
<li>And much more ...</li>
</ul>
<h3>Demonstration Video</h3>
<p><object width="100%" height="400px"><param name="movie" value="http://www.youtube.com/v/rZh6L40TJMY&#038;hl=fr&#038;fs=1&#038;ap=%2526fmt%3D22"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rZh6L40TJMY&#038;hl=fr&#038;fs=1&#038;ap=%2526fmt%3D22" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400px"></embed></object></p>
<p />
<h2>My work in the project</h2>
<h3>Interface</h3>
<p>A RTS game is requiring a lot of user interaction, so it needs a complex interface. I decided to make an interface engine like the one used by World of Warcraft. The content is displayed through XML files and scripted with Lua. If you are not familiar with this, you can think the XML as HTML and Lua as Javascript.</p>
<p>The interface engine is able to do the following:</p>
<ul>
<li>Supports Frame, Texture and FontString elements</li>
<li>Ability to draw Backgrounds and Borders from images</li>
<li>Mouse and Keyboard Interaction</li>
<li>Inheritance and Virtual Frames</li>
<li>Position through 2 Anchor points (element and its relative)</li>
</ul>
<h3>3D Engine</h3>
<p>The 3D Engine is written on top of OpenGL. I've been confronted to two major problems. The first one is the Warcraft III models: there is really few documentation on them so i had to spent quite some time to reverse engineer them and figure out how animation were working.<br />
The engine had to be optimized in many ways. At first, displaying one building was freezing the PC, now we are able to show more than 100 units and the game still runs smoothly.</p>
<p>The 3d engine is able to do the following:</p>
<ul>
<li>Animated Warcraft III Models</li>
<li>Camera: Zoom and Rotation</li>
<li>3D Picking</li>
<li>Frustum Culling</li>
<li>Vertex Array</li>
</ul>
<h3>Learn more</h3>
<p>If you want to learn more, for each presentation we made a 30 page document (french) explaining in detail the progression. You can read them at <a href="http://hgf.fooo.fr/en/downloads.html#docs">hgf.fooo.fr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-fooo.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project &#8211; CosmosUI</title>
		<link>http://blog.vjeux.com/2009/project/project-cosmosui.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-cosmosui.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 17:43:54 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=275</guid>
		<description><![CDATA[CosmosUI is an open source interface modification of World of Warcraft. Many of the CosmosUI additions were later implemented by Blizzard on the default interface.
I had been doing Warcraft III map making for more than a year when World of Warcraft has been leaked. This was really exciting to hack into the game and being [...]]]></description>
			<content:encoded><![CDATA[<p><i>CosmosUI is an open source interface modification of World of Warcraft. Many of the CosmosUI additions were later implemented by Blizzard on the default interface.</i></p>
<p>I had been doing Warcraft III map making for more than a year when World of Warcraft has been leaked. This was really exciting to hack into the game and being able to modify it. Since I had no real programming knowledge at the time, I could not help people making a server for the game. However, I found the interface in XML and Lua really interesting and spent some time tweaking it.</p>
<p>There was nothing real to do in the sandbox servers at the time, I spent some time programming MiniGames (TicTacToe, Connect 4) in the interface. I have been remarked by Thott (<a href="http://www.thottbot.com/">thottbot.com</a>) that gave me a Beta key in order to work on the open source interface modification project he took part: <a href="http://cosmosui.org/index.php">CosmosUI</a>.</p>
<p>I have been working on CosmosUI during the whole beta and these are my notable additions.</p>
<h3>QuestMinion</h3>
<p>During the Beta of World of Warcraft, the only way to see your quest progression was to open the quest log and search for the quest you were doing. I made an addon that would show a summary of the quest you wanted in a small movable box located under the minimap by default.</p>
<p>Since I did not want to maintain a standalone version people started making addons with this concept. The most successful is <a href="http://wow.curse.com/downloads/wow-addons/details/monkey-quest.aspx">MonkeyQuest</a> downloaded 1 million times. Blizzard added later a Quest Tracker functionality to the World of Warcraft default interface that is a nearly exact copy of QuestMinion. The game Warhammer Online made the same choice for its interface.</p>
<div class="div-clear">
<div id="attachment_280" class="wp-caption alignleft" style="width: 160px"><a href="http://blog.vjeux.com/wp-content/uploads/2009/08/quest_minion.png"><img src="http://blog.vjeux.com/wp-content/uploads/2009/08/quest_minion-150x150.png" alt="Quest Minion" title="quest_minion" width="150" height="150" class="size-thumbnail wp-image-280" /></a><p class="wp-caption-text">Quest Minion</p></div> <div id="attachment_283" class="wp-caption alignleft" style="width: 160px"><a href="http://www.worldofwarcraft.com/info/underdev/images/tracker.jpg"><img src="http://blog.vjeux.com/wp-content/uploads/2009/08/quest_minion_wow.png" alt="World of Warcraft" title="quest_minion_wow" width="150" height="150" class="size-full wp-image-283" /></a><p class="wp-caption-text">World of Warcraft</p></div> <div id="attachment_281" class="wp-caption alignleft" style="width: 160px"><a href="http://blog.vjeux.com/wp-content/uploads/2009/08/quest_minion_warh.png"><img src="http://blog.vjeux.com/wp-content/uploads/2009/08/quest_minion_warh-150x150.png" alt="Warhammer Online" title="quest_minion_warh" width="150" height="150" class="size-thumbnail wp-image-281" /></a><p class="wp-caption-text">Warhammer Online</p></div>
</div>
<h3>Addonification</h3>
<p>At the beginning, CosmosUI was just modifications of the World of Warcraft interface files. This was good for small modifications but once CosmosUI grew, we had to make some tricky diff every time a World of Warcraft patch was released. CosmosUI was the only interface modification at the time, so people would be without interface for about 12-24 hours while we were merging everything.</p>
<p>I found a solution to this problem. Instead of modifying the actual code, we can hook the specified function and put our custom code in another file of our own.</p>

<div class="wp_syntax"><div class="code"><pre class="lua" style="font-family:monospace;"><span style="color: #b1b100;">local</span> thefunction_backup <span style="color: #66cc66;">=</span> thefunction
thefunction <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#41;</span>
  <span style="color: #808080; font-style: italic;">-- Do what we want before</span>
  thefunction_backup<span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#41;</span>
  <span style="color: #808080; font-style: italic;">-- Do what we want after</span>
<span style="color: #b1b100;">end</span></pre></div></div>

<p>I first moved my modifications out of the Blizzard code and everyone started to do so. Then a few weeks later Blizzard implemented an addon manager into the game. With the preliminary work we did, it was really easy to transform CosmosUI into an addon without any file dependency.</p>
<h3>Localization</h3>
<p>When I started working on CosmosUI, it was only available in English. Since I am French, I wanted my fellows to be able to use it in their native language. </p>
<p>CosmosUI being a compilation of multiple addons, I first started to make a translation template and applied it to my own addons. Then I put all the strings of all the CosmosUI addons into their respective English translation file. And finally, I formed a translation team composed of French and German people.</p>
<p>Once everything was translated, I started to advertise CosmosUI in the French community and made the technical support.</p>
<h3>Sky - Communication Library</h3>
<p>In order to make my MiniGames multiplayer, i had to transfert data between the two players. The only way at the time to achieve it was by text messages. However, they are visible to the user. My work on Sky was to automatically join a channel, hide all messages from this channel, make it invisible to the user and finally intercept the incoming messages.</p>
<p>Since channels were only available with command lines, they weren't used that much and their internal API was really buggy. Most of the job was to find workarounds for these bugs. Sometimes channels weren't saved across sessions, they would be joined there but not listed or not joinable at all. For more information you can read the description on <a href="http://www.wowwiki.com/Sky">WoWWiki</a></p>
<h3>Quote</h3>
<p>“<i>Christopher was one of our top contributors on the Cosmos project, overseeing both community relationships in the French community as well as developing several mods within the community. The most revolutionary of these was the Quest Helper addon, which became so infamous and popular that Blizzard added it into their base UI. Christopher was a major contributor to the project's culture, content and community. It would not have been the success it was without his direct contribution and passionate commitment.</i>” April 27, 2009 -- Alexander Brazie, Cosmos UI Team Leader. (<a href="http://www.linkedin.com/in/vjeux">LinkedIn</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-cosmosui.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; MMO-Champion Optimization</title>
		<link>http://blog.vjeux.com/2009/project/project-mmo-champion-optimization.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-mmo-champion-optimization.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 16:30:59 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=484</guid>
		<description><![CDATA[MMO-Champion is the biggest news website of World of Warcraft. The main page is viewed millions times a month and was done with old school tables. As a result, it was really slow to load but worse, all the content had to be loaded before being displayed.
The first thing I did was to rewrite the [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_485" class="wp-caption alignright" style="width: 310px"><a href="http://www.fooo.fr/~vjeux/boub/mmoc/"><img src="http://blog.vjeux.com/wp-content/uploads/2009/09/mmoc.png" alt="MMO-Champion" title="MMO-Champion" width="300" height="206" class="size-full wp-image-485" /></a><p class="wp-caption-text"><a href='http://www.fooo.fr/~vjeux/boub/mmoc/'>MMO-Champion</a></p></div>
<p><a href="http://www.mmo-champion.com/">MMO-Champion</a> is the biggest news website of World of Warcraft. The main page is viewed millions times a month and was done with old school tables. As a result, it was really slow to load but worse, all the content had to be loaded before being displayed.</p>
<p>The first thing I did was to rewrite the whole main page template using clean and valid HTML + CSS. The goal was to make it compatible up to IE6. The rendering was so much pixel perfect that nobody noticed a change when we pushed it live.</p>
<p>The main challenge was to rewrite the menu. Previously, the menu was using several images that were cut in order to make it easy to implement it in CSS. However, it was a torture to add another menu. The new one is now using a single image that is basically a screenshot of the rendered menu.</p>
<p>In order to save bandwidth, if the browser is supporting HTML5, instead of storing the menu state in a cookie, it is saved under the new localStorage feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-mmo-champion-optimization.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; Cineartistes</title>
		<link>http://blog.vjeux.com/2009/project/project-cineartistes.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-cineartistes.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 12:15:05 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=350</guid>
		<description><![CDATA[Philippe Pelletier has been gathering information of people working on the cinema industry for years as a hobby. He realized that people could be interested in his work and he could share it over the internet.
The website Cineartistes.com is a database of biographies and filmographies of actors, film directors. Some of them contains a gallery [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_367" class="wp-caption alignright" style="width: 260px"><a href="http://www.cineartistes.com/"><img src="http://blog.vjeux.com/wp-content/uploads/2009/08/cineartistes2.PNG" alt="Cineartistes.com" title="cineartistes" width="250" height="378" class="size-full wp-image-367" /></a><p class="wp-caption-text">Cineartistes.com</p></div>
<p>Philippe Pelletier has been gathering information of people working on the cinema industry for years as a hobby. He realized that people could be interested in his work and he could share it over the internet.</p>
<p>The website <a href="http://www.cineartistes.com/">Cineartistes.com</a> is a database of biographies and filmographies of actors, film directors. Some of them contains a gallery of photographies and film covers. There is a section dedicated to awards (Oscars, Césars ...). </p>
<p>There are two points that make the project unique:<br />
<b>Content is parsed from a Word Document</b>. Philippe Pelletier had thousands of already written Word documents when he asked me to create the website. What he has to do is copy &#038; paste from Word to a textbox. The parser analyzes the text and automatically adds italic, bold and color for filmographies.</p>
<p><b>Names in biographies are automatically linkified</b>. In order to have a smooth navigation in the site, artists names in the biographies are transformed into links. This is working retroactively and without any special markup for the content manager.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-cineartistes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; Conference Delphi</title>
		<link>http://blog.vjeux.com/2009/project/project-conference-delphi.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-conference-delphi.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 11:20:22 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=408</guid>
		<description><![CDATA[Together with Alban Perillat-Merceroz, we organized a one-hour presentation of the programming langage Delphi followed by 3 hours of exercises. The objective was to introduce Delphi to the students in order for them to be able to start working on their year project.
Students had no more than two months experience of programming with Caml, a [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_411" class="wp-caption alignright" style="width: 260px"><img src="http://blog.vjeux.com/wp-content/uploads/2009/09/GConfs_delphi_v2_min1.jpg" alt="Conference Delphi" title="Conference Delphi" width="250" height="354" class="size-full wp-image-411" /><p class="wp-caption-text">Conference Delphi</p></div>
<p>Together with Alban Perillat-Merceroz, we organized a one-hour presentation of the programming langage Delphi followed by 3 hours of exercises. The objective was to introduce Delphi to the students in order for them to be able to start working on their year project.</p>
<p>Students had no more than two months experience of programming with Caml, a functional (opposite of imperative) language. The first part of the presentation was a comparison between the two paradigms and how to move from interpreted to compiled code. Then, a brief explanation of the various structures of the languages and how to organize files around the project has been explained.</p>
<p>Even if the conference was not mandatory and took place a friday 9pm, there were about 200 students attending. They have been split into two room and attended the presentation made by Alban and myself. Right after, they moved to the computer rooms and started working on the exercises.</p>
<p>The exercises focused on very basic things like function definition, for, while and structures for the most advanced. We formed a team of 15 people helping everyone out. Overall, this has been a success. You can download the <a href="http://perso.epita.fr/~chedea_c/Conf_Delphi/Conf_Delphi.ppsx">Presentation Slides</a> (Powerpoint 2007), <a href="http://perso.epita.fr/~chedea_c/Conf_Delphi/TP_Delphi.pdf">Exercises subject</a> (PDF) and <a href="http://perso.epita.fr/~chedea_c/Conf_Delphi/Correction.zip">Correction</a> (ZIP).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-conference-delphi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project &#8211; Shortest Path</title>
		<link>http://blog.vjeux.com/2009/project/project-shortest-path.html</link>
		<comments>http://blog.vjeux.com/2009/project/project-shortest-path.html#comments</comments>
		<pubDate>Tue, 04 Aug 2009 09:56:52 +0000</pubDate>
		<dc:creator>vjeux</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://blog.vjeux.com/?p=422</guid>
		<description><![CDATA[A school project was to find the shortest path in a dungeon graph. You start with an amount of hit points, and each edge gives or removes hit points. You have to find the path from two points going through the minimum of edges (no matter their value) alive (hp > 0 all along the [...]]]></description>
			<content:encoded><![CDATA[<p>A school project was to find the shortest path in a dungeon graph. You start with an amount of hit points, and each edge gives or removes hit points. You have to find the path from two points going through the minimum of edges (no matter their value) alive (hp > 0 all along the path). The difficulty here is that you have to go a finite amount of time through absorbing cycle to complete interesting graphs. Here is the <a href="/wp-content/uploads/2009/09/miniprojC.htm">full subject</a>.</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 517px"><img src="http://blog.vjeux.com/wp-content/uploads/2009/09/graph.png" alt="Example dungeon graph" title="Example: dungeon graph" width="507" height="177" class="size-full wp-image-427" /><p class="wp-caption-text">Example: dungeon graph</p></div>
<p><strong>Example</strong>: You start with 10 hp. The shortest path is <cite>[1, 2], [3, 4, 2] * 492, [3, 5]</cite>. You notice that you have to loop a huge number of time on the <cite>[3, 4, 2]</cite> cycle that gives you 1 hp per run.</p>
<p>The common solutions were either a custom Breadth First Search or Dijkstra algorithm along with a heuristic. It is easy to write, always gives the shortest path and have <a href="http://wiki-prog.kh405.net/index.php/MPC2009:Correction">space for improvement</a>. However, it has a major flaw: it doesn't scale well with high values. Instead of 500, put 50 000 000 and it will run forever.</p>
<p>My approach is to detect the cycles and find the best cycle organization. In this example, you would notice that <cite>[3, 4, 2]</cite> is a cycle that takes 3 edges and gives 1 hp. You come to this cycle with 9 hp, you need to pass with 501 hp so you need to take this cycle (501 - 9) = 492 times.</p>
<h3>Finding Atomic Paths &#038; Cycles</h3>
<h4>Definition</h4>
<p>What we want to do is find all the possible paths going from point A to point B. Since there are cycles involved, you can't just go through and enumerate them all. Instead, you will have to find atomic path that doesn't loop and the smallest possible cycles (you don't want your cycle to repeat itself). </p>
<p>The first definition I took of an atomic path is a path that does not go through the same node twice. However, I found out that is was not taking all possibilities. After some reflexion, I figured out that nodes aren't important, however edges are! So <i>an atomic path is a path that does not go through the same edge twice</i>.</p>
<p>This definition is handy, it also works for cycles: <i>an atomic cycle of point A is an atomic path that goes from point A and ends to point A</i>.</p>
<h4>Implementation</h4>
<h5>Atomic Paths <i>A -> B</i></h5>
<p>In order to get all the path starting from point A, we are going to traverse the graph recursively from the point A. While going through a child, we are going to make a link <i>child -> parent</i> in order to know all the edges we have already crossed. Before we go to that child, we must traverse that linked list and make sure the specified edge has not been already walked through.</p>
<p>When we arrive to the destination point, we can store the path we found.</p>
<h5>Freeing the list</h5>
<p>A problem occurs when you want to free the linked list. It is basically a tree chained in the reverse order. A solution would be to double-link that list and when all the atomic paths been found, free the tree from the starting point. </p>
<p>But a clever solution is to use a reference counting (inspired from Garbage Collection). Each time you add a link to a parent you adds one to its reference count. Then, when you arrive at the end of a path, you go backward and free while the reference count equals to 1. If it is higher, you just remove one and stop.</p>
<h5>Atomic Cycle A</h5>
<p>Looking for the atomic cycle of A is the same as looking for the atomic path from A to A. However there are several optimizations we can do. First, when we arrive at the destination point, we want to save the path only if the sum of the edges cost is negative: we only want to go through absorbing cycles.</p>
<p>As you have seen previously, the whole graph is being traversed when looking for an atomic path. Instead, we can limit the search area to the strongly connected component containing A. Finding these components requires a simple traverse of the graph with <a href="http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm">Tarjan's algorithm</a>.</p>
<h3>Combining Atomic Paths and Cycles</h3>
<p>At this point, we have all the atomic paths that goes from A to B and all the atomic cycles of each node, left to us to organize everything to get the shortest path. From now on we are going to study how to find the best combination of atomic cycles in an atomic path.</p>
<p>In order to see the problem, we can use a digression. Imagine a plane that wants to cross a mountain. The only way to get up is to stay on hot air spot for a while. He has to chose the best combination of spots in order to go over each peak loosing as little time as possible.</p>
<h4>Atomic Cycle Characteristics</h4>
<p>Absorbing cycles can only be unlocked when moving through the path. In the example, the cycle <cite>[3, 4, 2]</cite> is only available after being on the node 2. So you have to have 1 hp to get to node 2 and 1 more hp to get to node 3 and then be able to get the -3 bonus. This highlights an important characteristic: minimum hp. Each cycle and node have a minimum hp to be visited.</p>
<p>We are now able to fully describe an atomic cycle with these four characteristics:</p>
<ul>
<li>Entry point</li>
<li>Edge count</li>
<li>Cost (negative)</li>
<li>Mininum hp</li>
</ul>
<h4>Nodes to States</h4>
<p>Atomic cycles have an inner minimum hp, hence, this is not possible to merge them with their entry point. We have to make a virtual state representing the possibility to walk that cycle. The condition of that state is having at least <i>node minimum hp + cycle minimum hp</i>. This way we can define a state minimum hp.</p>
<div id="attachment_468" class="wp-caption aligncenter" style="width: 315px"><img src="http://blog.vjeux.com/wp-content/uploads/2009/08/mod11.png" alt="Example: Node to State" title="Example: Node to State" width="305" height="430" class="size-full wp-image-468" /><p class="wp-caption-text">Example: Node to State</p></div>
<p>In the example, the third node has a minimum hp of <i>1 + 2</i> and the yellow cycle has a minimum hp of 1, so the resulting state has a minimum hp of 4. </p>
<p><strong>Warning:</strong> This technique is subject to <a href="http://blog.vjeux.com/wp-content/uploads/2009/08/mod21.png">overlapping</a>. I did not find an efficient way to handle this case so it can generate wrong result.</p>
<h4>Greedy Combination</h4>
<p>What we have now is a list of states, each one unlocking one or more cycles. We have to find the best combination of cycles.</p>
<p>We have first to define what is the best cycle. There can be two definitions based on the ratio hp / edge.</p>
<ul>
<li><strong>Global ratio</strong>: The one that gives the most hp per edge.
</li>
<li><strong>Local ratio</strong>: The one that goes from A to B with the less number of edges</li>
</ul>
<p>We could be tempted to use the global ratio but this is not a good idea. Imagine you need to get 2 hp to go to the end. You don't want to use the cycle that gives you 1 billion hp for only 100 edges when there is a cycle that gives you 2 hp for 10 edges.</p>
<p>A simple algorithm to find a good solution is to take the cycle with the best local ratio available at state A enough times to go to state B, then repeat the same process with cycles available at state B to go to state C and so on. </p>
<p>This works great but is too much subject to local errors. Let say you have the two cycles of the previous example available at state A and you want to go to state Z that is 200 hp away with small steps between. You will always choose the cycle that gives you 2 hp for 10 edges and end up with 200 edges when you could have used the 1 billion hp for 100 edges in the first time.</p>
<p>A solution is to sophisticate the algorithm a little. Instead of doing <i>[A -> B -> C -> D]</i>, we are going to do <br /><i>[A -> B -> C -> D]</i>, <i>[A -> C -> D]</i>, <i>[A -> B -> D]</i> and <i>[A -> D]</i> and see what's best. This is more processing but gives much better results.</p>
<p><strong>Warning:</strong> This method does not give the best possible combination, only an approximation. Also, it does not handle cases were a combination of multiple cycles is better than a single cycle to go from one state to another.</p>
<h4>Optimizations</h4>
<p>Before attempting to compute an atomic path, take the cycle with the best global ratio available and see how many edges would be necessary to get to the end with that ratio. If that's superior to the already found shortest path, it is worthless to do it. This simple test should allow you to skip the majority of the paths.</p>
<p>When you are generating the states, you do not have to take care of cycles when there is a better one available before. A better cycle is a cycle that has less edges for the same amount of hp. This reduces the number of states, therefore by a great factor the number of combinations needed in the sophisticated algorithm.</p>
<h3>Conclusion</h3>
<h4>Advantages</h4>
<h5>Complexity edge value independent</h5>
<p>The main advantage of this method is that the complexity depends of the number of nodes and the density of the graph but is not affected by edge values. If you set the critical edge to be 50 or 50 000 000, this will give you the result in the same time. However, the time required increases faster with the number of nodes than the basic method.</p>
<h5>Parallelizable code</h5>
<p>To compensate, the code becomes parallelizable. During the first step, you can give each atomic path and cycle detection to different computers at the same time. Then, each path can be computed no matter the order.</p>
<h5>Low memory output</h5>
<p>The main problem with the basic method is memory allocation. For each node of the final and potential (to some extent) paths a memory chunk is allocated. When you are testing you usually do it with long paths and memory becomes really fast the limiting factor.</p>
<h4>Disadvantages</h4>
<h5>Much more code</h5>
<p>The resulting code is much bigger than the basic method. This means a longer development time, more bugs.</p>
<h5>Not perfect result</h5>
<p>The real problem are the edge cases when it does not return the shortest path or worse, when it gives an invalid path. The three problems are the overlapping issue when converting nodes to states, the greedy algorithm to find combinations and finally the single-only cycle to go from one state to another.</p>
<p>I don't know if all of them could be fixed without seriously affecting the complexity of the algorithm. </p>
<h5>Is strongly depending of the size of the graph</h5>
<p>Since the algorithm does a brute force of all possibilities, the complexity goes exponentially with the size of the graph. However, in the case of the project, we were told that only small (no more than 50 nodes) would be tested.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vjeux.com/2009/project/project-shortest-path.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
