<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 2D Sprite Animation in Android</title>
	<atom:link href="http://www.droidnova.com/2d-sprite-animation-in-android,471.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html</link>
	<description>Rapid android development from Berlin</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:34:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jose</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1338</link>
		<dc:creator>Jose</dc:creator>
		<pubDate>Mon, 30 Aug 2010 13:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1338</guid>
		<description>Thanks Timothy ! This worked perfectly for me ! Wow</description>
		<content:encoded><![CDATA[<p>Thanks Timothy ! This worked perfectly for me ! Wow</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Miller</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1316</link>
		<dc:creator>Timothy Miller</dc:creator>
		<pubDate>Thu, 19 Aug 2010 17:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1316</guid>
		<description>ok, I used codemonkey&#039;s, Stephen&#039;s, and Nico&#039;s code and I made a class with everything you need to get this to work properly. Here it is, just copy and paste :)

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class main extends Activity {
public AnimationSprite testSprite1;
public AnimationSprite testSprite2;
public AnimationSprite testSprite3;
public long GameTime;

public class MySurfaceThread extends Thread {
private SurfaceHolder myThreadSurfaceHolder;
private MySurfaceView myThreadSurfaceView;
private boolean myThreadRun = false;
public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {
myThreadSurfaceHolder = surfaceHolder;
myThreadSurfaceView = surfaceView;
}
public void setRunning(boolean b) {
myThreadRun = b;
}
@Override
public void run() {
while (myThreadRun) {
Canvas c = null;
try {
GameTime = System.currentTimeMillis();
c = myThreadSurfaceHolder.lockCanvas(null);
synchronized (myThreadSurfaceHolder) {
myThreadSurfaceView.onDraw(c);
}
}
finally {
if (c != null) {
myThreadSurfaceHolder.unlockCanvasAndPost(c);
}
}
}
}
}


public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{
private MySurfaceThread thread;
@Override
protected void onDraw(Canvas canvas){
canvas.drawColor(Color.BLACK);
testSprite1.Update(GameTime);
testSprite2.Update(GameTime);
testSprite3.Update(GameTime);
testSprite1.draw(canvas);
testSprite2.draw(canvas);
testSprite3.draw(canvas);
}
public MySurfaceView(Context context){
super(context);
init();
}
private void init(){
getHolder().addCallback(this);
thread = new MySurfaceThread(getHolder(), this);
//create a graphic
testSprite1 = new AnimationSprite();
testSprite2 = new AnimationSprite();
testSprite3 = new AnimationSprite();
testSprite1.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);
testSprite2.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);
testSprite3.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);
}
@Override
public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
}
@Override
public void surfaceCreated(SurfaceHolder holder){
thread.setRunning(true);
thread.start();
}
@Override
public void surfaceDestroyed(SurfaceHolder holder){
boolean retry = true;
thread.setRunning(false);
while (retry){
try{
thread.join();
retry = false;
}
catch (InterruptedException e){}
}
}
}


public class AnimationSprite {
	 
    private Bitmap mAnimation;
    private int mXPos;
    private int mYPos;
    private Rect mSRectangle;
    private int mFPS;
    private int mNoOfFrames;
    private int mCurrentFrame;
    private long mFrameTimer;
    private int mSpriteHeight;
    private int mSpriteWidth;
 
    public AnimationSprite() {
        mSRectangle = new Rect(0,0,0,0);
        mFrameTimer =0;
        mCurrentFrame =0;
        mXPos = 80;
        mYPos = 200;
    }
 
    public void init(Bitmap theBitmap, int Height, int Width, int theFPS, int theFrameCount) {
        mAnimation = theBitmap;
        mSpriteHeight = Height;
        mSpriteWidth = Width;
        mSRectangle.top = 0;
        mSRectangle.bottom = mSpriteHeight;
        mSRectangle.left = 0;
        mSRectangle.right = mSpriteWidth;
        mFPS = 1000 /theFPS;
        mNoOfFrames = theFrameCount;
    }
 
    public void Update(long GameTime) {
        if(GameTime &gt; mFrameTimer + mFPS ) {
            mFrameTimer = GameTime;
            mCurrentFrame +=1;
 
            if(mCurrentFrame &gt;= mNoOfFrames) {
                mCurrentFrame = 0;
            }
        }
 
        mSRectangle.left = mCurrentFrame * mSpriteWidth;
        mSRectangle.right = mSRectangle.left + mSpriteWidth;
    }
 
    public void draw(Canvas canvas) {
        Rect dest = new Rect(getXPos(), getYPos(), getXPos() + mSpriteWidth,
                        getYPos() + mSpriteHeight);
 
        canvas.drawBitmap(mAnimation, mSRectangle, dest, null);
    }
 
    public int getYPos()
    {
    	return mYPos;
    }
    public int getXPos()
    {
    	return mXPos;
    }
}

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(new MySurfaceView(this));
}
}</description>
		<content:encoded><![CDATA[<p>ok, I used codemonkey&#8217;s, Stephen&#8217;s, and Nico&#8217;s code and I made a class with everything you need to get this to work properly. Here it is, just copy and paste <img src='http://www.droidnova.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>import android.app.Activity;<br />
import android.content.Context;<br />
import android.graphics.Bitmap;<br />
import android.graphics.BitmapFactory;<br />
import android.graphics.Canvas;<br />
import android.graphics.Color;<br />
import android.graphics.Rect;<br />
import android.os.Bundle;<br />
import android.view.SurfaceHolder;<br />
import android.view.SurfaceView;</p>
<p>public class main extends Activity {<br />
public AnimationSprite testSprite1;<br />
public AnimationSprite testSprite2;<br />
public AnimationSprite testSprite3;<br />
public long GameTime;</p>
<p>public class MySurfaceThread extends Thread {<br />
private SurfaceHolder myThreadSurfaceHolder;<br />
private MySurfaceView myThreadSurfaceView;<br />
private boolean myThreadRun = false;<br />
public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {<br />
myThreadSurfaceHolder = surfaceHolder;<br />
myThreadSurfaceView = surfaceView;<br />
}<br />
public void setRunning(boolean b) {<br />
myThreadRun = b;<br />
}<br />
@Override<br />
public void run() {<br />
while (myThreadRun) {<br />
Canvas c = null;<br />
try {<br />
GameTime = System.currentTimeMillis();<br />
c = myThreadSurfaceHolder.lockCanvas(null);<br />
synchronized (myThreadSurfaceHolder) {<br />
myThreadSurfaceView.onDraw(c);<br />
}<br />
}<br />
finally {<br />
if (c != null) {<br />
myThreadSurfaceHolder.unlockCanvasAndPost(c);<br />
}<br />
}<br />
}<br />
}<br />
}</p>
<p>public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{<br />
private MySurfaceThread thread;<br />
@Override<br />
protected void onDraw(Canvas canvas){<br />
canvas.drawColor(Color.BLACK);<br />
testSprite1.Update(GameTime);<br />
testSprite2.Update(GameTime);<br />
testSprite3.Update(GameTime);<br />
testSprite1.draw(canvas);<br />
testSprite2.draw(canvas);<br />
testSprite3.draw(canvas);<br />
}<br />
public MySurfaceView(Context context){<br />
super(context);<br />
init();<br />
}<br />
private void init(){<br />
getHolder().addCallback(this);<br />
thread = new MySurfaceThread(getHolder(), this);<br />
//create a graphic<br />
testSprite1 = new AnimationSprite();<br />
testSprite2 = new AnimationSprite();<br />
testSprite3 = new AnimationSprite();<br />
testSprite1.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);<br />
testSprite2.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);<br />
testSprite3.init(BitmapFactory.decodeResource(getResources(), R.drawable.testa), 100, 40, 8, 5);<br />
}<br />
@Override<br />
public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {<br />
}<br />
@Override<br />
public void surfaceCreated(SurfaceHolder holder){<br />
thread.setRunning(true);<br />
thread.start();<br />
}<br />
@Override<br />
public void surfaceDestroyed(SurfaceHolder holder){<br />
boolean retry = true;<br />
thread.setRunning(false);<br />
while (retry){<br />
try{<br />
thread.join();<br />
retry = false;<br />
}<br />
catch (InterruptedException e){}<br />
}<br />
}<br />
}</p>
<p>public class AnimationSprite {</p>
<p>    private Bitmap mAnimation;<br />
    private int mXPos;<br />
    private int mYPos;<br />
    private Rect mSRectangle;<br />
    private int mFPS;<br />
    private int mNoOfFrames;<br />
    private int mCurrentFrame;<br />
    private long mFrameTimer;<br />
    private int mSpriteHeight;<br />
    private int mSpriteWidth;</p>
<p>    public AnimationSprite() {<br />
        mSRectangle = new Rect(0,0,0,0);<br />
        mFrameTimer =0;<br />
        mCurrentFrame =0;<br />
        mXPos = 80;<br />
        mYPos = 200;<br />
    }</p>
<p>    public void init(Bitmap theBitmap, int Height, int Width, int theFPS, int theFrameCount) {<br />
        mAnimation = theBitmap;<br />
        mSpriteHeight = Height;<br />
        mSpriteWidth = Width;<br />
        mSRectangle.top = 0;<br />
        mSRectangle.bottom = mSpriteHeight;<br />
        mSRectangle.left = 0;<br />
        mSRectangle.right = mSpriteWidth;<br />
        mFPS = 1000 /theFPS;<br />
        mNoOfFrames = theFrameCount;<br />
    }</p>
<p>    public void Update(long GameTime) {<br />
        if(GameTime &gt; mFrameTimer + mFPS ) {<br />
            mFrameTimer = GameTime;<br />
            mCurrentFrame +=1;</p>
<p>            if(mCurrentFrame &gt;= mNoOfFrames) {<br />
                mCurrentFrame = 0;<br />
            }<br />
        }</p>
<p>        mSRectangle.left = mCurrentFrame * mSpriteWidth;<br />
        mSRectangle.right = mSRectangle.left + mSpriteWidth;<br />
    }</p>
<p>    public void draw(Canvas canvas) {<br />
        Rect dest = new Rect(getXPos(), getYPos(), getXPos() + mSpriteWidth,<br />
                        getYPos() + mSpriteHeight);</p>
<p>        canvas.drawBitmap(mAnimation, mSRectangle, dest, null);<br />
    }</p>
<p>    public int getYPos()<br />
    {<br />
    	return mYPos;<br />
    }<br />
    public int getXPos()<br />
    {<br />
    	return mXPos;<br />
    }<br />
}</p>
<p>/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle savedInstanceState){<br />
super.onCreate(savedInstanceState);<br />
setContentView(new MySurfaceView(this));<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Miller</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1315</link>
		<dc:creator>Timothy Miller</dc:creator>
		<pubDate>Thu, 19 Aug 2010 04:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1315</guid>
		<description>First of all, thank you Stephen for the great sample code.

Second, so what I&#039;m confused about is how you can make an object of your class as seen in Animation = new OurAnimatedSpriteClass();
Animation.Initalise(Bitmap.decodeResource(res, R.drawable.idle), 200, 150, 5, 5);

while you are drawing to a custom view so the constructor requires context. Is there some way to overload the constructor do you even NEED to go through the constructor? Is there something I&#039;m missing here?

Also, can someone explain the &quot;run&quot; method to me?</description>
		<content:encoded><![CDATA[<p>First of all, thank you Stephen for the great sample code.</p>
<p>Second, so what I&#8217;m confused about is how you can make an object of your class as seen in Animation = new OurAnimatedSpriteClass();<br />
Animation.Initalise(Bitmap.decodeResource(res, R.drawable.idle), 200, 150, 5, 5);</p>
<p>while you are drawing to a custom view so the constructor requires context. Is there some way to overload the constructor do you even NEED to go through the constructor? Is there something I&#8217;m missing here?</p>
<p>Also, can someone explain the &#8220;run&#8221; method to me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1293</link>
		<dc:creator>Jose</dc:creator>
		<pubDate>Sat, 07 Aug 2010 21:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1293</guid>
		<description>Hi there! I have been testing this code in my game, but I have found an issue. 

I am trying to draw a 4x1 tiles image (128x32 pixels), but the tiles are not being well showed separatelly. I use: animation.init(quads, 32, 32, 1, 4); 

My problem is that when I ask what is the quads image height, Android sais its 21 and no 32. Where is my problem? 

I hope everybody can understand my englilsh, Im not a native speaker. 

Thanks for all we are learning from yours posts! 
Greetings from Spain.</description>
		<content:encoded><![CDATA[<p>Hi there! I have been testing this code in my game, but I have found an issue. </p>
<p>I am trying to draw a 4&#215;1 tiles image (128&#215;32 pixels), but the tiles are not being well showed separatelly. I use: animation.init(quads, 32, 32, 1, 4); </p>
<p>My problem is that when I ask what is the quads image height, Android sais its 21 and no 32. Where is my problem? </p>
<p>I hope everybody can understand my englilsh, Im not a native speaker. </p>
<p>Thanks for all we are learning from yours posts!<br />
Greetings from Spain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nico</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1245</link>
		<dc:creator>Nico</dc:creator>
		<pubDate>Thu, 22 Jul 2010 18:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1245</guid>
		<description>So for anyone else having trouble, copy paste that, should help to figure out what goes where and why and all that...aside from that, you need the animation class that you can easily create using the tutorial provided by Stephen :) Best of luck to programmers learning Android!</description>
		<content:encoded><![CDATA[<p>So for anyone else having trouble, copy paste that, should help to figure out what goes where and why and all that&#8230;aside from that, you need the animation class that you can easily create using the tutorial provided by Stephen <img src='http://www.droidnova.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Best of luck to programmers learning Android!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nico</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1244</link>
		<dc:creator>Nico</dc:creator>
		<pubDate>Thu, 22 Jul 2010 18:42:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1244</guid>
		<description>I&#039;ve also been having trouble learning how to get sprites to work properly but with a lot of help from this tutorial and CodeMonkey&#039;s post I managed to get it to work nicely. So just so the credit goes to the right people, Stephen and CodeMonkey helped hugely with this...


package practice.animation;

import android.app.Activity;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class AnimationMain extends Activity {
	public AnimationSprite testSprite1;
	public AnimationSprite testSprite2;
	public AnimationSprite testSprite3;
	public long GameTime;

	public class MySurfaceThread extends Thread {
		private SurfaceHolder myThreadSurfaceHolder;
		private MySurfaceView myThreadSurfaceView;
		private boolean myThreadRun = false;
		
		public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {
			myThreadSurfaceHolder = surfaceHolder;
			myThreadSurfaceView = surfaceView;
		}
		public void setRunning(boolean b) {
			myThreadRun = b;
		}
		@Override
		public void run() {
			while (myThreadRun) {
				Canvas c = null;
				try {
					GameTime = System.currentTimeMillis();
					c = myThreadSurfaceHolder.lockCanvas(null);
					synchronized (myThreadSurfaceHolder) {
						myThreadSurfaceView.onDraw(c);
					}
				} 
				finally {
					if (c != null) {
						myThreadSurfaceHolder.unlockCanvasAndPost(c);
					}
				}
			}
		}
	}
	public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{
		private MySurfaceThread thread;
		@Override
		protected void onDraw(Canvas canvas){
			canvas.drawColor(Color.BLACK);
			testSprite1.Update(GameTime);
			testSprite2.Update(GameTime);
			testSprite3.Update(GameTime);
			
			testSprite1.draw(canvas);
			testSprite2.draw(canvas);
			testSprite3.draw(canvas);
		}
		public MySurfaceView(Context context){
			super(context);
			init();
		}
		private void init(){
			getHolder().addCallback(this);
			thread = new MySurfaceThread(getHolder(), this);
			//create a graphic
			testSprite1 = new AnimationSprite(80, 200);
			testSprite2 = new AnimationSprite(130, 200);
			testSprite3 = new AnimationSprite(180, 200);
			
			testSprite1.init(BitmapFactory.decodeResource(getResources(),    R.drawable.arrowsprite), 100, 40, 8, 5);
			testSprite2.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrowsprite), 100, 40, 8, 5);
			testSprite3.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrowsprite), 100, 40, 8, 5);
		}
		@Override
		public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
		}
		@Override
		public void surfaceCreated(SurfaceHolder holder){
			thread.setRunning(true);
			thread.start();
		}
		@Override
		public void surfaceDestroyed(SurfaceHolder holder){
			boolean retry = true;
			thread.setRunning(false);
			while (retry){
				try{
					thread.join();
					retry = false;
				}
				catch (InterruptedException e){}
			}
		}
	}
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(new MySurfaceView(this));
	}
}</description>
		<content:encoded><![CDATA[<p>I&#8217;ve also been having trouble learning how to get sprites to work properly but with a lot of help from this tutorial and CodeMonkey&#8217;s post I managed to get it to work nicely. So just so the credit goes to the right people, Stephen and CodeMonkey helped hugely with this&#8230;</p>
<p>package practice.animation;</p>
<p>import android.app.Activity;<br />
import android.content.Context;<br />
import android.graphics.BitmapFactory;<br />
import android.graphics.Canvas;<br />
import android.graphics.Color;<br />
import android.os.Bundle;<br />
import android.view.SurfaceHolder;<br />
import android.view.SurfaceView;</p>
<p>public class AnimationMain extends Activity {<br />
	public AnimationSprite testSprite1;<br />
	public AnimationSprite testSprite2;<br />
	public AnimationSprite testSprite3;<br />
	public long GameTime;</p>
<p>	public class MySurfaceThread extends Thread {<br />
		private SurfaceHolder myThreadSurfaceHolder;<br />
		private MySurfaceView myThreadSurfaceView;<br />
		private boolean myThreadRun = false;</p>
<p>		public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {<br />
			myThreadSurfaceHolder = surfaceHolder;<br />
			myThreadSurfaceView = surfaceView;<br />
		}<br />
		public void setRunning(boolean b) {<br />
			myThreadRun = b;<br />
		}<br />
		@Override<br />
		public void run() {<br />
			while (myThreadRun) {<br />
				Canvas c = null;<br />
				try {<br />
					GameTime = System.currentTimeMillis();<br />
					c = myThreadSurfaceHolder.lockCanvas(null);<br />
					synchronized (myThreadSurfaceHolder) {<br />
						myThreadSurfaceView.onDraw(c);<br />
					}<br />
				}<br />
				finally {<br />
					if (c != null) {<br />
						myThreadSurfaceHolder.unlockCanvasAndPost(c);<br />
					}<br />
				}<br />
			}<br />
		}<br />
	}<br />
	public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{<br />
		private MySurfaceThread thread;<br />
		@Override<br />
		protected void onDraw(Canvas canvas){<br />
			canvas.drawColor(Color.BLACK);<br />
			testSprite1.Update(GameTime);<br />
			testSprite2.Update(GameTime);<br />
			testSprite3.Update(GameTime);</p>
<p>			testSprite1.draw(canvas);<br />
			testSprite2.draw(canvas);<br />
			testSprite3.draw(canvas);<br />
		}<br />
		public MySurfaceView(Context context){<br />
			super(context);<br />
			init();<br />
		}<br />
		private void init(){<br />
			getHolder().addCallback(this);<br />
			thread = new MySurfaceThread(getHolder(), this);<br />
			//create a graphic<br />
			testSprite1 = new AnimationSprite(80, 200);<br />
			testSprite2 = new AnimationSprite(130, 200);<br />
			testSprite3 = new AnimationSprite(180, 200);</p>
<p>			testSprite1.init(BitmapFactory.decodeResource(getResources(),    R.drawable.arrowsprite), 100, 40, 8, 5);<br />
			testSprite2.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrowsprite), 100, 40, 8, 5);<br />
			testSprite3.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrowsprite), 100, 40, 8, 5);<br />
		}<br />
		@Override<br />
		public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {<br />
		}<br />
		@Override<br />
		public void surfaceCreated(SurfaceHolder holder){<br />
			thread.setRunning(true);<br />
			thread.start();<br />
		}<br />
		@Override<br />
		public void surfaceDestroyed(SurfaceHolder holder){<br />
			boolean retry = true;<br />
			thread.setRunning(false);<br />
			while (retry){<br />
				try{<br />
					thread.join();<br />
					retry = false;<br />
				}<br />
				catch (InterruptedException e){}<br />
			}<br />
		}<br />
	}<br />
	/** Called when the activity is first created. */<br />
	@Override<br />
	public void onCreate(Bundle savedInstanceState){<br />
		super.onCreate(savedInstanceState);<br />
		setContentView(new MySurfaceView(this));<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeMonkey</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1156</link>
		<dc:creator>CodeMonkey</dc:creator>
		<pubDate>Wed, 16 Jun 2010 08:09:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1156</guid>
		<description>This is the closest I have been able to get to actually making this thing work:

package test.viewtest;

import android.app.Activity;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class main extends Activity {

private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
private float initX, initY, radius;
private boolean drawing = false;
public Sprite2D testSprite;
public long GameTime;

 public class MySurfaceThread extends Thread {

  private SurfaceHolder myThreadSurfaceHolder;
  private MySurfaceView myThreadSurfaceView;
  private boolean myThreadRun = false;

  public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {
   myThreadSurfaceHolder = surfaceHolder;
   myThreadSurfaceView = surfaceView;
     }

  public void setRunning(boolean b) {
   myThreadRun = b;
  }

@Override
public void run() {
// TODO Auto-generated method stub
//super.run();
while (myThreadRun) {
             Canvas c = null;
             try {
                 GameTime = System.currentTimeMillis();
                 c = myThreadSurfaceHolder.lockCanvas(null);
                 synchronized (myThreadSurfaceHolder) {
                     myThreadSurfaceView.onDraw(c);
                 }
             } finally {
                 // do this in a finally so that if an exception is thrown
                 // during the above, we don&#039;t leave the Surface in an
                 // inconsistent state
                 if (c != null) {
                  myThreadSurfaceHolder.unlockCanvasAndPost(c);
                 }
             }
         }
}
}
 /*
  * 
  * SURFACE VIEW
  * 
  * 
  */

public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{

private MySurfaceThread thread;

	@Override
	protected void onDraw(Canvas canvas) 
	{
		testSprite.update(GameTime);
	    testSprite.draw(canvas);
	    
		if(drawing)
		{		
		    //canvas.drawCircle(initX, initY, radius, paint);
		}
	}

	public MySurfaceView(Context context) 
	{
		super(context);
		// TODO Auto-generated constructor stub
		init();
	}
	
	public MySurfaceView(Context context, AttributeSet attrs) 
	{
		super(context, attrs);
		// TODO Auto-generated constructor stub
		init();
	}

	public MySurfaceView(Context context, AttributeSet attrs, int defStyle) 
	{
		super(context, attrs, defStyle);
		// TODO Auto-generated constructor stub
		init();
	}
	
	private void init()
	{
		getHolder().addCallback(this);
		thread = new MySurfaceThread(getHolder(), this);
	
		setFocusable(true); // make sure we get key events
		
		//create a graphic
		testSprite = new Sprite2D();
		testSprite.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrow), 200, 150, 5, 5);

	}

	@Override
	public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2,
	 int arg3) {
	// TODO Auto-generated method stub
	}

	@Override
	public void surfaceCreated(SurfaceHolder holder) 
	{
		// TODO Auto-generated method stub
		thread.setRunning(true);
		thread.start();
	}
	
	@Override
	public void surfaceDestroyed(SurfaceHolder holder) 
	{
		// TODO Auto-generated method stub
		boolean retry = true;
		thread.setRunning(false);
		
		while (retry) {
			 try 
			 {
				 thread.join();
				 retry = false;
			 } 
			 catch (InterruptedException e) 
			 {
			 }
		   }
		}
	}

	/** Called when the activity is first created. */
	 @Override
	 public void onCreate(Bundle savedInstanceState) 
	 {
	     super.onCreate(savedInstanceState);
	     //setContentView(R.layout.main);
	  
	     MySurfaceView mySurfaceView = new MySurfaceView(this);
	     setContentView(mySurfaceView);
	 }
}</description>
		<content:encoded><![CDATA[<p>This is the closest I have been able to get to actually making this thing work:</p>
<p>package test.viewtest;</p>
<p>import android.app.Activity;<br />
import android.content.Context;<br />
import android.graphics.BitmapFactory;<br />
import android.graphics.Canvas;<br />
import android.graphics.Color;<br />
import android.graphics.Paint;<br />
import android.os.Bundle;<br />
import android.util.AttributeSet;<br />
import android.view.MotionEvent;<br />
import android.view.SurfaceHolder;<br />
import android.view.SurfaceView;</p>
<p>public class main extends Activity {</p>
<p>private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);<br />
private float initX, initY, radius;<br />
private boolean drawing = false;<br />
public Sprite2D testSprite;<br />
public long GameTime;</p>
<p> public class MySurfaceThread extends Thread {</p>
<p>  private SurfaceHolder myThreadSurfaceHolder;<br />
  private MySurfaceView myThreadSurfaceView;<br />
  private boolean myThreadRun = false;</p>
<p>  public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView surfaceView) {<br />
   myThreadSurfaceHolder = surfaceHolder;<br />
   myThreadSurfaceView = surfaceView;<br />
     }</p>
<p>  public void setRunning(boolean b) {<br />
   myThreadRun = b;<br />
  }</p>
<p>@Override<br />
public void run() {<br />
// TODO Auto-generated method stub<br />
//super.run();<br />
while (myThreadRun) {<br />
             Canvas c = null;<br />
             try {<br />
                 GameTime = System.currentTimeMillis();<br />
                 c = myThreadSurfaceHolder.lockCanvas(null);<br />
                 synchronized (myThreadSurfaceHolder) {<br />
                     myThreadSurfaceView.onDraw(c);<br />
                 }<br />
             } finally {<br />
                 // do this in a finally so that if an exception is thrown<br />
                 // during the above, we don&#8217;t leave the Surface in an<br />
                 // inconsistent state<br />
                 if (c != null) {<br />
                  myThreadSurfaceHolder.unlockCanvasAndPost(c);<br />
                 }<br />
             }<br />
         }<br />
}<br />
}<br />
 /*<br />
  *<br />
  * SURFACE VIEW<br />
  *<br />
  *<br />
  */</p>
<p>public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{</p>
<p>private MySurfaceThread thread;</p>
<p>	@Override<br />
	protected void onDraw(Canvas canvas)<br />
	{<br />
		testSprite.update(GameTime);<br />
	    testSprite.draw(canvas);</p>
<p>		if(drawing)<br />
		{<br />
		    //canvas.drawCircle(initX, initY, radius, paint);<br />
		}<br />
	}</p>
<p>	public MySurfaceView(Context context)<br />
	{<br />
		super(context);<br />
		// TODO Auto-generated constructor stub<br />
		init();<br />
	}</p>
<p>	public MySurfaceView(Context context, AttributeSet attrs)<br />
	{<br />
		super(context, attrs);<br />
		// TODO Auto-generated constructor stub<br />
		init();<br />
	}</p>
<p>	public MySurfaceView(Context context, AttributeSet attrs, int defStyle)<br />
	{<br />
		super(context, attrs, defStyle);<br />
		// TODO Auto-generated constructor stub<br />
		init();<br />
	}</p>
<p>	private void init()<br />
	{<br />
		getHolder().addCallback(this);<br />
		thread = new MySurfaceThread(getHolder(), this);</p>
<p>		setFocusable(true); // make sure we get key events</p>
<p>		//create a graphic<br />
		testSprite = new Sprite2D();<br />
		testSprite.init(BitmapFactory.decodeResource(getResources(), R.drawable.arrow), 200, 150, 5, 5);</p>
<p>	}</p>
<p>	@Override<br />
	public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2,<br />
	 int arg3) {<br />
	// TODO Auto-generated method stub<br />
	}</p>
<p>	@Override<br />
	public void surfaceCreated(SurfaceHolder holder)<br />
	{<br />
		// TODO Auto-generated method stub<br />
		thread.setRunning(true);<br />
		thread.start();<br />
	}</p>
<p>	@Override<br />
	public void surfaceDestroyed(SurfaceHolder holder)<br />
	{<br />
		// TODO Auto-generated method stub<br />
		boolean retry = true;<br />
		thread.setRunning(false);</p>
<p>		while (retry) {<br />
			 try<br />
			 {<br />
				 thread.join();<br />
				 retry = false;<br />
			 }<br />
			 catch (InterruptedException e)<br />
			 {<br />
			 }<br />
		   }<br />
		}<br />
	}</p>
<p>	/** Called when the activity is first created. */<br />
	 @Override<br />
	 public void onCreate(Bundle savedInstanceState)<br />
	 {<br />
	     super.onCreate(savedInstanceState);<br />
	     //setContentView(R.layout.main);</p>
<p>	     MySurfaceView mySurfaceView = new MySurfaceView(this);<br />
	     setContentView(mySurfaceView);<br />
	 }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeMonkey</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1154</link>
		<dc:creator>CodeMonkey</dc:creator>
		<pubDate>Tue, 15 Jun 2010 03:22:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1154</guid>
		<description>I am going to try to write this all out for beginners:

Here is the class for the sprite. I have called it &quot;Sprite2D&quot;

&lt;pre lang=&quot;java&quot; line=&quot;1&quot;&gt;package com.game.engine;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;

public class Sprite2D {
	
    private Bitmap mAnimation;
    private int mXPos;
    private int mYPos;
    private Rect mSRectangle;
    private int mFPS;
    private int mNoOfFrames;
    private int mCurrentFrame;
    private long mFrameTimer;
    private int mSpriteHeight;
    private int mSpriteWidth;
    
    public Sprite2D() {
        mSRectangle = new Rect(0,0,0,0);
        mFrameTimer =0;
        mCurrentFrame =0;
        mXPos = 80;
        mYPos = 200;
    }
    
    public void init(Bitmap theBitmap, int Height, int Width, int theFPS, int theFrameCount) {
        mAnimation = theBitmap;
        mSpriteHeight = Height;
        mSpriteWidth = Width;
        mSRectangle.top = 0;
        mSRectangle.bottom = mSpriteHeight;
        mSRectangle.left = 0;
        mSRectangle.right = mSpriteWidth;
        mFPS = 1000 /theFPS;
        mNoOfFrames = theFrameCount;
    }
    
    public void Update(long GameTime) {
        if(GameTime &gt; mFrameTimer + mFPS ) {
            mFrameTimer = GameTime;
            mCurrentFrame +=1;
     
            if(mCurrentFrame &gt;= mNoOfFrames) {
                mCurrentFrame = 0;
            }
        }
     
        mSRectangle.left = mCurrentFrame * mSpriteWidth;
        mSRectangle.right = mSRectangle.left + mSpriteWidth;
    }
    
    public void draw(Canvas canvas) {
        Rect dest = new Rect(getXPos(), getYPos(), getXPos() + mSpriteWidth,
                        getYPos() + mSpriteHeight);
     
        canvas.drawBitmap(mAnimation, mSRectangle, dest, null);
    }
    
    public int getYPos()
    {
    	return mYPos;
    }
    public int getXPos()
    {
    	return mXPos;
    }
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I am going to try to write this all out for beginners:</p>
<p>Here is the class for the sprite. I have called it &#8220;Sprite2D&#8221;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">com.game.engine</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.graphics.Bitmap</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.graphics.Canvas</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.graphics.Rect</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Sprite2D <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> Bitmap mAnimation<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mXPos<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mYPos<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Rect mSRectangle<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mFPS<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mNoOfFrames<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mCurrentFrame<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">long</span> mFrameTimer<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mSpriteHeight<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> mSpriteWidth<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> Sprite2D<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        mSRectangle <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Rect<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        mFrameTimer <span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        mCurrentFrame <span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        mXPos <span style="color: #339933;">=</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">;</span>
        mYPos <span style="color: #339933;">=</span> <span style="color: #cc66cc;">200</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> init<span style="color: #009900;">&#40;</span>Bitmap theBitmap, <span style="color: #000066; font-weight: bold;">int</span> Height, <span style="color: #000066; font-weight: bold;">int</span> Width, <span style="color: #000066; font-weight: bold;">int</span> theFPS, <span style="color: #000066; font-weight: bold;">int</span> theFrameCount<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        mAnimation <span style="color: #339933;">=</span> theBitmap<span style="color: #339933;">;</span>
        mSpriteHeight <span style="color: #339933;">=</span> Height<span style="color: #339933;">;</span>
        mSpriteWidth <span style="color: #339933;">=</span> Width<span style="color: #339933;">;</span>
        mSRectangle.<span style="color: #006633;">top</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        mSRectangle.<span style="color: #006633;">bottom</span> <span style="color: #339933;">=</span> mSpriteHeight<span style="color: #339933;">;</span>
        mSRectangle.<span style="color: #006633;">left</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        mSRectangle.<span style="color: #006633;">right</span> <span style="color: #339933;">=</span> mSpriteWidth<span style="color: #339933;">;</span>
        mFPS <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1000</span> <span style="color: #339933;">/</span>theFPS<span style="color: #339933;">;</span>
        mNoOfFrames <span style="color: #339933;">=</span> theFrameCount<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> Update<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">long</span> GameTime<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>GameTime <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> mFrameTimer <span style="color: #339933;">+</span> mFPS <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            mFrameTimer <span style="color: #339933;">=</span> GameTime<span style="color: #339933;">;</span>
            mCurrentFrame <span style="color: #339933;">+=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>mCurrentFrame <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;=</span> mNoOfFrames<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                mCurrentFrame <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        mSRectangle.<span style="color: #006633;">left</span> <span style="color: #339933;">=</span> mCurrentFrame <span style="color: #339933;">*</span> mSpriteWidth<span style="color: #339933;">;</span>
        mSRectangle.<span style="color: #006633;">right</span> <span style="color: #339933;">=</span> mSRectangle.<span style="color: #006633;">left</span> <span style="color: #339933;">+</span> mSpriteWidth<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #003399;">Canvas</span> canvas<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        Rect dest <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Rect<span style="color: #009900;">&#40;</span>getXPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, getYPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, getXPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> mSpriteWidth,
                        getYPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> mSpriteHeight<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        canvas.<span style="color: #006633;">drawBitmap</span><span style="color: #009900;">&#40;</span>mAnimation, mSRectangle, dest, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> getYPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #000000; font-weight: bold;">return</span> mYPos<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> getXPos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #000000; font-weight: bold;">return</span> mXPos<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: quiche</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1130</link>
		<dc:creator>quiche</dc:creator>
		<pubDate>Tue, 01 Jun 2010 22:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1130</guid>
		<description>I am having a lot of trouble getting this to work.  Could you by any chance email or post a sample source code that I could study?</description>
		<content:encoded><![CDATA[<p>I am having a lot of trouble getting this to work.  Could you by any chance email or post a sample source code that I could study?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.droidnova.com/2d-sprite-animation-in-android,471.html/comment-page-1#comment-1127</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 01 Jun 2010 08:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.droidnova.com/?p=471#comment-1127</guid>
		<description>Great site, keel up the good work. I came here looking for a way to port my own xna isometric tiling code to Android and found it. Thanks</description>
		<content:encoded><![CDATA[<p>Great site, keel up the good work. I came here looking for a way to port my own xna isometric tiling code to Android and found it. Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->