<?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>GaanZa</title>
	<atom:link href="http://www.gaanza.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gaanza.com</link>
	<description>Interactive</description>
	<lastBuildDate>Fri, 05 Mar 2010 06:23:25 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2D Rain Effect</title>
		<link>http://www.gaanza.com/blog/2d-rain-effect/</link>
		<comments>http://www.gaanza.com/blog/2d-rain-effect/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 05:40:10 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[Slick 2D]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[2d rain effect]]></category>
		<category><![CDATA[lwjgl]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/?p=382</guid>
		<description><![CDATA[Hola Everyone.
I am working on a level for 2d game where i needed to add a rain effects. I am using Slick 2D library for making my 2d game. Before i started working on making  2D rain effect , i discussed this topic on slick 2d forum for how to get started ? Here [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Hola Everyone.</strong><br />
I am working on a level for 2d game where i needed to add a rain effects. I am using Slick 2D library for making my 2d game. Before i started working on making  2D rain effect , i discussed this topic on slick 2d forum for how to get started ? Here is the <a href="http://slick.javaunlimited.net/viewtopic.php?p=13771#13771" target="_blank">forum thread</a>. You can check it out.<br />
So i wrote a simple code to create a rain effect:<br />
1)	Make a Rain Drop, i wrote a class for Rain Drop that extends Polygon class. Yes i m creating rain drops with polygons.<br />
2)	Create number of drops at random coordinates  and simulate it across the screen i.e make them fall. You can use wind factor also for providing bit more interesting.</p>
<p><a href="http://www.gaanza.com/wp-content/uploads/2010/03/rain1.png"><img class="alignnone size-full wp-image-388" title="rain" src="http://www.gaanza.com/wp-content/uploads/2010/03/rain1.png" alt="" width="599" height="768" /></a><br />
So this is the way i started.</p>
<p>Here is the Rain Drop class:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co2">import org.newdawn.slick.geom.Polygon;</span></p>
<p><span class="kw2">public</span> <span class="kw2">class</span> RainDrop <span class="kw2">extends</span> <a href="http://www.google.com/search?q=allinurl%3APolygon+java.sun.com&#038;bntl=1"><span class="kw3">Polygon</span></a><span class="br0">&#123;</span><br />
<span class="kw2">public</span> RainDrop<span class="br0">&#40;</span><span class="kw4">int</span> size<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
super<span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p><span class="coMULTI">/** coordinates of vertices of polygon(rain drop) */</span><br />
<span class="kw2">this</span>.<span class="me1">addPoint</span><span class="br0">&#40;</span><span class="nu0">0</span>, <span class="nu0">0</span><span class="br0">&#41;</span>;<br />
<span class="kw2">this</span>.<span class="me1">addPoint</span><span class="br0">&#40;</span><span class="nu0">0</span>, size<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>This is the main class where we are using rain drops and simulating it to create a simple rain effect, nothing fancy.</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co2">import java.util.logging.Level;</span><br />
<span class="co2">import java.util.logging.Logger;</span><br />
<span class="co2">import org.newdawn.slick.AppGameContainer;</span><br />
<span class="co2">import org.newdawn.slick.BasicGame;</span><br />
<span class="co2">import org.newdawn.slick.Color;</span><br />
<span class="co2">import org.newdawn.slick.GameContainer;</span><br />
<span class="co2">import org.newdawn.slick.Graphics;</span><br />
<span class="co2">import org.newdawn.slick.Image;</span><br />
<span class="co2">import org.newdawn.slick.SlickException;</span></p>
<p><span class="kw2">public</span> <span class="kw2">class</span> Rainy <span class="kw2">extends</span> BasicGame<span class="br0">&#123;</span></p>
<p><span class="kw2">private</span> RainDrop<span class="br0">&#91;</span><span class="br0">&#93;</span> drops;<br />
<span class="kw2">private</span> <a href="http://www.google.com/search?q=allinurl%3AImage+java.sun.com&#038;bntl=1"><span class="kw3">Image</span></a> background;</p>
<p><span class="kw2">public</span> Rainy<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp;super<span class="br0">&#40;</span><span class="st0">&#8220;&#8221;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">public</span> <span class="kw4">static</span> <span class="kw4">void</span> main<span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&#038;bntl=1"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> args<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="kw2">try</span> <span class="br0">&#123;</span><br />
AppGameContainer app = <span class="kw2">new</span> AppGameContainer<span class="br0">&#40;</span><span class="kw2">new</span> Rainy<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
app.<span class="me1">setDisplayMode</span><span class="br0">&#40;</span><span class="nu0">1024</span>, <span class="nu0">768</span>, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
app.<span class="me1">setTargetFrameRate</span><span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span>;<br />
app.<span class="me1">setShowFPS</span><span class="br0">&#40;</span><span class="kw2">false</span><span class="br0">&#41;</span>;<br />
app.<span class="me1">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span> <span class="kw2">catch</span> <span class="br0">&#40;</span>SlickException ex<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
Logger.<span class="me1">getLogger</span><span class="br0">&#40;</span>Rainy.<span class="kw2">class</span>.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="me1">log</span><span class="br0">&#40;</span>Level.<span class="me1">SEVERE</span>, <span class="kw2">null</span>, ex<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></p>
<p>@Override<br />
<span class="kw2">public</span> <span class="kw4">void</span> init<span class="br0">&#40;</span>GameContainer gc<span class="br0">&#41;</span> <span class="kw2">throws</span> SlickException <span class="br0">&#123;</span><br />
background=<span class="kw2">new</span> <a href="http://www.google.com/search?q=allinurl%3AImage+java.sun.com&#038;bntl=1"><span class="kw3">Image</span></a><span class="br0">&#40;</span><span class="st0">&#8220;data/jungle.jpg&#8221;</span><span class="br0">&#41;</span>;</p>
<p><span class="coMULTI">/** creating 700 rain drops and placing it on random location across the screen */</span><br />
initializeRain<span class="br0">&#40;</span><span class="nu0">900</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p>@Override<br />
<span class="kw2">public</span> <span class="kw4">void</span> update<span class="br0">&#40;</span>GameContainer gc, <span class="kw4">int</span> delta<span class="br0">&#41;</span> <span class="kw2">throws</span> SlickException <span class="br0">&#123;</span></p>
<p><span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span>;i&lt;drops.<span class="me1">length</span>-<span class="nu0">1</span>;i++<span class="br0">&#41;</span><span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setY</span><span class="br0">&#40;</span>drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">getY</span><span class="br0">&#40;</span><span class="br0">&#41;</span>+<span class="nu0">4</span>.0f<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setX</span><span class="br0">&#40;</span>drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">getX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">getY</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&gt;<span class="nu0">768</span><span class="br0">&#41;</span><span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setX</span><span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&#038;bntl=1"><span class="kw3">Math</span></a>.<span class="me1">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> * <span class="nu0">2000</span><span class="br0">&#41;</span>+<span class="nu0">30</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setY</span><span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&#038;bntl=1"><span class="kw3">Math</span></a>.<span class="me1">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> * <span class="nu0">5</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</p>
<p><span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span></p>
<p><span class="kw2">public</span> <span class="kw4">void</span> render<span class="br0">&#40;</span>GameContainer gc, <a href="http://www.google.com/search?q=allinurl%3AGraphics+java.sun.com&#038;bntl=1"><span class="kw3">Graphics</span></a> g<span class="br0">&#41;</span> <span class="kw2">throws</span> SlickException <span class="br0">&#123;</span><br />
g.<span class="me1">drawImage</span><span class="br0">&#40;</span>background, <span class="nu0">0</span>, <span class="nu0">0</span><span class="br0">&#41;</span>;<br />
g.<span class="me1">setColor</span><span class="br0">&#40;</span><span class="kw2">new</span> <a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&#038;bntl=1"><span class="kw3">Color</span></a><span class="br0">&#40;</span><span class="nu0">188</span>.0f,<span class="nu0">227</span>.0f,<span class="nu0">229</span>.0f,<span class="nu0">0</span>.3f<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span>;i&lt;drops.<span class="me1">length</span>-<span class="nu0">1</span>;i++<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp;g.<span class="me1">draw</span><span class="br0">&#40;</span>drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="coMULTI">/** creating rain drops */</span><br />
<span class="kw4">void</span> initializeRain<span class="br0">&#40;</span><span class="kw4">int</span> num_of_drops<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
drops=<span class="kw2">new</span> RainDrop<span class="br0">&#91;</span>num_of_drops<span class="br0">&#93;</span>;<br />
<span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span>;i&lt;drops.<span class="me1">length</span>-<span class="nu0">1</span>;i++<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>=<span class="kw2">new</span> RainDrop<span class="br0">&#40;</span><span class="br0">&#40;</span><span class="kw4">int</span><span class="br0">&#41;</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&#038;bntl=1"><span class="kw3">Math</span></a>.<span class="me1">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> * <span class="nu0">10</span> + <span class="nu0">4</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setX</span><span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&#038;bntl=1"><span class="kw3">Math</span></a>.<span class="me1">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> * <span class="nu0">2000</span><span class="br0">&#41;</span>+<span class="nu0">30</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; drops<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">setY</span><span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&#038;bntl=1"><span class="kw3">Math</span></a>.<span class="me1">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> * <span class="nu0">750</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span></div>
</div>
<p>So what i am doing  :<br />
1)	initializeRain(int num_of_drops) takes an int parameter which denotes the number of rain drops. This function creates a number of rain drops(instance of raindrop class) and assigns the random x and y position to each rain drops.<br />
2)	Then we simply iterate the array of rain drops and translate them across the screen. When drops reaches the bottom of screen then we simply restore back to random initial starting postion. This keeps going on and gives the impression of rainy effect.</p>
<p>This is very simple 2d effect that i started with. You can write your own optimized version and can add more feature to give fancy impression like adding alpha values  for each rain drop etc.</p>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/2d-rain-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Nearest Sprite For 2D Collision</title>
		<link>http://www.gaanza.com/blog/finding-nearest-sprite-for-2d-collision/</link>
		<comments>http://www.gaanza.com/blog/finding-nearest-sprite-for-2d-collision/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 15:04:08 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[Slick 2D]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[2d collision]]></category>
		<category><![CDATA[collision detection]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/?p=368</guid>
		<description><![CDATA[Hola EveryOne.
There are various methods/ways to detect a collision between two objects. Each having its own advantage and disadvantage and based on our requirement we implement one of the collsion detection algorithm.
Here i am not going to talk about collision algorithm. I am going to talk about determining the nearest object with which collision will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Hola EveryOne.</strong></p>
<p>There are various methods/ways to detect a collision between two objects. Each having its own advantage and disadvantage and based on our requirement we implement one of the collsion detection algorithm.</p>
<p>Here i am not going to talk about collision algorithm. I am going to talk about determining the nearest object with which collision will take place. Suppose there are many objects across the screen and u have to detect the collision between your game character and those objects. And you run the algorithm to detect collision with each of every object in every frame. So it decreases the efficiency of your program. Its better to detremine the nearest object to your game character and detect collision with that determined nearest object.</p>
<p>Here i m using bounding rectangle concept for collision detection.<br />
<a href="http://www.gaanza.com/wp-content/uploads/2010/02/near2.png"><img src="http://www.gaanza.com/wp-content/uploads/2010/02/near2.png" alt="" title="concept diagram" width="567" height="523" class="alignnone size-full wp-image-373" /></a></p>
<p>Code Example:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw2">public</span> <span class="kw4">static</span> Sprite getNearestGroundSprite<span class="br0">&#40;</span>ArrayList&lt;Sprite&gt; sprites,Sprite hero<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; Sprite sprite=<span class="kw2">null</span>;<br />
&nbsp; &nbsp; float minDistance=<span class="nu0">9999</span>;<br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>hero!=<span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span>;i&lt;sprites.<span class="me1">size</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;i++<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="coMULTI">/* ignore all those objects which are not visible across the screen */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&gt;screenWidth || <span class="br0">&#40;</span>sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>+sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getWidth</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&lt;<span class="nu0">0</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
<span class="coMULTI">/* ignore all those objects which are located above the game character */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>hero.<span class="me1">getSY</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&gt;sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSY</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
<span class="coMULTI">/* ignore all those objects that are located at the left side of game character */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>hero.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>&gt;<span class="br0">&#40;</span>sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>+sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getWidth</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
<span class="coMULTI">/* ignore all those objects that are located at right side of game character */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="br0">&#40;</span>hero.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span>+hero.<span class="me1">getWidth</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>&lt;sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSX</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>&nbsp; <br />
<span class="coMULTI">/* calculate the distance between remaining objects and game character */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; float dist=sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getSY</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-hero.<span class="me1">getSY</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="coMULTI">/* determine the nearest sprite from remaining sprites */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>dist&lt;minDistance<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minDistance=dist;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sprite=sprites.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="coMULTI">/* nearest object found or return null if not found */</span><br />
&nbsp; &nbsp; <span class="kw2">return</span> sprite;<br />
<span class="br0">&#125;</span></div>
</div>
<p>Sprite is just a class representing characters of game. getSX() and getSY() returns the x and y coordinate location of that sprite. getWidth() simply returns the width of the sprite image.</p>
<p>In above code i am ignoring all those sprites that are located at left, right and top of my game character because i need bottom sprite to check collision with i.e when character falls down. This way the number of sprites decreases for checking collisions. You can write function for finding nearest left and right sprites also. You need to call this function at right place and when needed.</p>
<p>This is very simple and basic way i started and it gets the job done. You can write your own optimized code. This is how i started. I have written my optimized code for finding nearest sprite but right now i won&#8217;t be posting it but i&#8217;l share it soon in near future.</p>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/finding-nearest-sprite-for-2d-collision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading image/Texture Mapping in LWJGL</title>
		<link>http://www.gaanza.com/blog/loading-imagetexture-mapping-in-lwjgl/</link>
		<comments>http://www.gaanza.com/blog/loading-imagetexture-mapping-in-lwjgl/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 15:35:40 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[loading image]]></category>
		<category><![CDATA[loading image/texture mapping in lwjgl]]></category>
		<category><![CDATA[lwjgl]]></category>
		<category><![CDATA[texture mapping]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=318</guid>
		<description><![CDATA[
Hola everyone.
I am currently working on my own two game projects: one project is of mobile phone game and other is 2.5 or side-scrolling 3d game, not much sure. So for second project i am making an small engine that will be used to make 2.5D game or side scrolling 3d game, Just simple and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-323" title="box" src="http://www.gaanza.com/wp-content/uploads/2009/10/box.png" alt="box" width="550" height="400" /></p>
<p>Hola everyone.</p>
<p>I am currently working on my own two game projects: one project is of mobile phone game and other is 2.5 or side-scrolling 3d game, not much sure. So for second project i am making an small engine that will be used to make 2.5D game or side scrolling 3d game, Just simple and fun game. I have chosen LWJGL, which is a java binding for Opengl to make my game. So first thing i need to work on loading images.texture mapping in lwjgl. I found some pretty much useful tutorials and great help from lwjgl forums. But atlast i got something that i was looking for from the <a href="http://lwjgl.org/forum/index.php/topic,3073.0.html" target="_blank">forum</a>.</p>
<p>I came to know about slick-util which is free and open source lib to <strong>load images and play sounds</strong>. Its very easy to pick up and implement it. Its just worked flawlessly and smoothly for me. You can <a href="http://slick.cokeandcode.com/downloads/util/" target="_blank">download the slick-util from here</a>.<strong> PNG, GIF, JPG, TGA are supported and WAV, OGG, XM sounds are supported by slick-util.</strong></p>
<p>So here i&#8217;l show u how easily i loaded images and mapped to a 3D BOX. First u have to setup lwjgl and slick-util with netbeans. Yeah i am using netbeans to write my program. You <a href="http://www.gaanza.com/blog/setting-up-lwjgl-with-netbeans/" target="_blank">can see my post to setup lwjgl with netbeans</a>. Now we will set up slick-util, its a continuation to the steps that we did to setup lwjgl.</p>
<p><strong>Continued&#8230;</strong></p>
<p>Step 1: We just have to configure the project properties so that project can find the lib to compile and run.</p>
<p><img class="alignnone size-full wp-image-319" title="1" src="http://www.gaanza.com/wp-content/uploads/2009/10/1.png" alt="1" width="501" height="206" /></p>
<p><img class="alignnone size-full wp-image-320" title="2" src="http://www.gaanza.com/wp-content/uploads/2009/10/2.png" alt="2" width="462" height="254" /></p>
<p>Ok that was it. Now slick-util lib has been set up.Now first i&#8217;l show u how to load image and bind it , full source will be at the end.</p>
<p><strong>Texture texture;</strong></p>
<p>Texture is an interface having description of texture which will be loaded.</p>
<p><strong>texture = TextureLoader.getTexture(&#8220;PNG&#8221;, new FileInputStream(&#8220;Data/Crate.png&#8221;));</strong></p>
<p>now we are loading the texture using TextureLoader utility class. Just smooth and simple.</p>
<p><strong>texture.bind();</strong></p>
<p>Now we are binding the texture.</p>
<p>So thats what u need to load the image and map them to objects. Download this image to use it in this program.</p>
<p><img class="alignnone size-full wp-image-321" title="Crate" src="http://www.gaanza.com/wp-content/uploads/2009/10/Crate.png" alt="Crate" width="256" height="256" /></p>
<p><strong>Full Code:</strong></p>
<div class="codesnip-container" >
<div class="codesnip"><span class="coMULTI">/*<br />
&nbsp;* To change this template, choose Tools | Templates<br />
&nbsp;* and open the template in the editor.<br />
&nbsp;*/</span></p>
<p>package com.<span class="me1">gaanza</span>.<span class="me1">engine</span>.<span class="me1">test2</span>;</p>
<p><span class="co2">import java.io.FileInputStream;</span><br />
<span class="co2">import java.io.IOException;</span><br />
<span class="co2">import java.util.logging.Level;</span><br />
<span class="co2">import java.util.logging.Logger;</span><br />
<span class="co2">import org.lwjgl.LWJGLException;</span><br />
<span class="co2">import org.lwjgl.Sys;</span><br />
<span class="co2">import org.lwjgl.opengl.Display;</span><br />
<span class="co2">import org.lwjgl.opengl.DisplayMode;</span><br />
<span class="co2">import org.lwjgl.opengl.GL11;</span><br />
<span class="co2">import org.lwjgl.util.glu.GLU;</span><br />
<span class="co2">import org.newdawn.slick.opengl.Texture;</span><br />
<span class="co2">import org.newdawn.slick.opengl.TextureLoader;</span></p>
<p><span class="coMULTI">/**<br />
&nbsp;*<br />
&nbsp;* @author Java Guy<br />
&nbsp;*/</span><br />
<span class="kw2">public</span> <span class="kw2">class</span> EngineTest <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">static</span> <span class="kw4">boolean</span> gameRunning=<span class="kw2">true</span>;<br />
&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">static</span> <span class="kw4">int</span> targetWidth = <span class="nu0">800</span>;<br />
&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">static</span> <span class="kw4">int</span> targetHeight = <span class="nu0">600</span>;</p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> float xrot=<span class="nu0">0</span>.1f;<br />
&nbsp; &nbsp; <span class="kw2">private</span> float yrot=<span class="nu0">0</span>.1f;<br />
&nbsp; &nbsp; <span class="kw2">private</span> float zrot=<span class="nu0">0</span>.1f;</p>
<p>&nbsp; &nbsp; <span class="coMULTI">/** The texture that&#8217;s been loaded */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">private</span> Texture texture;</p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">static</span> <span class="kw4">void</span> main<span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&#038;bntl=1"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> args<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; EngineTest app=<span class="kw2">new</span> EngineTest<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; initDisplay<span class="br0">&#40;</span><span class="kw2">false</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; initGL<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; app.<span class="me1">init</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; app.<span class="me1">run</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">static</span> <span class="kw4">void</span> initDisplay<span class="br0">&#40;</span><span class="kw4">boolean</span> fullscreen<span class="br0">&#41;</span><span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; DisplayMode chosenMode = <span class="kw2">null</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">try</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayMode<span class="br0">&#91;</span><span class="br0">&#93;</span> modes = Display.<span class="me1">getAvailableDisplayModes</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw4">int</span> i=<span class="nu0">0</span>;i&lt;modes.<span class="me1">length</span>;i++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span>modes<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">getWidth</span><span class="br0">&#40;</span><span class="br0">&#41;</span> == targetWidth<span class="br0">&#41;</span> &amp;&amp; <span class="br0">&#40;</span>modes<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">getHeight</span><span class="br0">&#40;</span><span class="br0">&#41;</span> == targetHeight<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chosenMode = modes<span class="br0">&#91;</span>i<span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">break</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw2">catch</span> <span class="br0">&#40;</span>LWJGLException e<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Sys.<span class="me1">alert</span><span class="br0">&#40;</span><span class="st0">&#8220;Error&#8221;</span>, <span class="st0">&#8220;Unable to determine display modes.&#8221;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&#038;bntl=1"><span class="kw3">System</span></a>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// at this point if we have no mode there was no appropriate, let the user know</span><br />
&nbsp; &nbsp; <span class="co1">// and give up</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>chosenMode == <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sys.<span class="me1">alert</span><span class="br0">&#40;</span><span class="st0">&#8220;Error&#8221;</span>, <span class="st0">&#8220;Unable to find appropriate display mode.&#8221;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&#038;bntl=1"><span class="kw3">System</span></a>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">try</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">setDisplayMode</span><span class="br0">&#40;</span>chosenMode<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">setFullscreen</span><span class="br0">&#40;</span>fullscreen<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&#8220;LWJGL window&#8221;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">create</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">catch</span> <span class="br0">&#40;</span>LWJGLException e<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sys.<span class="me1">alert</span><span class="br0">&#40;</span><span class="st0">&#8220;Error&#8221;</span>,<span class="st0">&#8220;Unable to create display.&#8221;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&#038;bntl=1"><span class="kw3">System</span></a>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">static</span> <span class="kw4">boolean</span> initGL<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glMatrixMode</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_PROJECTION</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glLoadIdentity</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">//&nbsp; &nbsp; &nbsp; &nbsp; Calculate the aspect ratio of the window</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GLU.<span class="me1">gluPerspective</span><span class="br0">&#40;</span><span class="nu0">45</span>.0f,<span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span>targetWidth<span class="br0">&#41;</span>/<span class="br0">&#40;</span><span class="br0">&#40;</span>float<span class="br0">&#41;</span>targetHeight<span class="br0">&#41;</span>,<span class="nu0">0</span>.1f,<span class="nu0">100</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glMatrixMode</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_MODELVIEW</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glLoadIdentity</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glEnable</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_TEXTURE_2D</span><span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Enable Texture Mapping ( NEW )</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glShadeModel</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_SMOOTH</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glClearColor</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glClearDepth</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glEnable</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_DEPTH_TEST</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glDepthFunc</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_LEQUAL</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glHint</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_PERSPECTIVE_CORRECTION_HINT</span>, GL11.<span class="me1">GL_NICEST</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> <span class="kw2">true</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> init<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">try</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; texture = TextureLoader.<span class="me1">getTexture</span><span class="br0">&#40;</span><span class="st0">&#8220;PNG&#8221;</span>, <span class="kw2">new</span> <a href="http://www.google.com/search?q=allinurl%3AFileInputStream+java.sun.com&#038;bntl=1"><span class="kw3">FileInputStream</span></a><span class="br0">&#40;</span><span class="st0">&#8220;Data/grass.png&#8221;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw2">catch</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AIOException+java.sun.com&#038;bntl=1"><span class="kw3">IOException</span></a> ex<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Logger.<span class="me1">getLogger</span><span class="br0">&#40;</span>EngineTest.<span class="kw2">class</span>.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="me1">log</span><span class="br0">&#40;</span>Level.<span class="me1">SEVERE</span>, <span class="kw2">null</span>, ex<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> run<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span><span class="br0">&#40;</span>gameRunning<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; render<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">update</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// finally check if the user has requested that the display be</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// shutdown</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>Display.<span class="me1">isCloseRequested</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gameRunning = <span class="kw2">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display.<span class="me1">destroy</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&#038;bntl=1"><span class="kw3">System</span></a>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> update<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xrot+=<span class="nu0">0</span>.1f;<br />
&nbsp; &nbsp; &nbsp; &nbsp; yrot+=<span class="nu0">0</span>.1f;<br />
&nbsp; &nbsp; &nbsp; &nbsp; zrot+=<span class="nu0">0</span>.1f;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> render<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glClear</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_COLOR_BUFFER_BIT</span>|GL11.<span class="me1">GL_DEPTH_BUFFER_BIT</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glLoadIdentity</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTranslatef</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f,<span class="nu0">0</span>.0f,-<span class="nu0">5</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span class="co1">// Move Into The Screen 5 Units</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glRotatef</span><span class="br0">&#40;</span>xrot,<span class="nu0">1</span>.0f,<span class="nu0">0</span>.0f,<span class="nu0">0</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Rotate On The X Axis</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glRotatef</span><span class="br0">&#40;</span>yrot,<span class="nu0">0</span>.0f,<span class="nu0">1</span>.0f,<span class="nu0">0</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Rotate On The Y Axis</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glRotatef</span><span class="br0">&#40;</span>zrot,<span class="nu0">0</span>.0f,<span class="nu0">0</span>.0f,<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Rotate On The Z Axis</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; texture.<span class="me1">bind</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">// or GL11.glBind(texture.getTextureID());</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glBegin</span><span class="br0">&#40;</span>GL11.<span class="me1">GL_QUADS</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Front Face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Back Face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Top Face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Bottom Face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Right face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span> <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Left Face</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">0</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Bottom Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">1</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Right Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glTexCoord2f</span><span class="br0">&#40;</span><span class="nu0">0</span>.0f, <span class="nu0">1</span>.0f<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glVertex3f</span><span class="br0">&#40;</span>-<span class="nu0">1</span>.0f,&nbsp; <span class="nu0">1</span>.0f, -<span class="nu0">1</span>.0f<span class="br0">&#41;</span>;&nbsp; &nbsp;<span class="co1">// Top Left Of The Texture and Quad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GL11.<span class="me1">glEnd</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/loading-imagetexture-mapping-in-lwjgl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diving into Mobile Gaming !!</title>
		<link>http://www.gaanza.com/blog/diving-into-mobile-gaming/</link>
		<comments>http://www.gaanza.com/blog/diving-into-mobile-gaming/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 08:12:34 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile game development]]></category>
		<category><![CDATA[mobile gaming]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=313</guid>
		<description><![CDATA[Recently my friends suggested me to make games for mobile phones. I haven&#8217;t done any formal course for mobile programming so i did a some search on mobile game development on google and gone through some articles like The Clash of Mobile Platforms: J2ME, ExEn, Mophun and WGE
I have a Nokia N70ME handset and most [...]]]></description>
			<content:encoded><![CDATA[<p>Recently my friends suggested me to make games for mobile phones. I haven&#8217;t done any formal course for mobile programming so i did a some search on mobile game development on google and gone through some articles like <span style="font-family: Verdana; font-weight: bold; font-size: 12pt; color: #003e98;"><a href="http://www.gamedev.net/reference/articles/article1944.asp" target="_blank">The Clash of Mobile Platforms: J2ME, ExEn, Mophun and WGE</a></span></p>
<p><span style="font-size: small;">I have a Nokia N70ME handset and most of my friends have same kinda(specifications) handset. All of them are java enabled. I did a search on their specifications and found that almost all were midp 2.0 enabled. After doing some research on mobile gaming i chose J2ME for developing mobile games because majority of the phones of my target audience are java-enabled so i can reach to masses. Secondly, SUN provides you all the development tools for free. And thirdly i am more comfortable in java programming language so it would be easier for me to pick up things more fast and easily. So i am using netbeans IDE 6.7 with the mobility pack to write my app and its pretty productive and reliable. My next step was to find some good online tutorial to just get started, all basic things. I searched the google and found many useful stuff there:</span></p>
<p><span style="font-size: small;"> <a href="http://developers.sun.com/mobility/midp/articles/gameapi/" target="_blank">http://developers.sun.com/mobility/midp/articles/gameapi/</a></span></p>
<p><span style="font-size: small;"><a href="http://developers.sun.com/mobility/midp/articles/game/" target="_blank">http://developers.sun.com/mobility/midp/articles/game/</a></span></p>
<p><span style="font-size: small;"><a href="http://today.java.net/pub/a/today/2005/07/07/j2me3.html" target="_blank">http://today.java.net/pub/a/today/2005/07/07/j2me3.html</a></span></p>
<p><span style="font-size: small;"><a href="http://www.devx.com/wireless/Article/27167/1954">http://www.devx.com/wireless/Article/27167/1954</a></span></p>
<p><span style="font-size: small;">So i got many stuffs to get started making midp 2.0 games. It didn&#8217;t take too much time to pick up things. I got the concepts easily and started implementing them. I just started with testing codes like drawing images, moving them, rotation etc. After testing all those codes i decided to make very simple 2d side scrolling game. Then i searched for some free sprites on google and got some stuffs on world war 2 theme. Then i asked my friend to make some background images for me and he made some pretty good backgrounds. So then i was off to fly and started making the game.</span></p>
<p><span style="font-size: small;">This is my current progress on game and i am pretty sure that soon i&#8217;ll complete the game and upload here for the download.</span></p>
<p><span style="font-size: small;"><img class="alignnone size-full wp-image-314" title="jungleMobile" src="http://www.gaanza.com/wp-content/uploads/2009/10/jungleMobile.png" alt="jungleMobile" width="248" height="329" /></span></p>
<p><span style="font-size: small;">This is my mobile game project that i am working. Soon i&#8217;l finish it. And important thing is that i am enjoying very much making game for mobile phones. I tested it on my Nokia N70 handset and it worked flawlessly. I am very excited regarding this project.</span></p>
<p><span style="font-size: small;"><strong>Gracias.</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/diving-into-mobile-gaming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up LWJGL with Netbeans</title>
		<link>http://www.gaanza.com/blog/setting-up-lwjgl-with-netbeans/</link>
		<comments>http://www.gaanza.com/blog/setting-up-lwjgl-with-netbeans/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 04:41:05 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[lwjgl]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[setting up lwjgl with netbeans]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=285</guid>
		<description><![CDATA[On Forums, people keeps asking about setting up lwjgl library with netbeans. So here i am going to show the steps to do that.
STEP 1: Go to Tools-&#62; Libariries.Now create new library. Give it a name say &#8220;lwjgl21&#8243;.

STEP 2: Now we have to configure the library. Click the classpath tab, then click add jars, and [...]]]></description>
			<content:encoded><![CDATA[<p>On Forums, people keeps asking about setting up lwjgl library with netbeans. So here i am going to show the steps to do that.</p>
<p><strong>STEP 1: </strong>Go to Tools-&gt; Libariries.Now create new library. Give it a name say &#8220;lwjgl21&#8243;.</p>
<p><img class="alignnone size-full wp-image-286" title="step1" src="http://www.gaanza.com/wp-content/uploads/2009/09/step1.png" alt="step1" width="535" height="213" /></p>
<p><strong>STEP 2:</strong> Now we have to configure the library. Click the classpath tab, then click add jars, and add all the jars shown below:</p>
<p><img class="alignnone size-full wp-image-287" title="step2" src="http://www.gaanza.com/wp-content/uploads/2009/09/step2.png" alt="step2" width="534" height="406" /></p>
<p><strong>STEP 3:</strong> If u want to add java doc than click the javadoc tab, and then add the javadoc folder. Then finally click oK and lwjgl21 library that we have just created is done.</p>
<p><strong>STEP 4:</strong> Now create a empty java project.</p>
<p><img class="alignnone size-full wp-image-288" title="step3" src="http://www.gaanza.com/wp-content/uploads/2009/09/step3.png" alt="step3" width="305" height="144" /></p>
<p><strong>STEP 5:</strong> Now we have to set the properties so that our newly created project can find the lwjgl library and jar files. So Right-Click the project-&gt; Properties. Now check the image carefully and configure accordingly. So first select libraries on the categories section and then click compile tab, and then add jar file for compilation step. This step is very important so check image properly below.</p>
<p><img class="alignnone size-full wp-image-289" title="step4" src="http://www.gaanza.com/wp-content/uploads/2009/09/step4.png" alt="step4" width="578" height="189" /></p>
<p><strong>STEP 6:</strong> Okie now click run tab, and add the library that we had just created. Check the image very properly.</p>
<p><img class="alignnone size-full wp-image-294" title="step5" src="http://www.gaanza.com/wp-content/uploads/2009/09/step51.png" alt="step5" width="548" height="177" /></p>
<p><strong>STEP 7:</strong> Now the final step. We have to provide the argument so that project cud find the necessary dll files. So first select the Run at caregories section then go to vm-options. Check the image properly and follow.</p>
<p><img class="alignnone size-full wp-image-291" title="step6" src="http://www.gaanza.com/wp-content/uploads/2009/09/step6.png" alt="step6" width="565" height="207" /></p>
<p>Okie thats it. Now click ok. So you have just set up lwjgl with your netbeans ide. So now you can compile and run your lwjgl app. I am using netbeans ide 6.7.</p>
<p><strong>Gracias</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/setting-up-lwjgl-with-netbeans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Game Engines: A Quick Peek</title>
		<link>http://www.gaanza.com/blog/game-engines/</link>
		<comments>http://www.gaanza.com/blog/game-engines/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 13:15:56 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[consoles]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[game engines]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=270</guid>
		<description><![CDATA[Game Engines are the core libraries which is used as the architecture to develop the game. It cuts down the pressure on development teams as all the complex coding is already written in the engine. The core functions that Game Engine provides are rendering(2d or 3d), physics engine or collision detection, sound, scripting, artificial intelligence. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Game Engines</strong> are the core libraries which is used as the architecture to develop the game. It cuts down the pressure on development teams as all the complex coding is already written in the engine. The core functions that Game Engine provides are rendering(2d or 3d), physics engine or collision detection, sound, scripting, artificial intelligence. They provide all the core functionalities needed to develop a game while reducing the costs, complexities and time.</p>
<p>There are libraries that are developed to provide only one specific functions, called <strong>Middleware. </strong><strong>Like Havok </strong>is a middleware which offers developers the foundation for creating realistic physics simulation.</p>
<p>Developers  <strong>license the engines like id tech, unreal </strong>to develop their titles. Some developers use their <strong>in-house proprietry engines</strong> created by themselves for their own titles. And their are also some <strong>free open source engines </strong>out there like OGRE, JMonkeyEngine.</p>
<p><strong><em>Now i&#8217;ll discuss about some very well known Game Engines, Middleware And Engines used in making next-gen games.</em></strong></p>
<p><strong>Unreal Engine:</strong></p>
<p>Unreal is a game engine developed by Epic Games. The games made by this engine are Gears of War franchise, Bioshock, splintercell, MassEffect and many other. This Engine has won the <strong>Game Developer&#8217;s Front Line</strong> awards in engine category for three consecutive awards. This Engine is <strong>Game Developer&#8217;s Front Line Awards 2008 Hall Of Fame winner. </strong>You can read <strong><a href="http://www.gamasutra.com/view/feature/3898/game_developers_front_line_awards_.php?page=2" target="_blank">Why Unreal Engine was the Hall Of Fame Winner</a></strong>.</p>
<div id="attachment_271" class="wp-caption alignnone" style="width: 586px"><img class="size-full wp-image-271 " title="gears2vid01" src="http://www.gaanza.com/wp-content/uploads/2009/09/gears2vid01.jpg" alt="gears2vid01" width="576" height="324" /><p class="wp-caption-text">Gears of War 2 made with Unreal engine</p></div>
<p><strong>Havok</strong></p>
<p>Havok is a physics engine developed by Havok. Havok offers developers the foundation for creating realistic physics simulation through efficient and optimized calculation. The Titles that used Havok engine are Crackdown, Assassin&#8217;s creed, F.E.A.R 2:Project Origin, Fallout 3, Halo 3 and many more. <strong>Havok won the Game Developer&#8217;s Front Line Awards 2008 in Middleware category</strong>. Read <strong><a href="http://www.gamasutra.com/view/feature/3898/game_developers_front_line_awards_.php?page=5" target="_blank">why Havok won the award ?</a></strong>.</p>
<div id="attachment_273" class="wp-caption alignnone" style="width: 490px"><img class="size-full wp-image-273" title="company-of-heroes" src="http://www.gaanza.com/wp-content/uploads/2009/09/company-of-heroes.jpg" alt="company-of-heroes" width="480" height="360" /><p class="wp-caption-text">Company of Heroes using Havok engine</p></div>
<p><strong>cryEngine</strong></p>
<p>Developed by CryTek is the force behind those killer graphics of crysis. They set a new standard for visuals. CryTek released a GDC demonstration movie for their latest all-in-one game development solution using cryEngine 3, premiered at GDC 2009 in san fransisco. cryEngine 3 is the first development platform for Xbox 360, Playstation 3, MMO, DX9/DX10 and includes cryEngine 3 Sandbox level editor and &#8220;What you see is what you play&#8221; tool designed for professional developers. 3 comes with significant feartures for consoles and next-gen game development.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_a9KBqTH3sI&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/_a9KBqTH3sI&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div id="attachment_275" class="wp-caption alignnone" style="width: 550px"><img class="size-full wp-image-275 " title="crysis" src="http://www.gaanza.com/wp-content/uploads/2009/09/crysis.jpg" alt="crysis" width="540" height="360" /><p class="wp-caption-text">crysis made with cryEngine</p></div>
<p><strong>R.A.G.E (Rockstar Advanced Game Engine)</strong></p>
<p>R.A.G.E is a game engine developed by a team called &#8220;Rage Technology Group&#8221; at Rockstar san diego. Rockstar has integrated a few third party middleware like euphoria character animation engine and Bullet physics engine. GTA4 was developed with this cool engine. Rockstar are working on a game Red Dead Redemption which uses R.A.G.E engine. The trailer of Read dead Redemption looks really cool with realistic horses, towns, prairies&#8230;.with ralistic weather. R.A.G.E engine provides functionalities to handle realistic weather effects, complex A.I, large worlds..etc</p>
<p>Check this video of Red Dead Redemption, its jusshows you what R.A.G.E is capable of doing.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/cy3wuKIFF88&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/cy3wuKIFF88&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div id="attachment_277" class="wp-caption alignnone" style="width: 510px"><img class="size-full wp-image-277" title="gta4" src="http://www.gaanza.com/wp-content/uploads/2009/09/gta4.jpg" alt="gta4" width="500" height="350" /><p class="wp-caption-text">Grand Theft Auto 4 made with R.A.G.E engine</p></div>
<p><strong>Naughty Dog Game Engine</strong></p>
<p>This Engine is developed by Naughty Dog. This year naughty Dog showcased their upcoming title Uncharted 2 at sony playstation 3 conference, E3 2009 . I was awestruck by watching the trailer and demo. I had never seen such a cinematic game(demo) before, graphics looked so awesome and cool. Naughty Dog with Uncharted 2 really showed the world what Ps3 is capable to do. So i would say Naughty Dog maxed out the Ps3 with Uncharted 2. The demo showcased realistic environments, smooth animation-interaction, cinematic feel with cinematic camera work <img src='http://www.gaanza.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> &#8230;seamless transition between cinematic and gameplay.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GUPAyGWKd6c&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/GUPAyGWKd6c&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>So there are other engines also that i haven&#8217;t mentioned like <strong>Valve&#8217;s Source engine</strong> which gave titles like half-life franchise, left 4 dead, <strong>Infinity Ward&#8217;s IW engine</strong> which gave Call Of Duty franchise(not all sequels), <strong>Ubisoft&#8217;s Anvil engine</strong> which was used for Assassin&#8217;s creed&#8230;.<strong>and many more engines.</strong> I have just  quickly looked at just some good engines that took my interest. This post is not on best engines but tells about good engines.</p>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/game-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Experience with Xbox 360 and PS3</title>
		<link>http://www.gaanza.com/blog/my-experience-with-xbox-360-and-ps3/</link>
		<comments>http://www.gaanza.com/blog/my-experience-with-xbox-360-and-ps3/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 12:23:16 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[consoles]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=255</guid>
		<description><![CDATA[
Hola everyone.
I have seen many gamers on forums discussing on the debate: Xbox 360 vs PS3. Half section of gamers says Xbox 360 is best and other half says PS3 is superior and debate goes on and on. Many newbies gets confused and they do not know which consoles to buy.
I don&#8217;t have any of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-257" title="consoles" src="http://www.gaanza.com/wp-content/uploads/2009/09/consoles.png" alt="consoles" width="495" height="225" /></p>
<p><strong>Hola everyone.</strong></p>
<p>I have seen many gamers on forums discussing on the <strong>debate: Xbox 360 vs PS3</strong>. Half section of gamers says Xbox 360 is best and other half says PS3 is superior and debate goes on and on. Many newbies gets confused and they do not know which consoles to buy.</p>
<p>I don&#8217;t have any of the consoles at my home. I have 2 friends, one of whom has got xbox 360 and other has got both 360 and ps3. So i just visit their places frequently to play games and experience the gaming on both consoles. So here i am going to share my experience with both consoles.</p>
<p>Before sharing my experience, i want the readers to know that this post is not on the debate: Xbox 360 vs PS3. This is post reflects just my experience so don&#8217;t make any issues with it. <img src='http://www.gaanza.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>So first i will give u a glance on inside the two consoles that run these amazing game titles:</p>
<p><strong>PS3:</strong></p>
<p><strong>a) </strong>Seven Single Threaded Processors (3.2 GHz)</p>
<p><strong>b)</strong> One Multi-Threaded cell processor (3.2 GHz)</p>
<p><strong>c)</strong> Nvidia &#8216;RSX&#8217; custom made graphic processor</p>
<p><strong>Xbox 360:</strong></p>
<p><strong>a)</strong> Triple-Dual threaded core Xenon Processor (3.2 GHz)</p>
<p><strong>b)</strong> ATI &#8216;Xenon&#8217; GPU</p>
<p>That was the inside configuration of both systems.</p>
<p>I am not a fan of either consoles. I am a gamer and i love to play and enjoy games.</p>
<p><strong>Many gamer says that they have played specific game titles on both consoles and they found Xbox 360 version better and superior than PS3&#8217;s</strong> for example: GTA 4. But i would like to mention that almost all multi-platform <strong>titles like GTA 4, Assasin&#8217;s creed..etc are a 360 to PS3 port</strong>, so these games may not look better on PS3 and look good in Xbox 360. Like GTA 4 is a 360 to PS3 port, so developers had to cut some corners in order to ship the title on market in time. So i would say if time and money was there then the games would have been absolutely identical.</p>
<p><strong>Gears Of War was an amazing title which is a 360 exclusive title</strong>. I am a big big fan of gears of war franchise and i still play it with my friends on split-screen mode on his xbox system and i never get bored. But but i and ofcourse you will notice that the game was short because <strong>xbox 360 only had dual layer dvd</strong> to work with, whereas <strong>PS3 has more disc space to work with to make bigger and better games</strong>. When <strong>KillZone 2</strong> came out, <strong>it had an amazing graphics</strong> and i noticed that <strong>PS3 totally outperformed 360</strong>. Uncharted was also amazing cinematic game. Killzone 2 is one of the best fps games that i have played. <img src='http://www.gaanza.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-259" title="gear_uncharted" src="http://www.gaanza.com/wp-content/uploads/2009/09/gear_uncharted.png" alt="gear_uncharted" width="640" height="240" /></p>
<p><strong>I love Xbox live</strong>. <strong>The interface is excellent</strong> and <strong>interaction between player is damn awesome</strong> and feature like achievements is also cool. I liked Xbox live more the way than PSN. In PSN i cannont send message to my friend from within the game. <strong>I didn&#8217;t get the facility of voice chatting on PSN</strong>. On Xbox live i can reach my friends right away in a single button press, send them voice/text message and invite my friend to the server where i am playing. <strong>Xbox live is just very very cool</strong>. But PSN is free for most part and for Xbox live u have to subscribe dollars $$$ <img src='http://www.gaanza.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  But i am really cool with Xbox live, its just very cool than PSN. <img src='http://www.gaanza.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-260" title="xbox_psn" src="http://www.gaanza.com/wp-content/uploads/2009/09/xbox_psn.png" alt="xbox_psn" width="600" height="200" /></p>
<p>Putting Games on side for the moment and talking about movies than <strong>thumbs UP to PS3</strong>. PS3 is undoubtely the <strong>superior movie player</strong> with its integrated <strong>Blu-Ray technology</strong>. It has also got <strong>amazing sound quality</strong>. So i would say here Ps3 is far more better than Xbox 360.</p>
<p><img class="alignnone size-full wp-image-261" title="blu-ray-logo-400" src="http://www.gaanza.com/wp-content/uploads/2009/09/blu-ray-logo-400.jpg" alt="blu-ray-logo-400" width="300" height="200" /></p>
<p>Xbox 360 makes a <strong>annoying background sound</strong> which really annoys me while watching the movie. PS3 is quiet during the movie on.</p>
<p>One thing that my friend and i like is <strong>Xbox live arcade</strong> that provides <strong>variety of arcade games</strong> than PSN provides.</p>
<p><strong>In past Xbox 360 had a good line-up of exclusive games than Ps3 had.</strong> In 2007 Xbox had exclusive hit titles like <strong>Halo 3, BioShock and Mass Effect, </strong>whereas PS3 had titles like Uncharted, ratchet and clank future:tools of destruction. Many gamers said that PS3 didn&#8217;t have good varied exclusive titles. But <strong>2008 was the PS3&#8217;s years</strong> as they had the best game line up with titles like <strong>Metal Gear Solid 4, Resistance 2 and Litle Big Planet</strong> wheras 360 had a nice titles like Gears Of War 2. So varied of good games is no longer an issues for PS3 as it was in past.</p>
<p>Well this was my experience till now, but there is more to experience. There is so much tight competition between the consoles. Each console has their advantages and disadvantages. I enjoy both system.</p>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/my-experience-with-xbox-360-and-ps3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>List Of Good OpenGL and (ES) Books</title>
		<link>http://www.gaanza.com/blog/list-of-good-opengl-and-es-books/</link>
		<comments>http://www.gaanza.com/blog/list-of-good-opengl-and-es-books/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 07:26:11 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[OpenGL Books]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=236</guid>
		<description><![CDATA[These are the list of some popular books on OpenGl and (ES) preffered by many.
OpenGl SuperBible Fourth Edition
It begins by illuminating the core techniques of &#8220;classic&#8221; opengl programming, from drawing in space to geometric transformations, from lighting to texture mapping. The authors covers newer OpenGL capabilities, including OpenGL 2.1&#8217;s powerful programmable pipeline, vertex and fragment [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #000000;">These are the list of some popular books on OpenGl and (ES) preffered by many.</span></p>
<p><strong><span style="color: #000000;">OpenGl SuperBible Fourth Edition</span></strong></p>
<p><span style="color: #000000;">It begins by illuminating the core techniques of &#8220;classic&#8221; opengl programming, from drawing in space to geometric transformations, from lighting to texture mapping. The authors covers newer OpenGL capabilities, including OpenGL 2.1&#8217;s powerful programmable pipeline, vertex and fragment shaders, and advanced buffers. They also present thorough, up-to-date inroduction to opengl implementation on openl platforms, including windows,mac,linux and embedded systems.<br />
Cove</span><span style="color: #000000;">rage includes</span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">·         An entirely new chapter on </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> ES programming for handhelds</span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">·         Completely rewritten chapters on </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> for Mac OS X and GNU/Linux</span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">·         Up-to-the-minute coverage of </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> on Windows Vista</span></p>
<p style="font-size: 12px;"><span style="color: #000000;">·         New material on floating-point color buffers and off-screen rendering</span></p>
<p style="font-size: 12px;"><span style="color: #000000;">·         In-depth introductions to 3D modeling and object composition</span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">·         Expert techniques for utilizing </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;">&#8217;s programmable shading language</span></p>
<p style="font-size: 12px;"><span style="color: #000000;">·         Thorough coverage of curves, surfaces, interactive graphics, textures, shadows, and much more</span></p>
<p style="font-size: 12px;"><span style="color: #000000;">·         A fully updated API reference, and an all-new section of full-color images</span></p>
<p><strong><span style="color: #000000;"><img class="alignnone size-full wp-image-237" title="superbible" src="http://www.gaanza.com/wp-content/uploads/2009/09/superbible.jpg" alt="superbible" width="405" height="500" /></span></strong></p>
<p><strong><span style="color: #000000;">The OpenGl Programming Guide: The Official Guide to Learning OpenGl Version 2.1</span></strong></p>
<p><em><strong><span style="color: #000000;">The OpenGL</span><sup><span style="color: #000000;">®</span></sup><span style="color: #000000;"> Programming Guide, Sixth Edition,</span></strong></em><span style="color: #000000;"> provides definitive and comprehensive information on OpenGL and the OpenGL Utility Library. The previous edition covered OpenGL through Version 2.0. This sixth edition of the best-selling &#8220;red book&#8221; describes the latest features of OpenGL Version 2.1. You will find clear explanations of OpenGL functionality and many basic computer graphics techniques, such as building and rendering 3D models; interactively viewing objects from different perspective points; and using shading, lighting, and texturing effects for greater realism. In addition, this book provides in-depth coverage of advanced techniques, including texture mapping, antialiasing, fog and atmospheric effects, NURBS, image processing, and more. The text also explores other key topics such as enhancing performance, OpenGL extensions, and cross-platform techniques.</span></p>
<p><span style="color: #000000;">This sixth edition has been updated to include the newest features of OpenGL Version 2.1, including:</span></p>
<ul style="list-style-type: disc; margin-top: 1.12em; margin-right: 0px; margin-bottom: 1.12em; margin-left: 20px; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px;"><span style="color: #000000;">Using server-side pixel buffer objects for fast pixel rectangle download and retrieval</span></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px;"><span style="color: #000000;">Discussion of the sRGB texture format</span></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px;"><span style="color: #000000;">Expanded discussion of the OpenGL Shading Language</span></li>
</ul>
<p><span style="color: #000000;">This edition continues the discussion of the OpenGL Shading Language (GLSL) and explains the mechanics of using this language to create complex graphics effects and boost the computational power of OpenGL.</span></p>
<p><span style="color: #000000;">The OpenGL Technical Library provides tutorial and reference books for OpenGL. The Library enables programmers to gain a practical understanding of OpenGL and shows them how to unlock its full potential. Originally developed by SGI, the Library continues to evolve under the auspices of the OpenGL Architecture Review Board (ARB) Steering Group (now part of the Khronos Group), an industry consortium responsible for guiding the evolution of OpenGL and related technologies.</span></p>
<p><strong><span style="color: #000000;"><img class="alignnone size-full wp-image-238" title="redbook" src="http://www.gaanza.com/wp-content/uploads/2009/09/redbook.jpg" alt="redbook" width="381" height="500" /></span></strong></p>
<p><strong><span style="color: #000000;">OpenGL Shading Language 2nd Edition</span></strong></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;">® </span><span style="font-weight: bold;"><span style="color: #000000;">Shading</span></span><span style="color: #000000;"> </span><span style="font-weight: bold;"><span style="color: #000000;">Language</span></span><span style="color: #000000;">, Second Edition</span></span></span><span style="color: #000000;">, includes updated descriptions for the </span><span style="font-weight: bold;"><span style="color: #000000;">language</span></span><span style="color: #000000;"> and all the GLSL entry points added to </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> 2.0; new chapters that discuss lighting, shadows, and surface characteristics; and an under-the-hood look at the implementation of RealWorldz, the most ambitious GLSL application to date. The second edition also features 18 extensive new examples of shaders and their underlying algorithms, including</span></p>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Image-based lighting</span></p>
</li>
</ul>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Lighting with spherical harmonics</span></p>
</li>
</ul>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Ambient occlusion</span></p>
</li>
</ul>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Shadow mapping</span></p>
</li>
</ul>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Volume shadows using deferred lighting</span></p>
</li>
</ul>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Ward&#8217;s BRDF model</span></p>
</li>
</ul>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">The color plate section illustrates the power and sophistication of the </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> </span><span style="font-weight: bold;"><span style="color: #000000;">Shading</span></span><span style="color: #000000;"> </span><span style="font-weight: bold;"><span style="color: #000000;">Language</span></span><span style="color: #000000;">. The API Function Reference at the end of the book is an excellent guide to the API entry points that support the </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="font-weight: bold;"><span style="color: #000000;">Shading</span></span><span style="color: #000000;"> </span><span style="font-weight: bold;"><span style="color: #000000;">Language</span></span><span style="color: #000000;">. Also included is a convenient Quick Reference Card to GLSL.</span></p>
<p style="font-size: 12px;"><span style="color: #000000;"><img class="alignnone size-full wp-image-239" title="shading" src="http://www.gaanza.com/wp-content/uploads/2009/09/shading.jpg" alt="shading" width="379" height="500" /></span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;">
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><strong><span style="color: #000000;">OpenGL ES 2.0 Programming Guide</span></strong></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="color: #000000;">In the </span><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: #000000;">OpenGL® ES 2.0 Programming Guide</span></span></span><span style="color: #000000;">, three leading authorities on the Open GL ES 2.0 interface—including the specification&#8217;s editor—provide start-to-finish guidance for maximizing the interface&#8217;s value in a wide range of high-performance applications. The authors cover the entire API, including Khronos-ratified extensions. Using detailed C-based code examples, they demonstrate how to set up and program every aspect of the graphics pipeline. You&#8217;ll move from introductory techniques all the way to advanced per-pixel lighting, particle systems, and performance optimization.</span></p>
<p><span style="color: #000000;">Coverage includes:</span></p>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Shaders in depth: creating shader objects, compiling shaders, checking for compile errors, attaching shader objects to program objects, and linking final program objects</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">The OpenGL ES Shading Language: variables, types, constructors, structures, arrays, attributes, uniforms, varyings, precision qualifiers, and invariance</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Inputting geometry into the graphics pipeline, and assembling geometry into primitives</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Vertex shaders, their special variables, and their use in per-vertex lighting, skinning, and other applications</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Using fragment shaders—including examples of multitexturing, fog, alpha test, and user clip planes</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Fragment operations: scissor test, stencil test, depth test, multisampling, blending, and dithering</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Advanced rendering: per-pixel lighting with normal maps, environment mapping, particle systems, image post-processing, and projective texturing</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Real-world programming challenges: platform diversity, C++ portability, OpenKODE, and platform-specific shader binaries</span></p>
<p style="font-size: 12px;"><span style="color: #000000;"><img class="alignnone size-full wp-image-240" title="es2.0" src="http://www.gaanza.com/wp-content/uploads/2009/09/es2.0.jpg" alt="es2.0" width="381" height="500" /></span></p>
</li>
</ul>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;">
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><strong><span style="color: #000000;">OpenGL Distilled</span></strong></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="font-weight: bold;"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;">® </span><span style="font-weight: bold;"><span style="color: #000000;">Distilled</span></span></span></span><span style="color: #000000;"> provides the fundamental information you need to start programming 3D graphics, from setting up an </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> development environment to creating realistic textures and shadows. Written in an engaging, easy-to-follow style, this book makes it easy to find the information you&#8217;re looking for. You&#8217;ll quickly learn the essential and most-often-used features of </span><span style="font-weight: bold;"><span style="color: #000000;">OpenGL</span></span><span style="color: #000000;"> 2.0, along with the best coding practices and troubleshooting tips.</span></p>
<p style="font-size: 12px;"><span style="color: #000000;">Topics include</span></p>
<ul>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Drawing and rendering geometric data such as points, lines, and polygons</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Controlling color and lighting to create elegant graphics</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Creating and orienting views</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Increasing image realism with texture mapping and shadows</span></p>
</li>
<li>
<p style="font-size: 12px;"><span style="color: #000000;">Improving rendering performance</span></p>
</li>
<li>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;">
</li>
</ul>
<p style="font-size: 12px;"><span style="color: #000000;">Preserving graphics integrity across platforms</span></p>
<p style="font-size: 12px;"><span style="color: #000000;"><img class="alignnone size-full wp-image-241" title="distilled" src="http://www.gaanza.com/wp-content/uploads/2009/09/distilled.jpg" alt="distilled" width="378" height="500" /></span></p>
<p style="font-family: verdana, sans-serif; color: white; font-size: 12px;"><span style="font-weight: normal;"><strong><span style="color: #000000;">Gracias</span></strong> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/list-of-good-opengl-and-es-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List Of OpenGL Based Games</title>
		<link>http://www.gaanza.com/blog/list-of-opengl-based-games/</link>
		<comments>http://www.gaanza.com/blog/list-of-opengl-based-games/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 06:20:47 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[opengl games]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=218</guid>
		<description><![CDATA[These are the list of some top opengl based commercial games:
 Call Of Duty 1 
This game was developed by Infinity Ward and published by Activision. This game used the id tech 3 engine. Game is based on world war II. Its a first person shooter game. This game won the game of the year [...]]]></description>
			<content:encoded><![CDATA[<p><strong>These are the list of some top opengl based commercial games:</strong></p>
<p><strong> Call Of Duty 1 </strong></p>
<p>This game was developed by Infinity Ward and published by Activision. This game used the <strong>id tech 3 </strong>engine. Game is based on world war II. Its a first person shooter game. This game won the game of the year for 2003 from several reviewers.</p>
<p><img class="alignnone size-full wp-image-219" title="cod-1" src="http://www.gaanza.com/wp-content/uploads/2009/08/cod-1.jpg" alt="cod-1" width="550" height="550" /></p>
<p><strong>Commandos: Behind Enemy Lines</strong></p>
<p>Game was developed by Pyro studios and published by Eidos Interactive. Its a single player real time startegy game.</p>
<p><img class="alignnone size-full wp-image-220" title="commandos" src="http://www.gaanza.com/wp-content/uploads/2009/08/commandos.jpg" alt="commandos" width="390" height="500" /></p>
<p><strong>Doom 3</strong></p>
<p>Game was developed by id Software and published by Activision. The game uses <strong>id Tech 4</strong> engine. Its a first person shooter horror game. The Game was a critical and commercial success for id software with more than 3.5 millions copy sold.</p>
<p><img class="alignnone size-full wp-image-221" title="doom3" src="http://www.gaanza.com/wp-content/uploads/2009/08/doom3.jpg" alt="doom3" width="580" height="400" /></p>
<p><strong>Half-Life 1</strong></p>
<p>Game was developed by valve software and published by sierra studios. The game used modified version of Quake Engine called <strong>GoldSrc</strong> engine which is able to render in both <strong>OpenGl and Direct3D api</strong>. Its a First Person Shooter Game. On its release, critics hailed its overall presentation and numerous scripted sequences, and it won over 51 PC Game of the year awards. It is considered one of the greatest games of all time. This game also set the benchmark in the field off Game AI(Artificial Intellegence) at that period.</p>
<p><img class="alignnone size-full wp-image-222" title="half-life" src="http://www.gaanza.com/wp-content/uploads/2009/08/half-life.jpg" alt="half-life" width="400" height="500" /></p>
<p><strong>Hitman: Codename 47</strong></p>
<p>Game was developed by IO Interactive and published by eidos interactive. The game uses <strong>Glacier</strong> engine. Its a third person shooter game.</p>
<p><img class="alignnone size-full wp-image-223" title="Hitman1" src="http://www.gaanza.com/wp-content/uploads/2009/08/Hitman1.jpg" alt="Hitman1" width="600" height="500" /></p>
<p><strong>Unreal Tournament 2004</strong></p>
<p>Game was developed by Epic games. The game used Unreal Engine 2.5. Its a first person shooter game. Game received positive reviews on release. It also received multiplayer game of the year.</p>
<p><img class="alignnone size-full wp-image-224" title="unreal" src="http://www.gaanza.com/wp-content/uploads/2009/08/unreal.jpg" alt="unreal" width="558" height="500" /></p>
<p><strong>Return to Castle Wolfeinstein</strong></p>
<p>Game was developed by Gray Matter Interactive(Single Player) and Nerve Software(multiplayer) and published by Activision. Games usd <strong>id tech 3</strong> engine.</p>
<p><img class="alignnone size-full wp-image-225" title="castle" src="http://www.gaanza.com/wp-content/uploads/2009/08/castle.jpg" alt="castle" width="483" height="541" /></p>
<p><strong>PREY</strong></p>
<p>Game was developed by Human Head Studios and published by 2k Games and 3d realms. The game used modified version of <strong>id tech 4</strong> engine. Its a first person shooter game. It received positive reviews and was commercial success, sold more than 1 million copies.</p>
<p><img class="alignnone size-full wp-image-232" title="prey" src="http://www.gaanza.com/wp-content/uploads/2009/09/prey.jpg" alt="prey" width="505" height="507" /></p>
<p><strong>Soldier of Fortune (Series)</strong></p>
<p>First 2 game of the franchise was developed by Raven Software, published by Activision. The game used <strong>quake 2 and quake 3 engine</strong>.</p>
<p><strong><img class="alignnone size-full wp-image-233" title="soldier_of_fortune" src="http://www.gaanza.com/wp-content/uploads/2009/09/soldier_of_fortune.png" alt="soldier_of_fortune" width="600" height="400" /></strong></p>
<p>There are many other opengl based games. But these are one of my favorites.</p>
<p><strong>Gracias.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/list-of-opengl-based-games/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playstation 3 and Xbox 360 sales numbers</title>
		<link>http://www.gaanza.com/blog/ps3-and-xbox-360-sales-numbers/</link>
		<comments>http://www.gaanza.com/blog/ps3-and-xbox-360-sales-numbers/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 04:54:44 +0000</pubDate>
		<dc:creator>padam</dc:creator>
				<category><![CDATA[consoles]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[ps3 and xbox 360 sales]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://www.gaanza.com/blog/?p=205</guid>
		<description><![CDATA[
In year 2008, xbox 360 and playstation 3 were head to head fighting for the top spot. According to the gamer.blorge.com both consoles sold/shipped approximately 10.8 million for the entire year.
The PS3 had a best games line up in year 2008:
METAL GEAR SOLID 4

RESISTANCE 2

Better games line up was the PS3&#8217;s saving grace. According to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-213" title="consoles" src="http://www.gaanza.com/wp-content/uploads/2009/08/consoles1.png" alt="consoles" width="550" height="286" /></p>
<p>In year 2008, xbox 360 and playstation 3 were head to head fighting for the top spot. According to the <a href="http://gamer.blorge.com/" target="_blank">gamer.blorge.com</a> both consoles sold/shipped approximately 10.8 million for the entire year.</p>
<p><strong>The PS3 had a best games line up in year 2008:</strong></p>
<p><strong>METAL GEAR SOLID 4</strong></p>
<p><strong><img class="alignnone size-full wp-image-206" title="Metal_Gear_Solid_4_US_Box_Art" src="http://www.gaanza.com/wp-content/uploads/2009/08/Metal_Gear_Solid_4_US_Box_Art.jpg" alt="Metal_Gear_Solid_4_US_Box_Art" width="433" height="497" /></strong></p>
<p><strong>RESISTANCE 2</strong></p>
<p><strong><img class="alignnone size-full wp-image-207" title="1223352340-Resistance-2-PS3-01" src="http://www.gaanza.com/wp-content/uploads/2009/08/1223352340-Resistance-2-PS3-01.jpg" alt="1223352340-Resistance-2-PS3-01" width="400" height="515" /></strong></p>
<p><strong>Better games line up</strong> was the PS3&#8217;s saving grace. According to <a href="http://www.npd.com/corpServlet?nextpage=corp_welcome.html" target="_blank">NPD</a> <strong>PS3 sold more than doubled</strong> the sales of the XBOX 360 <strong>after the metal gear solid 4 was released.</strong></p>
<p><strong>The XBOX 360 also sold as many as the ps3</strong> because of the <strong>massive price cut</strong> near the end of the year. The XBOX 360 also had a good games like <strong>Gears Of War 2 :</strong></p>
<p><strong><img class="alignnone size-full wp-image-208" title="gears-of-war-2-coming-1" src="http://www.gaanza.com/wp-content/uploads/2009/08/gears-of-war-2-coming-1.jpg" alt="gears-of-war-2-coming-1" width="430" height="320" /></strong></p>
<p><strong>But the low price</strong> moved XBOX 360 head to head with PS3.</p>
<p>With PS3 and XBOX 360 getting sold same amount, the exclusive games: Gears of war 2 and metal gear solid 4 also sold around the same amount around 5 million.</p>
<p>So year 2009 will see the interesting race between xbox 360 and ps3 as ps3 is cutting their price.</p>
<p><strong>According to </strong><a href="http://nexgenwars.com/" target="_blank"><strong>nexgenwars.com</strong></a><strong> , they are showing the current sales number of consoles:</strong></p>
<p><img class="alignnone size-full wp-image-209" title="console_sales" src="http://www.gaanza.com/wp-content/uploads/2009/08/console_sales.png" alt="console_sales" width="517" height="259" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaanza.com/blog/ps3-and-xbox-360-sales-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
