<?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>Anthor.Net &#187; Développement</title>
	<atom:link href="http://www.anthor.net/blog/category/developpement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anthor.net</link>
	<description></description>
	<lastBuildDate>Mon, 05 Dec 2011 16:29:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WebGL avec Three.js</title>
		<link>http://www.anthor.net/blog/developpement/webgl-avec-three-js/</link>
		<comments>http://www.anthor.net/blog/developpement/webgl-avec-three-js/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 13:23:30 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=794</guid>
		<description><![CDATA[Avec l&#8217;arrivée de WebGL dans les derniers navigateurs, il était temps de faire quelques essais. N&#8217;ayant aucune connaissance en programmation 3D, je me suis aidé de Three.js, une librairie permettent de proposer un API &#171;&#160;simple&#160;&#187;. La documentation est inexistante, mais les exemples fournis sont nombreux et permettent rapidement d’obtenir quelques résultats, à condition d&#8217;avoir de [...]]]></description>
			<content:encoded><![CDATA[<p>Avec l&#8217;arrivée de WebGL dans les derniers navigateurs, il était temps de faire quelques essais. N&#8217;ayant aucune connaissance en programmation 3D, je me suis aidé de <a href="https://github.com/mrdoob/three.js" target="_blank">Three.js</a>, une librairie permettent de proposer un API &laquo;&nbsp;simple&nbsp;&raquo;. La documentation est inexistante, mais les exemples fournis sont nombreux et permettent rapidement d’obtenir quelques résultats, à condition d&#8217;avoir de bonnes connaissances en JavaScript et de savoir se débrouiller !<br />
<span id="more-794"></span><br />
Pour commencer, il me fallait quelque chose de simple, jouant à Minecraft depuis quelques mois, je me suis dit, qu’utiliser des cubes serait un bon moyen de tester les possibilités, sans entrer dans des formes complexes. De ce constat est né l&#8217;idée de <a href="http://www.minecraft-blueprint.net/" target="_blank">Minecraft Blueprint</a>, un service qui permettrait de créer des formes en ligne, composées des matériaux disponibles dans Minecraft, et proposant aux visiteurs de pouvoir recréer ces plans avec facilité.</p>
<p>Je n&#8217;avais pas prévu au départ d&#8217;ouvrir le site publiquement avant d’avoir un éditeur complet et stable, mais la version de développement ayant été relayé sur <a href="http://learningwebgl.com/blog/?p=3611">LearningWebGL</a>, il en a été autrement !</p>
<p>Finalement, j&#8217;ai réussi rapidement à avoir quelques rendus sympathiques, mais mes connaissances restent trop limitées pour arriver à optimiser mon code pour les différentes versions de Firefox et de Chrome.<br />
Aujourd&#8217;hui les dernières versions de ces deux navigateurs proposent WebGL activé par défaut, et sont plutôt bien introduites. De plus Three.JS proposent aussi un moteur de rendu en Canvas et en SVG, bien que les performances en sont bien moindres.</p>
<p>Malgré cela, je pense qu&#8217;il y a de bonnes applications pour les jeux par navigateur, et pour des applications en ligne. On peux tout à fait imaginer des plateaux de jeux en 3D, des cartes, des interfaces, des pages d&#8217;accueil&#8230;</p>
<p>Il me reste encore quelques ajustements à faire pour sortir l&#8217;éditeur publiquement, mais le travail est en bonne voie ! Actuellement j&#8217;ai réussi à implémenter une grande majorité des blocs du jeu, et je dois m&#8217;attaquer aux objets avec une orientation, ainsi qu&#8217;à plusieurs travaux d&#8217;optimisations, surtout sur des constructions de plus de 2000 blocs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/webgl-avec-three-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Démarrage rapide avec Webgame Achievements</title>
		<link>http://www.anthor.net/blog/developpement/demarrage-rapide-avec-webgame-achievements/</link>
		<comments>http://www.anthor.net/blog/developpement/demarrage-rapide-avec-webgame-achievements/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 17:23:35 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Jeu par Navigateur]]></category>
		<category><![CDATA[Achievements]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=768</guid>
		<description><![CDATA[Un service destiné à être utilisé par des néophytes se doit d&#8217;avoir une bonne documentation, actuellement, ceci manque sur Achievements, principalement par manque de temps, et aussi car j&#8217;aime avoir un contact proche avec les participants. Néanmoins, je livre ici une première version du &#171;&#160;Quick Start&#160;&#187;, et d&#8217;autres suivront. La publication va permettre de motiver [...]]]></description>
			<content:encoded><![CDATA[<p>Un service destiné à être utilisé par des néophytes se doit d&#8217;avoir une bonne documentation, actuellement, ceci manque sur <a href="http://www.webgame-achievements.com/">Achievements</a>, principalement par manque de temps, et aussi car j&#8217;aime avoir un contact proche avec les participants.</p>
<p>Néanmoins, je livre ici une première version du &laquo;&nbsp;Quick Start&nbsp;&raquo;, et d&#8217;autres suivront. La publication va permettre de motiver plus de jeux à participer, notamment en expliquant de façon un peu plus détaillé le fonctionnement de l&#8217;API. Ce tuto est disponible pour les éditeurs, de façon privé, dans leur interface.</p>
<p><span id="more-768"></span></p>
<p>
        <strong>Achievements</strong> se compose d&#8217;une classe PHP ainsi que d&#8217;une feuille de style, permettant la communication avec le service et l&#8217;affichage au sein du jeu.
    </p>
<p>
        Le service requiert d&#8217;installer sur le serveur l&#8217;extension <strong>CURL</strong> (Pour communiquer avec le serveur) et l&#8217;extension <strong>MCRYPT</strong> (Pour crypter les communications entre votre jeu et le serveur).
    </p>
<p>
        Imaginons une page standard comportant un formulaire, ce formulaire servira à introduire les mécanismes de communication vers le service, en simulant l&#8217;activité du joueur, tel qu&#8217;une attaque ou une création d&#8217;objets.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>
        La page d&#8217;exemple est volontairement simplifiée afin de se concentrer sur la mise en place du service.
    </p>
<h4>Inclure la classe Achievements</h4>
<p>
        Récupérer le code PHP de la classe Achievements (Disponible dans la rubrique <a>Éditeur &raquo; Fichier API</a>) afin de l&#8217;injecter dans un fichier &laquo;&nbsp;Achievements.php&nbsp;&raquo;.<br />
        Si vous utilisez la version commune, il faut penser à modifier les clés privées et publiques, pour correspondre à celle de votre jeu.
    </p>
<p>
        Une fois le fichier créé, il suffit de l&#8217;inclure dans votre projet. De cette manière, la classe est accessible pour être utilisée.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Achievements.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>
        Il est recommandé de placer cette ligne le plus tôt possible dans votre projet et avant toute sortie HTML.
    </p>
<h4>Inclure le style CSS</h4>
<p>
        Vous pouvez définir différentes couleurs afin d&#8217;harmoniser le service avec votre jeu dans la rubrique <a>Éditeur &raquo; Éditeur de style CSS</a>.
    </p>
<p>
        Une fois vos couleurs définies, copier/coller le code source obtenu à la fin de votre fichier CSS actuel, ou bien en créer un nouveau et intégrez-le dans le header de votre jeu.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Achievements.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&nbsp;
    &lt;link href=&quot;/css/achievements.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>
        Il est recommandé d&#8217;utiliser votre fichier CSS existant afin de limiter le nombre de requêtes sur votre serveur.
    </p>
<h4>Instancier un joueur spécifique</h4>
<p>
        Un joueur est reconnu sur <strong>Achievements</strong> grâce au hash de son email.<br />
        L&#8217;architecture de la classe permet de travailler sur plusieurs joueurs à la fois, ainsi, vous pouvez tout à fait accorder un succès à un joueur qui a paré l&#8217;attaque du joueur courant.
    </p>
<p>
        Dans notre exemple, nous instancions uniquement le joueur courant, afin d&#8217;envoyer des informations le concernant.<br />
        Dans tous les cas le hash de l&#8217;email est unique, assurant que le joueur retrouvera ces informations qu&#8217;il soit inscrit ou non sur <strong>Achievements</strong> au moment de l&#8217;action.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Achievements.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$myPlayerAchievements</span> <span style="color: #339933;">=</span> Achievements<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'emailDuJoueur@domaine.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&nbsp;
    &lt;link href=&quot;/css/achievements.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h4>Afficher les succès au joueur</h4>
<p>
        Une fois que vous avez accès à l&#8217;instance du joueur courant, il faut pouvoir lui afficher le résultat de ses succès.<br />
        Une méthode dédiée s&#8217;occupe de cela en fournissant un code xHTML, ainsi que le javascript associé.
    </p>
<p>
        En la plaçant avant la fermeture de la balise <body>, vous vous assurez que les messages destinés au joueur courant lui parvienne uniquement lorsqu&#8217;il affiche une page complète.<br />
        En effet en cas de redirection, la méthode n&#8217;est pas appelée et les messages restent dans le cache jusqu&#8217;à ce que le joueur affiche une page.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Achievements.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$myPlayerAchievements</span> <span style="color: #339933;">=</span> Achievements<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'emailDuJoueur@domaine.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&nbsp;
    &lt;link href=&quot;/css/achievements.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&nbsp;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$myPlayerAchievements</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">printStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h4>Communiquer avec Achievements</h4>
<p>
        Une fois la mise en place effectuée, il ne reste plus qu&#8217;à communiquer avec <strong>Achievements</strong> lorsqu&#8217;un joueur effectue une action.
    </p>
<p>
        Pour cela il faut créer un succès dans l&#8217;interface du service, et récupérer le code donné. La clé du succès est automatiquement remplacée par la clé du succès courant.<br />
        Le service recevra la valeur donnée et renverra une réponse contenant les informations nécessaires à l&#8217;affichage.<br />
        Ces informations sont traitées de façon automatisées par la classe, et vous n&#8217;avez donc pas à vous en préoccuper.
    </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Achievements.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$myPlayerAchievements</span> <span style="color: #339933;">=</span> Achievements<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'emailDuJoueur@domaine.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Ici votre code habituel pour gérer l'action du joueur</span>
    <span style="color: #000088;">$nbObject</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'playerAction'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Le code envoyant la valeur courante à Achievements</span>
    try
    <span style="color: #009900;">&#123;</span>   
        <span style="color: #000088;">$myPlayerAchievements</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">updateAchievement</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'XXXXXXXX'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// Clé du succès</span>
            <span style="color: #000088;">$nbObject</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    catch<span style="color: #009900;">&#40;</span> Exception <span style="color: #000088;">$e</span> <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Mettre ici votre gestion d'erreurs.</span>
        <span style="color: #666666; font-style: italic;">// Ou laisser vide pour ne pas bloquer le jeu en cas de panne du service.</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!DOCTYPE html PUBLIC 
    &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Démarrez rapidement avec Achievements&lt;/title&gt;
&nbsp;
    &lt;link href=&quot;/css/achievements.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
        &lt;input type=&quot;text&quot; name=&quot;playerAction&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nbObject</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
        &lt;input type=&quot;submit&quot; value=&quot;Action du joueur&quot; /&gt;
    &lt;/form&gt;
&nbsp;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$myPlayerAchievements</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">printStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/demarrage-rapide-avec-webgame-achievements/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Webgame Achievements</title>
		<link>http://www.anthor.net/blog/developpement/webgame-achievements/</link>
		<comments>http://www.anthor.net/blog/developpement/webgame-achievements/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 13:44:00 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Jeu par Navigateur]]></category>
		<category><![CDATA[Achievements]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=741</guid>
		<description><![CDATA[J&#8217;en avais vaguement parlé dans un précédent billet, et c&#8217;est aujourd&#8217;hui chose faite ! &#171;&#160;Achievements&#160;&#187; est en ligne dans une première version et n&#8217;attend plus que des jeux se joignent à l&#8217;aventure pour prendre son envol. Comme l&#8217;explique SorenS, Achievements permettra aux jeux par navigateur de fidéliser un peu plus leurs joueurs avec un service [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;en avais vaguement parlé dans un <a href="http://www.anthor.net/blog/developpement/trophees-et-succes-dans-les-jeux-par-navigateur/">précédent billet</a>, et c&#8217;est aujourd&#8217;hui chose faite !</p>
<p>&laquo;&nbsp;<a href="http://www.webgame-achievements.com/">Achievements</a>&nbsp;&raquo; est en ligne dans une première version et n&#8217;attend plus que des jeux se joignent à l&#8217;aventure pour prendre son envol.</p>
<p>Comme l&#8217;explique <a href="http://rkueny.fr/jeu-web/fideliser-ses-joueurs-sur-son-jeu-facebook">SorenS</a>, Achievements permettra aux jeux par navigateur de fidéliser un peu plus leurs joueurs avec un service simple à mettre en place.<span id="more-741"></span></p>
<p>Une classe PHP permet de communiquer avec l&#8217;API et gère l&#8217;affichage du résultat pour les joueurs. Le résultat est visible sur les <a href="http://www.webgame-achievements.com/fr/demonstration">démonstrations</a>, qui utilisent la même API que les jeux. Ces démonstrations sont avant tout destinées aux futurs éditeurs du service afin de comprendre les différents types de succès qu&#8217;il est possible de mettre en place.<br />
Grâce à un système de cache évolué aussi bien côté serveur que côté client, le service est rapide et ne fait pas plus de requêtes que nécessaire.</p>
<p>Par exemple, si un joueur a déverrouillé un succès, alors aucune requête ne sera faite à l&#8217;API. De la même manière des vérifications permettent lors de l&#8217;édition d&#8217;un succès de débloquer le cache afin de refaire des requêtes vers l&#8217;API lorsque le joueur effectuera des actions sur le jeu. Tout cela étant évidemment transparent, car il n&#8217;y a que 3 méthodes pouvant être appelées.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Un singleton pour utiliser un joueur en particulier</span>
<span style="color: #000088;">$myAchievement</span> <span style="color: #339933;">=</span> Achievements<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'emaildujoueur@mondomaine.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Une fonction lorsqu'un joueur se connecte au jeu</span>
<span style="color: #000088;">$myAchievement</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">playerPlays</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'login'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Une fonction pour mettre à jour un succès</span>
try
<span style="color: #009900;">&#123;</span>  
    <span style="color: #000088;">$myAchievement</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">updateAchievement</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'clé du succès'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'valeur'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
catch<span style="color: #009900;">&#40;</span> Exception <span style="color: #000088;">$e</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Exception: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Une fonction à n'utiliser qu'en fin de fichier avant la fermeture de &lt;body&gt; </span>
<span style="color: #666666; font-style: italic;">// pour gérer l'affichage du joueur concerné par l'instance.</span>
<span style="color: #000088;">$myAchievement</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">printStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Le service est fourni avec un back-office complet qui permet aux éditeurs d&#8217;être globalement autonome dans la gestion de leurs jeux et de leurs succès. Il est gratuit, et le seul retour se situe lors de l&#8217;affichage des succès pour le joueur, afin de le rediriger sur son profil. Concernant les emails, ils ne sont pas envoyés au service. Tout fonctionne grâce à une clé unique générée pour chaque email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/webgame-achievements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trophées et Succès dans les jeux par navigateur</title>
		<link>http://www.anthor.net/blog/developpement/trophees-et-succes-dans-les-jeux-par-navigateur/</link>
		<comments>http://www.anthor.net/blog/developpement/trophees-et-succes-dans-les-jeux-par-navigateur/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 21:40:25 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Jeu par Navigateur]]></category>
		<category><![CDATA[Achievements]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=715</guid>
		<description><![CDATA[Qu&#8217;ils soient appelés Trophées sur PS3, Succès sur xBox ou Steam, ou différemment sur d&#8217;autres plateformes, la fonctionnalité reste la même. Rassembler les joueurs vers un but secondaire afin d&#8217;ajouter un challenge aux jeux. Psychologiquement, ça à l&#8217;air de fonctionner, l&#8217;effet sur les joueurs est immédiat en donnant l&#8217;envie d&#8217;atteindre un but pouvant être comparé [...]]]></description>
			<content:encoded><![CDATA[<p>Qu&#8217;ils soient appelés Trophées sur PS3, Succès sur xBox ou Steam, ou différemment sur d&#8217;autres plateformes, la fonctionnalité reste la même.<br />
Rassembler les joueurs vers un but secondaire afin d&#8217;ajouter un challenge aux jeux.<br />
<span id="more-715"></span><br />
Psychologiquement, ça à l&#8217;air de fonctionner, l&#8217;effet sur les joueurs est immédiat en donnant l&#8217;envie d&#8217;atteindre un but pouvant être comparé avec d&#8217;autres joueurs, voir ses amis.</p>
<p>Techniquement, ce n&#8217;est pas compliqué à implémenter, mais alors pourquoi les jeux web n&#8217;en proposent pas plus ?<br />
Tout simplement je pense car le domaine est trop fragmenté. Un jeu seul ou un éditeur seul aura moins de poids qu&#8217;une plateforme qui mélange un grand nombre de jeux différents.</p>
<p>Il existe <a href="http://muxxu.com/">Muxxu</a>, mais celui-ci reste limité à quelques-uns des jeux <a href="http://www.motion-twin.com/">Motion-Twin</a>. Si le portail est intéressant, il reste limité car non ouvert.</p>
<p>Dès le début du développement de Tarschool, j&#8217;avais en tête de le relier à un portail permettant de partager à la fois les comptes, mais aussi des succès. De plus, les joueurs me l&#8217;ont suggéré.</p>
<p>Je suis donc parti sur une API permettant de communiquer avec un portail. Un joueur est identifié grâce au hash de son email.<br />
Lorsqu&#8217;il effectue une action sur le jeu, l&#8217;API est contactée et renvoie soit une erreur, soit la réussite de l&#8217;envoi, et gère elle-même l&#8217;affichage pour les joueurs si un succès est débloqué.</p>
<p>On distinguera trois types de succès : Atteindre une certaine valeur, Atteindre une valeur unique, Effectuer une action unique. Le dernier correspondant à une valeur unique de 1 ^^ Ces succès pouvant aussi avoir un prérequis avant de pouvoir être débutés/validés.</p>
<p>Toutes les communications se feront en cryptées à l&#8217;aide d&#8217;une clé publique et d&#8217;une clé privé. En l&#8217;état actuel, la classe servant pour le jeu est bien avancé, le plus compliqué a été de rendre compatible le cryptage avec le plus de configuration possible.</p>
<p>Plus d&#8217;infos bientôt, si certains sont intéressés pour des tests, n&#8217;hésitez pas à me contacter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/trophees-et-succes-dans-les-jeux-par-navigateur/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pics Engine 3.5 et Google Analytics</title>
		<link>http://www.anthor.net/blog/developpement/pics-engine-3-5-et-google-analytics/</link>
		<comments>http://www.anthor.net/blog/developpement/pics-engine-3-5-et-google-analytics/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 14:26:36 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=539</guid>
		<description><![CDATA[Si comme moi vous souhaitez tracker votre galerie PicsEngine, il suffit simplement de modifier deux fichiers. Dans /admin/inc/gallery.php, il suffit de remplacer la section de Pics Engine par la suivante. &#60;body&#62; &#60;script type=&#34;text/javascript&#34;&#62; var gaJsHost = ((&#34;https:&#34; == document.location.protocol) ? &#34;https://ssl.&#34; : &#34;http://www.&#34;); document.write(unescape(&#34;%3Cscript src='&#34; + gaJsHost + &#34;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&#34;)); &#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; try { [...]]]></description>
			<content:encoded><![CDATA[<p>Si comme moi vous souhaitez tracker votre galerie PicsEngine, il suffit simplement de modifier deux fichiers.</p>
<p>Dans <strong>/admin/inc/gallery.php</strong>, il suffit de remplacer la section <body> de <a href="http://www.picsengine.com/" target="_blank">Pics Engine</a> par la suivante.<br />
<span id="more-539"></span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;body&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
        document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));
        &lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot;&gt;
        try {
        var pageTracker = _gat._getTracker(&quot;UA-XXXXXX-XX&quot;); // Remplacer par votre identifiant.
        pageTracker._setAllowAnchor(true);
        pageTracker._trackPageview();
        } catch(err) {}
    &lt;/script&gt;
    &lt;script src=&quot;&lt;?php echo $core-&gt;getSelf(); ?&gt;admin/?public&amp;amp;action=gallery&amp;amp;redirect_iphone=false&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;/body&gt;</pre></div></div>

<p>La partie importante de l&#8217;opération est l&#8217;activation du tracking des ancres dans Google Analytics, le reste du code est le code de tracking proposé de base par Google Analytics.<br />
(Cf: <a href="http://code.google.com/intl/fr/apis/analytics/docs/gaJS/gaJSApiCampaignTracking.html#_gat.GA_Tracker_._setAllowAnchor" target="_blank">Docs GA &#8211; _setAllowAnchor</a> )</p>
<p>Dans <strong>/admin/library/controller/Controller.Public.php</strong>, remplacer la ligne 459</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$toWrite</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;function exec(s) { eval(s); } function saveUrl(u) { window.open(u,&quot;_self&quot;); }&lt;/script&gt;'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Par :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$toWrite</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;function exec(s) { eval(s); } function saveUrl(u) { window.open(u,&quot;_self&quot;); if(pageTracker){ pageTracker._trackPageview(&quot;/&quot; + u); } }&lt;/script&gt;'</span><span style="color: #339933;">;</span></pre></div></div>

<p>De cette manière, le code permettant de traquer la page en cours n&#8217;est exécuté que si Google Analytics est présent.</p>
<p>Pour voir le script en action, vous pouvez rajouter ce bout de code :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">alert<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span> <span style="color: #339933;">+</span> u<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* Renvoi : /#photo=347/album=7 */</span></pre></div></div>

<p>Voilà, c&#8217;est tout. Pas de grosses modifications. Si cela pouvait être intégré de base, avec une option dans l&#8217;admin pour simplement entrer l&#8217;identifiant de tracking, ce serait parfait.<br />
Hélas le changement de la barre d&#8217;adresse ne semble fonctionner qu&#8217;au premier album et à la première photo dans la version actuelle. De même si on arrive pas sur la page d&#8217;accueil, le changement d&#8217;url ne semble plus fonctionner non plus.<br />
L&#8217;auteur du script m&#8217;a fourni une version plus récente qui corrige ce problème et avec laquelle le tracking est 100% fonctionnelle. Merci à lui.</p>
<p>A partir de la version 3.5.2 qui devrait sortir prochainement, il n&#8217;y aura donc plus de problème pour effectuer vos statistiques. Concernant les mises à jour, pour l&#8217;instant, je pense qu&#8217;il faudra refaire la manipulation à la main pour le moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/pics-engine-3-5-et-google-analytics/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Utiliser Zend_Search_Lucene pour créer son propre moteur de recherche !</title>
		<link>http://www.anthor.net/blog/developpement/utiliser-zend_search_lucene-pour-creer-son-propre-moteur-de-recherche/</link>
		<comments>http://www.anthor.net/blog/developpement/utiliser-zend_search_lucene-pour-creer-son-propre-moteur-de-recherche/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 11:00:40 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=533</guid>
		<description><![CDATA[Le Zend Framework contient un composant permettant de créer rapidement et simplement son propre moteur de recherche ! Ce composant nommé Zend_Search_Lucene est un portage, du projet Java du même nom, totalement écrit en PHP5. Ce composant est autonome et ne demande aucune architecture spécifique. De ce fait il peux servir pour tout nouveau projet [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.anthor.net/wp-content/uploads/2010/01/zf_logo_white.jpg" alt="" title="" width="130" height="58" class="alignleft size-full wp-image-536" /><br />
Le Zend Framework contient un composant permettant de créer rapidement et simplement son propre moteur de recherche ! Ce composant nommé <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">Zend_Search_Lucene</a> est un portage, du <a href="http://lucene.apache.org/java/docs/">projet Java</a> du même nom, totalement écrit en PHP5.<br />
<span id="more-533"></span><br />
Ce composant est autonome et ne demande aucune architecture spécifique. De ce fait il peux servir pour tout nouveau projet ou s&#8217;intégrer dans un projet existant. Aucune base de données n&#8217;est nécessaire. De plus les index peuvent être utilisés aussi bien avec <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">Zend_Search_Lucene</a>, qu&#8217;avec tout autre portage de Lucene (Attention toutefois, tous les encodages ne sont pas supportés !)<br />
Il supporte différents encodages grâce à l&#8217;utilisation de différents analyseurs, mais pas l&#8217;UTF-8 par défaut, comme PHP me direz-vous :p</p>
<p>Contrairement au reste de la documentation et des autres composants du Zend Framework, le fonctionnement de <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">Zend_Search_Lucene</a> n&#8217;est pas des plus explicites.<br />
Dans cet article nous verrons donc, comment utiliser <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">Zend_Search_Lucene</a> pour construire un index, construire les requêtes de recherches et enfin afficher les résultats dans une page. Le tout en  UTF-8 bien évidemment.</p>
<h4>Configuration du module</h4>
<p>Tout d&#8217;abord, commençons par modifier le comportement par défaut du composant, en lui passant un analyseur compatible avec l&#8217;UTF8, les caractères numériques mais aussi insensible à la casse.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Zend_Search_Lucene_Analysis_Analyzer<span style="color: #339933;">::</span><span style="color: #004000;">setDefault</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>L&#8217;index de recherche</h4>
<p>Avant de pouvoir effectuer la moindre recherche, il faut d&#8217;abord construire l&#8217;index qui nous servira de base pour la recherche.<br />
La construction de l&#8217;index permet d&#8217;importer des documents, eux-mêmes composés de champs. Ce sont les champs qui permettent à <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">Zend_Search_Lucene</a> de retrouver quel document doit ressortir dans les résultats de recherche.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$index</span> <span style="color: #339933;">=</span> Zend_Search_Lucene<span style="color: #339933;">::</span><span style="color: #004000;">create</span><span style="color: #009900;">&#40;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/data/lucene'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Une fois l&#8217;index créé, nous devons inclure des documents à celui-ci, il ne faut pas oublier de forcer l&#8217;encodage des champs en UTF-8, afin qu&#8217;il soit concordant avec l&#8217;encodage de l&#8217;analyseur.<br />
Chaque champs du document représente différents type, permettant ainsi de découper les résultats sous plusieurs formes en s&#8217;adaptant à la structure de l&#8217;application. On y stocke par exemple l&#8217;URL de la page à voir, son titre, son auteur&#8230; </p>
<p>Les différents types de champs possibles sont :</p>
<ul>
<li><strong>Keyword :</strong> Les données sont indexées et stockées, mais pas tokenisées. Par exemple pour l&#8217;identifiant, l&#8217;url&#8230;</li>
<li><strong>UnIndexed :</strong> Les données sont stockées mais pas indexées. Par exemple pour l&#8217;aperçu du contenu, la date de création&#8230;</li>
<li><strong>UnStored :</strong> Les données ne sont pas stockées, mais indexées et tokenisées. Par exemple pour le contenu du document&#8230;</li>
<li><strong>Text :</strong> Les données sont indexées, stockées et tokenisées. Par exemple pour le titre, l&#8217;auteur&#8230;</li>
<li><strong>Binary :</strong> Les données ne sont pas indexées, ni tokenisées, mais sont stockées en binaire. Par exemple pour l&#8217;image&#8230;</li>
</ul>
<p>Les données stockées peuvent être affichées dans les résultats de recherche. Les données indexées permettent de trier les résultats de recherche par ordre d&#8217;importance. Les données tokenisées permettent de découper le contenu en mots clés pour la recherche.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$document</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Search_Lucene_Document<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addField</span><span style="color: #009900;">&#40;</span> Zend_Search_Lucene_Field<span style="color: #339933;">::</span><span style="color: #004000;">keyword</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'idPost'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">52</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addField</span><span style="color: #009900;">&#40;</span> Zend_Search_Lucene_Field<span style="color: #339933;">::</span><span style="color: #004000;">unIndexed</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'preview'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'contenu contenu2...'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addField</span><span style="color: #009900;">&#40;</span> Zend_Search_Lucene_Field<span style="color: #339933;">::</span><span style="color: #004000;">unStored</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'contenu contenu2 contenu3 contenu4'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addField</span><span style="color: #009900;">&#40;</span> Zend_Search_Lucene_Field<span style="color: #339933;">::</span><span style="color: #004000;">text</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Titre de mon résultat'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$index</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addDocument</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$document</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Jusqu&#8217;ici nous avons ajouté des documents, mais aucune modification n&#8217;est apporté à l&#8217;index tant que la méthode commit() n&#8217;est pas appelée. Il est donc tout à fait possible de boucler des éléments d&#8217;une table pour les convertir en document pour l&#8217;index. En cas de mises à jour successives, la méthode optimize() permet d&#8217;optimiser l&#8217;index.</p>
<p>Il existe bien évidemment d&#8217;autres types de documents permettant d&#8217;importer directement des fichiers Word 2007, Powerpoint 2007 ou encore Excel 2007 dans l&#8217;index.<br />
Attention, on ne peux utiliser de champs nommé &laquo;&nbsp;id&nbsp;&raquo;, celui-ci correspond à l&#8217;id du document dans l&#8217;index.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$index</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">commit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$index</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">optimize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Et voilà, l&#8217;index de recherche est créé, et contient des documents. Il est maintenant possible d&#8217;effectuer des requêtes sur cet index et d&#8217;en retourner les résultats.</p>
<h4>Requêtes et affichage des résultats</h4>
<p>Afin d&#8217;interroger l&#8217;index, il suffit de l&#8217;ouvrir avec la méthode appropriée. Une fois l&#8217;index ouvert, il suffit simplement de passer une variable contenant la recherche dans la méthode find() qui retourne les résultats.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$index</span> <span style="color: #339933;">=</span> Zend_Search_Lucene<span style="color: #339933;">::</span><span style="color: #004000;">open</span><span style="color: #009900;">&#40;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/data/lucene'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$index</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$q</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// $q = 'test recherche';</span>
&nbsp;
<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> Zend_Paginator<span style="color: #339933;">::</span><span style="color: #004000;">factory</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPageRange</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCurrentPageNumber</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_getParam<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setItemCountPerPage</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$page</span><span style="color: #339933;">;</span></pre></div></div>

<p>Comme on peux le constater, le composant est compatible avec le paginator, ce qui permet de paginer simplement les résultats comme n&#8217;importe quel autre sources !<br />
Ceci est une petite approche rapide, mais qui permet déjà d&#8217;instaurer rapidement un moteur de recherche sur votre site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/utiliser-zend_search_lucene-pour-creer-son-propre-moteur-de-recherche/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ajax Queue avec jQuery</title>
		<link>http://www.anthor.net/blog/developpement/ajax-queue-avec-jquery/</link>
		<comments>http://www.anthor.net/blog/developpement/ajax-queue-avec-jquery/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 09:19:54 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=526</guid>
		<description><![CDATA[En travaillant sur un nouvel outil ce week-end, je me suis rendu compte que l&#8217;utilisation des queues en Ajax avec jQuery n&#8217;était pas natif. Il existe quelques pistes à ces adresses, mais rien de vraiment pratique : http://jquery.com/plugins/project/ajaxqueue http://docs.jquery.com/AjaxQueue Puis j&#8217;ai trouvé une version plus intéressante de celui-ci dans le plugin [jQuery Autocomplete&#124;http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/&#124;en], néanmoins, même [...]]]></description>
			<content:encoded><![CDATA[<p>En travaillant sur un nouvel outil ce week-end, je me suis rendu compte que l&#8217;utilisation des queues en Ajax avec jQuery n&#8217;était pas natif.<br />
Il existe quelques pistes à ces adresses, mais rien de vraiment pratique :</p>
<ul>
<li><a href="http://jquery.com/plugins/project/ajaxqueue" target="_blank">http://jquery.com/plugins/project/ajaxqueue</a></li>
<li><a href="http://docs.jquery.com/AjaxQueue" target="_blank">http://docs.jquery.com/AjaxQueue</a></li>
</ul>
<p>Puis j&#8217;ai trouvé une version plus intéressante de celui-ci dans le plugin [jQuery Autocomplete|http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/|en], néanmoins, même si la fonction ABORT fonctionne correctement, mes appels en queue ne fonctionnaient pas.<br />
J&#8217;en ai donc légèrement modifié les sources, en ajoutant un mode DEQUEUE me permettant de lancer la liste d&#8217;attente en fin de boucle par exemple.</p>
<p>Grâce à l&#8217;utilisation de la variable PORT, on peux ainsi contrôler indépendamment plusieurs queues, ou annuler des requêtes spécifiques, le tout en utilisant la fonction Ajax de jQuery.</p>
<p><span id="more-526"></span></p>
<h4>Le plugin</h4>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/**
 * Ajax Queue Plugin
 */</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> ajax <span style="color: #339933;">=</span> $.<span style="color: #660066;">ajax</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> pendingRequests <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    $.<span style="color: #660066;">ajax</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>settings<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        settings <span style="color: #339933;">=</span> jQuery.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span>
            settings<span style="color: #339933;">,</span> 
            jQuery.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span>
                <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
                jQuery.<span style="color: #660066;">ajaxSettings</span><span style="color: #339933;">,</span> 
                settings
            <span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
        <span style="color: #003366; font-weight: bold;">var</span> port <span style="color: #339933;">=</span> settings.<span style="color: #660066;">port</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>settings.<span style="color: #660066;">mode</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;abort&quot;</span><span style="color: #339933;">:</span> 
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> pendingRequests<span style="color: #009900;">&#91;</span>port<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    pendingRequests<span style="color: #009900;">&#91;</span>port<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">abort</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">return</span> pendingRequests<span style="color: #009900;">&#91;</span>port<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> ajax.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;queue&quot;</span><span style="color: #339933;">:</span> 
                <span style="color: #003366; font-weight: bold;">var</span> _old <span style="color: #339933;">=</span> settings.<span style="color: #660066;">complete</span><span style="color: #339933;">;</span>
                settings.<span style="color: #660066;">complete</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> _old <span style="color: #009900;">&#41;</span>
                        _old.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    jQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>ajax<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dequeue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ajax&quot;</span> <span style="color: #339933;">+</span> port <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
                jQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span> ajax <span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">queue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ajax&quot;</span> <span style="color: #339933;">+</span> port<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    ajax<span style="color: #009900;">&#40;</span> settings <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;dequeue&quot;</span><span style="color: #339933;">:</span> 
                jQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>ajax<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dequeue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ajax&quot;</span> <span style="color: #339933;">+</span> port <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>jQuery.<span style="color: #660066;">isFunction</span><span style="color: #009900;">&#40;</span>settings.<span style="color: #660066;">complete</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                    settings.<span style="color: #660066;">complete</span><span style="color: #009900;">&#40;</span>settings<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">return</span> ajax.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Utilisation de la méthode ABORT</h4>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$input.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'keyup'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$searchTimeout <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        clearTimeout<span style="color: #009900;">&#40;</span>$searchTimeout<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    $searchTimeout <span style="color: #339933;">=</span> setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $searchTimeout <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> inputVal <span style="color: #339933;">=</span> $input.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\s+/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\s+$/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            mode    <span style="color: #339933;">:</span> <span style="color: #3366CC;">'abort'</span><span style="color: #339933;">,</span>
            port    <span style="color: #339933;">:</span> <span style="color: #3366CC;">'ajaxSuggestions'</span><span style="color: #339933;">,</span>
            type    <span style="color: #339933;">:</span> <span style="color: #3366CC;">'POST'</span><span style="color: #339933;">,</span>
            url     <span style="color: #339933;">:</span> <span style="color: #3366CC;">'test.php'</span><span style="color: #339933;">,</span>
            data    <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">'keywords'</span><span style="color: #339933;">:</span> inputVal <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
            success <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Cette méthode est plus qu&#8217;intéressante dans le cas par exemple ou l&#8217;on souhaite afficher des informations au fur et à mesure que l&#8217;utilisateur écrit une information. Les requêtes précédentes utilisant le même port sont annulées au profit de la nouvelle requête, évitant un engorgement des informations et des erreurs dans le cas ou une requête ultérieure soit plus rapide que les précédentes.</p>
<h4>Utilisation de la méthode QUEUE</h4>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">10</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        mode<span style="color: #339933;">:</span> <span style="color: #3366CC;">'queue'</span><span style="color: #339933;">,</span>
        port<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ajaxWhois'</span><span style="color: #339933;">,</span>
        type<span style="color: #339933;">:</span> <span style="color: #3366CC;">'POST'</span><span style="color: #339933;">,</span>
        url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'test.php'</span><span style="color: #339933;">,</span>
        data<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">'increment'</span><span style="color: #339933;">:</span> i <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> mode<span style="color: #339933;">:</span> <span style="color: #3366CC;">'dequeue'</span><span style="color: #339933;">,</span> port<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ajaxWhois'</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>La méthode queue permet de boucler facilement sur plusieurs requêtes et ne les lancer qu&#8217;au moment choisit. Les requêtes ainsi lancées, le sont les unes à la suite des autres, évitant un engorgement des données reçues.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/ajax-queue-avec-jquery/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Formatter un fichier Excel avec PHP</title>
		<link>http://www.anthor.net/blog/developpement/formatter-un-fichier-excel-avec-php/</link>
		<comments>http://www.anthor.net/blog/developpement/formatter-un-fichier-excel-avec-php/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 16:10:45 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=460</guid>
		<description><![CDATA[Certains clients me demandent parfois des exports en Excel dans leurs back-office. Loin d&#8217;être compliqué cet export demande tout de même quelques manipulations. Rien de bien compliqué néanmoins, puisque une fonction et un header permettent de s&#8217;affranchir de cet exercice en moins de temps qu&#8217;il n&#8217;en faut. Certes cette méthode affiche un avertissement lors de [...]]]></description>
			<content:encoded><![CDATA[<p>    Certains clients me demandent parfois des exports en Excel dans leurs back-office. Loin d&#8217;être compliqué cet export demande tout de même quelques manipulations.<br />
    Rien de bien compliqué néanmoins, puisque une fonction et un header permettent de s&#8217;affranchir de cet exercice en moins de temps qu&#8217;il n&#8217;en faut.</p>
<p>    Certes cette méthode affiche un avertissement lors de la première ouverture, mais il faut savoir qu&#8217;Excel gère très bien les tableaux. Le fichier s&#8217;ouvre donc parfaitement avec les versions XP et 2007.<br />
<span id="more-460"></span><br />
Pour le header du fichier, c&#8217;est très simple :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: application/vnd.ms-excel;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Le formatage du tableau permet d&#8217;utiliser la plupart des formatage disponibles dans Excel :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;Texte&lt;/td&gt;
        &lt;td style='mso-number-format:\@'&gt;On formate un texte&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Nombre sur 3 décimales ( 2.345 )&lt;/td&gt;
        &lt;td style='mso-number-format:&quot;0\.000&quot;'&gt;2.345678&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Nombre séparé par un espace, avec 3 décimales ( 1 234.567 )&lt;/td&gt;
        &lt;td style='mso-number-format:\#\ \#\#0\.000'&gt;1234.56789&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Une date ( 06/09/2009 )&lt;/td&gt;
        &lt;td style='mso-number-format:&quot;dd\/mm\/yyyy&quot;'&gt;2009-09-06 13:37:45&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;</pre></div></div>

<p>Voilà, il suffit juste ensuite de produire une simple boucle pour obtenir des exports de données vers Excel.<br />
En utilisant les headers, les colspans, les rowspans, etc, on peux rapidement obtenir des exports beaucoup plus poussés.<br />
Les couleurs de textes et les fonds de cellules sont aussi utilisables.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/formatter-un-fichier-excel-avec-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>L&#8217;importance de compresser les fichiers statiques</title>
		<link>http://www.anthor.net/blog/developpement/limportance-de-compresser-les-fichiers-statiques/</link>
		<comments>http://www.anthor.net/blog/developpement/limportance-de-compresser-les-fichiers-statiques/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 11:45:15 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=453</guid>
		<description><![CDATA[Lorsque j&#8217;ai commencé Tarschool, j&#8217;ai immédiatement mis en place un système de compression des fichiers. Celui-ci est de deux sortes : Minification des fichiers JS et CSS Compression avec le mode deflate des fichiers JS et CSS Faciles et rapides à mettre en place, ces solutions permettent souvent d&#8217;économiser au minimum 75% de la bande [...]]]></description>
			<content:encoded><![CDATA[<p>Lorsque j&#8217;ai commencé Tarschool, j&#8217;ai immédiatement mis en place un système de compression des fichiers. Celui-ci est de deux sortes : </p>
<ul>
<li>Minification des fichiers JS et CSS</li>
<li>Compression avec le mode deflate des fichiers JS et CSS</li>
</ul>
<p>Faciles et rapides à mettre en place, ces solutions permettent souvent d&#8217;économiser au minimum 75% de la bande passante utilisé par le serveur en mode normal.</p>
<p>Voici un petit récapitulatif des solutions que nous avons mis en place et de leurs économies associées.<br />
<span id="more-453"></span><br />
Pour la minification, je vous laisse voir de votre côté, personnellement, j&#8217;ai plusieurs scripts qui tournent avec <a href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUICompressor</a>, mais d&#8217;autres solutions sont possibles.<br />
Par exemple: JSmin, CSSminifier, DOJO Compressor&#8230; C&#8217;est au choix, je pense qu&#8217;elles ont toutes leurs avantages et leurs inconvénients. YUICompressor est, dans mon cas utilisé en local avant upload des fichiers.</p>
<p>Pour le DEFLATE, un simple copier/coller suffit dans un .htaccess à la racine, ces lignes ayant déjà été donné dans mon <a href="http://www.anthor.net/blog/developpement/htaccess-par-defaut/" target="_blank">.htaccess par défaut</a>, cette méthode doit normalement resté active le plus souvent possible, et être activé de façon transparente. Notons que si le mod_deflate n&#8217;est pas initié par Apache, la ligne est purement et simplement ignorée.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_deflate.c&gt;
	&lt;<span style="color: #000000; font-weight:bold;">FilesMatch</span> <span style="color: #7f007f;">&quot;<span style="color: #000099; font-weight: bold;">\.</span>(js|css)$&quot;</span>&gt;
		<span style="color: #00007f;">SetOutputFilter</span> DEFLATE
	&lt;/<span style="color: #000000; font-weight:bold;">FilesMatch</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;</pre></div></div>

<p>Pour montrer la bande passante économisée, je prend les logs d&#8217;accès du mois de juillet. Je vais effectuer la comparaison sur deux fichiers CSS et deux fichiers JS.<br />
Sur Tarschool, les plus utilisés sont : </p>
<table width="100%" cellspacing="0" cellpadding="4" style="font-size: 11px;border:1px solid #EEEEEE;">
<thead style="background-color: #F8F8FF">
<tr>
<th>Nom du fichier</th>
<th>Taille originale</th>
<th>Taille minifié</th>
<th>Taille après DEFLATE</th>
</thead>
<tbody>
<tr>
<td>global.css</td>
<td align="right">22 566</td>
<td align="right">18 260 <span style="color: #00AA00">[80.9%]</span></td>
<td align="right">3 664 <span style="color: #00AA00">[20%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>globalMember.css</td>
<td align="right">2 185</td>
<td align="right">1 732 <span style="color: #00AA00">[79.2%]</span></td>
<td align="right">679 <span style="color: #00AA00">[39.2%]</span></td>
</tr>
<tr>
<td>jquery.tarschool.js</td>
<td align="right">113 480</td>
<td align="right">55 283 <span style="color: #00AA00">[48.7%]</span></td>
<td align="right">17 264 <span style="color: #00AA00">[31.2%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>jquery.tarschool.voirCombat.js</td>
<td align="right">4 458</td>
<td align="right">2 655 <span style="color: #00AA00">[59.1%]</span></td>
<td align="right">1 048 <span style="color: #00AA00">[39.4%]</span></td>
</tr>
</tbody>
</table>
<p>Pour le mois de Juillet, voici donc le nombre d&#8217;accès total, dans lequel nous allons séparer les fichiers effectivement transmis et ceux dont le cache a été utilisé.<br />
En effet par défaut, on peux déjà économiser une quantité significative. Pour contrôler un peu mieux ce cache, il existe différentes solutions qui ne seront pas abordées ici.<br />
Pour ma part je rajoute simplement un time de la dernière modification du bootstrap lors de l&#8217;appel des fichiers à mettre en cache. Je laisse le reste à Apache et pour le moment cela me convient.</p>
<table width="100%" cellspacing="0" cellpadding="4" style="font-size: 11px;border:1px solid #EEEEEE;">
<thead style="background-color: #F8F8FF">
<tr>
<th>Nom du fichier</th>
<th>Nombre d&#8217;accès Total</th>
<th>200 (OK)</th>
<th>304 (Not Modified)</th>
<th>Ratio</th>
</thead>
<tbody>
<tr>
<td>global.css</td>
<td align="right">18 298</td>
<td align="right">5 078</td>
<td align="right">13 220</td>
<td align="right"><span style="color: #00AA00">[27.7%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>globalMember.css</td>
<td align="right">14 962</td>
<td align="right">3 082</td>
<td align="right">11 880</td>
<td align="right"><span style="color: #00AA00">[20.5%]</span></td>
</tr>
<tr>
<td>jquery.tarschool.js</td>
<td align="right">18 006</td>
<td align="right">5 004</td>
<td align="right">13 002</td>
<td align="right"><span style="color: #00AA00">[27.7%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>jquery.tarschool.voirCombat.js</td>
<td align="right">3 892</td>
<td align="right">1 978</td>
<td align="right">1 914</td>
<td align="right"><span style="color: #00AA00">[50.8%]</span></td>
</tr>
</tbody>
</table>
<p>En ne prenant en compte que les fichiers effectivement transmis, je peux donc calculer la bande passante utilisée avec la compression, la bande passante théorique (basée sur la taille réelle du fichier source), et les pourcentages de gains réalisés :</p>
<table width="100%" cellspacing="0" cellpadding="4" style="font-size: 11px;border:1px solid #EEEEEE;">
<thead style="background-color: #F8F8FF">
<tr>
<th>Nom du fichier</th>
<th>Nombre d&#8217;accès</th>
<th>Bande Passante Théorique</th>
<th>Bande Passante Réelle</th>
<th>Ratio</th>
</thead>
<tbody>
<tr>
<td>global.css</td>
<td align="right">5 078</td>
<td align="right">114 590 148</td>
<td align="right">18 605 792</td>
<td align="right"><span style="color: #00AA00">[16.2%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>globalMember.css</td>
<td align="right">3 082</td>
<td align="right">6 734 170</td>
<td align="right">2 092 678</td>
<td align="right"><span style="color: #00AA00">[31%]</span></td>
</tr>
<tr>
<td>jquery.tarschool.js</td>
<td align="right">5 004</td>
<td align="right">567 853 920</td>
<td align="right">86 389 056</td>
<td align="right"><span style="color: #00AA00">[15.2%]</span></td>
</tr>
<tr style="background-color: #F5FBFF;">
<td>jquery.tarschool.voirCombat.js</td>
<td align="right">1 978</td>
<td align="right">8 817 924</td>
<td align="right">2 072 944</td>
<td align="right"><span style="color: #00AA00">[23.5%]</span></td>
</tr>
</tbody>
</table>
<p>En conclusion, l&#8217;apport du module deflate, couplé à une minification des fichiers permet d&#8217;économiser d&#8217;énormes quantités de bandes passantes, généralement de l&#8217;ordre de 75%.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/limportance-de-compresser-les-fichiers-statiques/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plateau de jeu en 3d isométrique, le retour (1)&#8230;</title>
		<link>http://www.anthor.net/blog/developpement/plateau-de-jeu-en-3d-isometrique-le-retour-1/</link>
		<comments>http://www.anthor.net/blog/developpement/plateau-de-jeu-en-3d-isometrique-le-retour-1/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 07:34:41 +0000</pubDate>
		<dc:creator>Anthor</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Jeu par Navigateur]]></category>

		<guid isPermaLink="false">http://www.anthor.net/?p=403</guid>
		<description><![CDATA[Il y a quelques mois déjà, j&#8217;avais mis au point un module de plateau de jeu en 3d isométrique. Mis de côté pour le développement de Tarschool, je n&#8217;avais plus du tout mis le nez dedans. Ayant un peu plus de temps, et parfois le besoin de me changer les idées, il m&#8217;arrive désormais de [...]]]></description>
			<content:encoded><![CDATA[<p>Il y a quelques mois déjà, j&#8217;avais mis au point un module de plateau de jeu en 3d isométrique. Mis de côté pour le développement de Tarschool, je n&#8217;avais plus du tout mis le nez dedans.</p>
<p>Ayant un peu plus de temps, et parfois le besoin de me changer les idées, il m&#8217;arrive désormais de travailler un peu dessus.<br />
<span id="more-403"></span><br />
Je me suis pour le moment principalement attelé à la création du continent au nord, avec sa côte ouest, et ses 14 villes. Pour le moment seul l&#8217;emplacement des villes et des rivières a été terminé.<br />
Cette partie représente environ 200 cases de large sur 200 cases de haut. Ce qui fait environ 1/12ème du monde prévu pour le moment.</p>
<p>J&#8217;espère très prochainement pouvoir ouvrir ce monde à la visite, mais il reste des optimisations à faire au niveau de l&#8217;affichage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthor.net/blog/developpement/plateau-de-jeu-en-3d-isometrique-le-retour-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

