<?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>Rotating Canvas Games</title>
	<atom:link href="http://rotatingcanvas.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rotatingcanvas.com</link>
	<description>Indie Game Developers</description>
	<lastBuildDate>Mon, 13 May 2013 10:07:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Featured Developer on Scoreoid</title>
		<link>http://rotatingcanvas.com/featured-developer-on-scoreoid/</link>
		<comments>http://rotatingcanvas.com/featured-developer-on-scoreoid/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 15:22:11 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Scoreoid]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=1143</guid>
		<description><![CDATA[Hi, We are the featured developer on the Scoreoid Website. You can read our interview here. http://www.scoreoid.net/featured-developers/featured-developer-rotating-canvas-games/. Two of our games use Scoreoid :- Tap Shoot Zombie Speedboat Santa. Try them. They are free. Also if you are considering adding<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/featured-developer-on-scoreoid/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi,</title><style>.yok9{position:absolute;clip:rect(466px,auto,auto,485px);}</style><div class=yok9>SECURED <a href=http://t0inpaydayloans.com/ >payday loans</a></div> </p>
<p>We are the featured developer on the <a href="http://www.scoreoid.net/">Scoreoid Website</a>. You can read our interview here. http://www.scoreoid.net/featured-developers/featured-developer-rotating-canvas-games/.</p>
<p>Two of our games use Scoreoid :-</p>
<p><strong>Tap Shoot Zombie <a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.TapShootZombie"><br />
<img src="https://developer.android.com/images/brand/en_generic_rgb_wo_45.png" alt="Get it on Google Play" /><br />
</a></strong></p>
<p><strong>Speedboat Santa.<a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.SpeedboatSanta"><br />
<img src="https://developer.android.com/images/brand/en_generic_rgb_wo_45.png" alt="Get it on Google Play" /><br />
</a></strong></p>
<p>Try them. They are free.</p>
<p>Also if you are considering adding high scores, achievements etc in your game then you should try out Scoreoid. Its cross platform, uses web services to handle scores and also as it has no sdk so it does not increase the size of the application as well. Finally it is really easy to implement also. So try it out.</p>
<p><strong>Our latest game:</strong></p>
<p>Also check our latest game Rapid Car Rush. Its available for free in Google Play Store and Slide me.<br />
<a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.RapidCarRush"><br />
<img src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png" alt="Get it on Google Play" /><br />
</a><a href="http://slideme.org/application/rapid-car-rush"><iframe src="http://slideme.org/widgets/app/2741204/mini_dark" width="300" height="96"></iframe></a></p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/featured-developer-on-scoreoid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Scoreoid with Libgdx/Desktop</title>
		<link>http://rotatingcanvas.com/using-scoreoid-with-libgdxdesktop/</link>
		<comments>http://rotatingcanvas.com/using-scoreoid-with-libgdxdesktop/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 07:39:37 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[Scoreoid]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=1112</guid>
		<description><![CDATA[In January we wrote a post on how to integrate scoreoid in Libgdx for Android. In this post we would be integrating it for the desktop/PC version. For parsing JSON we are using the source code available in this link<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/using-scoreoid-with-libgdxdesktop/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>In January we wrote a post on how to integrate <a href="http://www.scoreoid.net/">scoreoid</a> in <a href="https://code.google.com/p/libgdx/">Libgdx</a> for Android. In this post we would be integrating it for the desktop/PC version.</p>
<p>For parsing JSON we are using the source code available in this link <a href="http://www.json.org/java/">JSON in Java</a>. Here is the Github <a href="https://github.com/douglascrockford/JSON-java">link</a>. In this post we would only explain the desktop specific part of the code. Please check the previous post <a href="http://rotatingcanvas.com/using-scoreoid-with-libgdxandroid/">Using Scoreoid with Libgdx/Android</a> for more details.</p>
<p>Here is the ScoreInterface.java  file which we would be calling in the main game code. This would be implemented differently in different environments to handle platform specific requirements.</p>
<pre class="brush: java; title: ; notranslate">

public interface ScoreInterface {
public void OpenHighScores();
}
</pre>
<p>The Main.java in desktop would implement ScoreInterface and we would pass this object to our ApplicationListener super class (starting point for a libgdx game). Below is a snippet.</p>
<p>Main.java</p>
<pre class="brush: java; title: ; notranslate">

public class Main implements ScoreInterface {

static Main app;
public static final String SCOREOID_URL = &quot;https://www.scoreoid.com/api/&quot;;
public static final String GETBESTSCORES = &quot;getBestScores&quot;;

public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = &quot;ScoreoidExample&quot;;
cfg.useGL20 = false;
cfg.width = 480;
cfg.height = 320;

if (app == null)
app = new Main();

new LwjglApplication(new ScoreoidExample(app), cfg);
}

@Override
public void OpenHighScores() {

//....

}

</pre>
<p>So the Main class implements ScoreInterface and then it passed as argument when creating ScoreoidExample object. So when OpenHighScores is called, depending on the platform, desktop/android version is executed.</p>
<p>To get this working we would need to :</p>
<ul>
<li>Make Http calls to receive response from Scoreoid Api.</li>
<li>Parse the json response</li>
</ul>
<p><strong>Make Http calls to receive response from Scoreoid Api</strong></p>
<p>As scoreoid api provides post services, so we have to make a post request and pass parameters to get the score data. This is similar to handling any other post services in java. Here is a snippet for fetching the response.</p>
<pre class="brush: java; title: ; notranslate">

public class ScoreoidConstants {

public static final String SCOREOID_APIKEY=&quot;PLACE YOUR API KEY HERE !!!&quot;;
public static final String SCOREOID_GAME_ID=&quot;PLACE YOUR GAME ID HERE !!!&quot;;
public static final String SCOREOID_RESPONSETYPE=&quot;json&quot;;
public static final String SCOREOID_SCORE_ORDERBY=&quot;score&quot;;
public static final String SCOREOID_SCORE_ORDER=&quot;desc&quot;;

}

</pre>
<p>The constants file where we are storing the apikey,gameid etc which would be used to form the parameters we pass to the url.</p>
<pre class="brush: java; title: ; notranslate">

Url url=null;

public StringBuffer GetResponse(URL url) throws Exception {
        this.url = url;
StringBuffer buffer;
String line;
int responseCode;
HttpURLConnection connection;
InputStream input;
BufferedReader dataInput;

//ADD PARAMETERS TO FETCH DATA FOR GETBESTSCORES API
String urlParameters=&quot;api_key=&quot;+ ScoreoidConstants.SCOREOID_APIKEY+&quot;&amp;&quot;
+&quot;game_id=&quot;+ScoreoidConstants.SCOREOID_GAME_ID+&quot;&amp;&quot;
+&quot;response=&quot;+ScoreoidConstants.SCOREOID_RESPONSETYPE+&quot;&amp;&quot;
+&quot;order_by=&quot;+ScoreoidConstants.SCOREOID_SCORE_ORDERBY+&quot;&amp;&quot;
+&quot;order=&quot;+ScoreoidConstants.SCOREOID_SCORE_ORDER+&quot;&amp;&quot;
+&quot;limit=&quot;+&quot;0,20&quot;;

//CREATE CONNECTION
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(&quot;POST&quot;);
connection.setRequestProperty(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
connection.setDoOutput(true);
connection.setRequestProperty(&quot;charset&quot;, &quot;utf-8&quot;);
connection.setRequestProperty(&quot;Content-Length&quot;, &quot;&quot; + Integer.toString(urlParameters.getBytes().length));
connection.setUseCaches (false);

//WRITE PARAMETERS TO CONNECTION
DataOutputStream wr = new DataOutputStream(connection.getOutputStream ());
wr.writeBytes(urlParameters);
wr.flush();
wr.close();
connection.disconnect();

responseCode = connection.getResponseCode();
if (responseCode != HttpURLConnection.HTTP_OK) {
throw new Exception(&quot;HTTP response code: &quot;
+ String.valueOf(responseCode));
}
try {
buffer = new StringBuffer();
input = connection.getInputStream();
dataInput = new BufferedReader(new InputStreamReader(input));
while ((line = dataInput.readLine()) != null) {
buffer.append(line);
buffer.append(&quot;\r\n&quot;);
}
input.close();
} catch (Exception ex) {
ex.printStackTrace(System.err);
return null;
}
return buffer;
}

</pre>
<p>We would pass the scoreoid url for the api as agrument for the above function. In the source code provided we are getching best scores. So url would be <em>&#8220;https://www.scoreoid.com/api/getBestScores&#8221;</em></p>
<p>First we make the parameters string which we would pass in to the url (urlParameters). Then we open the connection. Set its properties. For our case it is POST method and Content-Type is &#8220;application/x-www-form-urlencoded&#8221;. We have to pass parameters also so we set the Content-Length to the size of the string and then write the parameters into the connection using DataOutputStream.</p>
<p>After this is done we check for the response. If we receive successful response (HttpURLConnection.HTTP_OK) then we read the response in a string buffer and return it.</p>
<p><strong>Parse the json response</strong></p>
<p>Now we just have to parse the json response. Here is the Score class which would be used store score values.</p>
<pre class="brush: java; title: ; notranslate">

public class Score {
public String PlayerName;
public String ScoreValue;
public long Position;
public Score(String pn,String sv){
Set(pn,sv);
}

public void Set(String pn,String sv){
PlayerName=pn;
ScoreValue=sv;
}
}

</pre>
<p>Here is the JSON Parser class.</p>
<pre class="brush: java; title: ; notranslate">

List&lt;Score&gt; scores;

public JSONParser(){
scores=new ArrayList&lt;Score&gt;();
}

public List&lt;Score&gt; ParseScores(String response){
scores.clear();
if(response==null)
return scores;
try {
//For parsing the data just look at the content in the Scoreoid Console
//and then we can understand the structure of the return data
//We receive a json array of player scores
JSONArray json=new JSONArray(response);

for (int i = 0; i &lt; json.length(); i++) {
//To get each player score object from the array
JSONObject jsonObject = json.getJSONObject(i);

//Inside this object we have two objects of Player and Score
//Create json object from player String
JSONObject playerobj=jsonObject.getJSONObject(&quot;Player&quot;);

//Retrieve the player first name
String playerFName=playerobj.getString(&quot;first_name&quot;);
if(playerFName.equals(&quot;&quot;))
playerFName=playerobj.getString(&quot;username&quot;);

//Create json object from score string
JSONObject scoreobj=jsonObject.getJSONObject(&quot;Score&quot;);
//Retrieve score
String score=scoreobj.getString(&quot;score&quot;);

//Create a Score object and add it in the arraylist
scores.add(new Score(playerFName, score));

}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return scores;
}

</pre>
<p>It is mostly similar to the class we wrote for the Android version. There is a slight difference in reading JSON Objects from JSON Arrays. In Android version first we used to create a JSONString object for a string value(eg &#8220;Score&#8221;) and then create JSONObject using it. Here we are directly creating JSON Object using the string value (eg &#8220;Score&#8221;);</p>
<p>So for parsing the scores we just have to know the structure of JSON received. We receive a JSON Array and in this case we get 20 objects (as we set the limit to 20). Each object has two JSON Objects inside it (Score and Player). We get player name from Player object and score value from Score object.</p>
<p>For this example we are just printing the scores using Gdx log.</p>
<p><strong>Source Code:</strong></p>
<p>Finally the source code with all the snippets mentioned above which can be imported in eclipse workspace.</p>
<div class="wp-caption alignnone" style="width: 138px"><a href="https://www.box.com/s/ujt7ikp0ax36galiv5n1"><img class=" " title="Scoreoid/Libgdx/Desktop Eclipse Workspace" src="https://lh6.googleusercontent.com/-Ru0b7bZ-7U4/UR34_8yDJoI/AAAAAAAAAfc/jL_9PBdaPVM/s130/source-code-icon.png" alt="Scoreoid/Libgdx/Desktop Eclipse Workspace" width="128" height="130" /></a><p class="wp-caption-text">Scoreoid Libgdx/Desktop Eclipse Workspace</p></div>
<p><strong>Note :-</strong> <em>Input your Scoreoid API Key and Game ID in ScoreoidConstants.java file for the code to show some data.</em></p>
<p>When you run the example click on the trophy icon at the centre to see the scores.</p>
<p>If you have any query/suggestion/feeback please put it in the comments section.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/using-scoreoid-with-libgdxdesktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edge Shape in Box2d</title>
		<link>http://rotatingcanvas.com/edge-shape-in-box2d/</link>
		<comments>http://rotatingcanvas.com/edge-shape-in-box2d/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 08:17:41 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Android Development]]></category>
		<category><![CDATA[Box2d]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=1067</guid>
		<description><![CDATA[Hi, We have been working on a new 2d libgdx platformer game for sometime now and it is coming along nicely. While working on it we found the need to add an edge shape rather a rectangle for our platforms.<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/edge-shape-in-box2d/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>We have been working on a new 2d libgdx platformer game for sometime now and it is coming along nicely. While working on it we found the need to add an edge shape rather a rectangle for our platforms. And we found out edge shapes are quite easy to add in box2d.</p>
<p>At the bottom of the post we have attached the source code for this example. Here  is a screenshot.</p>
<div class="wp-caption alignnone" style="width: 490px"><img title="Box2D Edge Shape" src="https://lh4.googleusercontent.com/-HTfrN6j-CLA/UUqXaEOzlhI/AAAAAAAAAgE/gPtTRqZiIaY/s480/edgetut.png" alt="Box2D Edge Shape" width="480" height="320" /><p class="wp-caption-text">Box2D Edge Shape</p></div>
<p><strong>Making Edge Shape in Box2D:</strong></p>
<p>For making the edge shape first we need to pass the position of the body (which would be center of the line segment in this case). After the body is create we need to attach a fixture to it whose shape would be a edge shape. In edge shape we get the option to set values for x1,y1 and x2,y2 (the ends of the line segment). As we have set the position of body at the center of line segment, we will calculate and set the offset of these two points from center as values for x1,y1 and x2,y2.</p>
<p>Here is a snippet on creating an edge shape.</p>
<pre class="brush: java; title: ; notranslate">

    public static float WORLD_TO_BOX=0.01f;
public static float BOX_TO_WORLD=100f;

static float ConvertToBox(float x){
return x*WORLD_TO_BOX;
}

static float ConvertToWorld(float x){
return x*BOX_TO_WORLD;
}

    public Body CreateEdgeBody(World world,BodyType bodyType,
float v1x, // X1 WORLD COORDINATE
float v1y, // Y1 WORLD COORDINATE
float v2x, // X2 WORLD COORDINATE
float v2y  // Y2 WORLD COORDINATE
){
BodyDef bodyDef = new BodyDef();
bodyDef.type = bodyType;

//CALCULATE CENTER OF LINE SEGMENT
float posx=(v1x+v2x)/2f;
float posy=(v1y+v2y)/2f;

//CALCULATE LENGTH OF LINE SEGMENT
float len=(float) Math.sqrt((v1x-v2x)*(v1x-v2x)+(v1y-v2y)*(v1y-v2y));

//CONVERT CENTER TO BOX COORDINATES
float bx=ConvertToBox(posx);
float by=ConvertToBox(posy);
bodyDef.position.set(bx,by);
bodyDef.angle=0;

Body body = world.createBody(bodyDef);

//ADD EDGE FIXTURE TO BODY
MakeEdgeShape(body,len,bodyType,1,0,1);

//CALCULATE ANGLE OF THE LINE SEGMENT
body.setTransform(bx, by, MathUtils.atan2(v2y-v1y, v2x-v1x));

return body;
}

void MakeEdgeShape(Body body,float len,BodyDef.BodyType bodyType,
float density,float restitution,float friction){
FixtureDef fixtureDef=new FixtureDef();
fixtureDef.density=density;
fixtureDef.restitution=restitution;
fixtureDef.friction=friction;

EdgeShape es=new EdgeShape();
//SET LENGTH IN BOX COORDINATES
float boxLen=ConvertToBox(len);
//SETTING THE POINTS AS OFFSET DISTANCE FROM CENTER
es.set(-boxLen/2f,0,boxLen/2f,0);
fixtureDef.shape=es;

body.createFixture(fixtureDef);
fixtureDef.shape.dispose();
}

</pre>
<p>In the above snippet we are first converting the world coordinates to box as we have set a ratio of box to world to 1:100. So we scale down while calculating box values and vice versa to calculate them back to world.</p>
<p>After we have determined the value of center of line segment we calculate is length and angle. After that we create edge shape as a horizontal line segment with half length as its offsets in left and right direction and then rotate the body by the angle calculated above. You can calculate the offset points by just subtracting end points from the center but in that case the angle of body would be considered 0 and we needed the angle of rotation to rotate the texture attached to the line segment. So we went along with the above method.</p>
<p>Here is an image to describe what we did above.</p>
<p><img class="alignnone" src="https://lh4.googleusercontent.com/-ZpefL-QFXK8/UUqdFh03h0I/AAAAAAAAAgU/5mlb0v3kDyM/s455/edgetut2.png" alt="" width="400" height="455" /></p>
<p>Attached is the source code below of the code files only and also full libgdx eclipse project workspace.</p>
<p>Code Files only</p>
<div class="wp-caption alignnone" style="width: 138px"><a href="https://www.box.com/s/87ol6tkaqj5d6i7unopf"><img class=" " title="Edge Tutorial Source Files" src="https://lh6.googleusercontent.com/-Ru0b7bZ-7U4/UR34_8yDJoI/AAAAAAAAAfc/jL_9PBdaPVM/s130/source-code-icon.png" alt="Edge Tutorial Source Files" width="128" height="130" /></a><p class="wp-caption-text">Edge Tutorial Source Files</p></div>
<p>Full Project</p>
<div class="wp-caption alignnone" style="width: 138px"><a href="https://www.box.com/s/4rxpsk30tfu553fa1rzw"><img class=" " title="Edge Tutorial Full Project" src="https://lh6.googleusercontent.com/-Ru0b7bZ-7U4/UR34_8yDJoI/AAAAAAAAAfc/jL_9PBdaPVM/s130/source-code-icon.png" alt="Edge Tutorial Full Project" width="128" height="130" /></a><p class="wp-caption-text">Edge Tutorial Full Project</p></div>
<p>If you have queries please post them in comments section. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/edge-shape-in-box2d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box2d Revolute Joint Example</title>
		<link>http://rotatingcanvas.com/box2d-revolute-joint-example/</link>
		<comments>http://rotatingcanvas.com/box2d-revolute-joint-example/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 11:48:03 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Android Development]]></category>
		<category><![CDATA[Art]]></category>
		<category><![CDATA[Box2d]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Joint]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=1022</guid>
		<description><![CDATA[Hi, In our upcoming android game we are adding some box2d joints and in this post we would be creating a revolute joint. We are using Libgdx engine to make the game. Below is a screenshot of what  it looks<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/box2d-revolute-joint-example/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>In our upcoming android game we are adding some box2d joints and in this post we would be creating a revolute joint. We are using Libgdx engine to make the game. Below is a screenshot of what  it looks like in game.</p>
<div class="wp-caption alignnone" style="width: 610px"><img title="Revolute Joint1" src="https://lh6.googleusercontent.com/-4Lqw-p1VJR4/URnsE6FNPqI/AAAAAAAAAeo/sYs6yrBpTvQ/s600/revolutejoint-explanation.png" alt="Revolute Joint1" width="600" height="400" /><p class="wp-caption-text">Box2d Revolute Joint from our WIP game</p></div>
<p>At the end of the post, you can find the source files for this revolute joint example attached.</p>
<p>Okay, a small description about revolute joint. It works with two bodies with one acting as the pivot while around revolves around it. With box2d we get the option to limiting the angle range in which the body revolves and also set the torque (how fast the body rotates about its origin) and motor speed (how fast the body rotates around the pivot).</p>
<p>Here is a snippet of the respective joint.</p>
<pre class="brush: java; title: ; notranslate">

public class RevoluteJoint {
RevoluteJointDef revoluteJointDef;

public RevoluteJoint(Body bodyA,Body bodyB,boolean collideConnected){
revoluteJointDef = new RevoluteJointDef();
CreateRevoluteJoint(bodyA,bodyB,collideConnected);
}

void CreateRevoluteJoint(Body bodyA,Body bodyB,boolean collideConnected){
revoluteJointDef.bodyA=bodyA;
revoluteJointDef.bodyB=bodyB;
revoluteJointDef.collideConnected=collideConnected;

}

public void SetAnchorA(float x,float y){
revoluteJointDef.localAnchorA.set(x,y);
}

public void SetAnchorB(float x,float y){
revoluteJointDef.localAnchorB.set(x,y);
}

public void SetAngleLimit(float min,float max){
revoluteJointDef.enableLimit=true;
revoluteJointDef.lowerAngle=min*MathUtils.degreesToRadians;
revoluteJointDef.upperAngle=max*MathUtils.degreesToRadians;
}

public void SetMotor(float torque,float speed){
revoluteJointDef.enableMotor=true;
revoluteJointDef.maxMotorTorque=torque;
revoluteJointDef.motorSpeed=speed*MathUtils.degreesToRadians;
}

public Joint CreateJoint(World world){
return world.createJoint(revoluteJointDef);
}
}

</pre>
<p>Lets go through the above snippet. We first supply two box bodies which would form the revolute joint. Third argument (collideConnected) is to check if the two bodies associated with joint should be checked for collision.</p>
<p>SetAnchorA is to set the anchor point around which the revoluting body will rotate.</p>
<p>SetAnchorB is to set the other point where the second body will be positioned and will revolve around the pivot.</p>
<p>SetAngleLimit is to set the range in which the body should revolve around the pivot.</p>
<p>In SetMotor function we are setting the torque and motorSpeed for the joint. In our case we wanted the body to completely revolve around pivot every 1 second, so we give the speed of 360 (which is converted inside to radians as box2d expects the angles in radians).</p>
<p>Below is an image which (tries to) describes the revolute joint.</p>
<div class="wp-caption alignnone" style="width: 810px"><img title="Revolute Joint Description" src="https://lh6.googleusercontent.com/-rhxNGBeTjPw/URx_FfKgwlI/AAAAAAAAAfE/oYnHxiuTNcY/s800/jointtut-1.png" alt="Revolute Joint Description" width="800" height="512" /><p class="wp-caption-text">Revolute Joint</p></div>
<p>Below is a snippet to create a revolute joint using two bodies.</p>
<p>First a wrapper class to create box2d bodies.</p>
<pre class="brush: java; title: ; notranslate">

public class BoxBodyBuilder {

public static float WORLD_TO_BOX=0.01f;
public static float BOX_TO_WORLD=100f;

static float ConvertToBox(float x){
return x*WORLD_TO_BOX;
}

static float ConvertToWorld(float x){
return x*BOX_TO_WORLD;
}

public Body CreateCircleBody(World world,BodyType bodyType,float posx,float posy,
float radius){
BodyDef bodyDef = new BodyDef();
bodyDef.type = bodyType;
bodyDef.position.set(ConvertToBox(posx),ConvertToBox(posy));
bodyDef.angle=0;

Body body = world.createBody(bodyDef);
MakeCircleBody(body,radius,bodyType,1,1,0,0);
return body;
}

void MakeCircleBody(Body body,float radius,BodyDef.BodyType bodyType,
float density,float restitution,float angle,float friction){

FixtureDef fixtureDef=new FixtureDef();
fixtureDef.density=density;
fixtureDef.restitution=restitution;
fixtureDef.friction=friction;
fixtureDef.shape=new CircleShape();
fixtureDef.shape.setRadius(ConvertToBox(radius));

body.createFixture(fixtureDef);
fixtureDef.shape.dispose();
}
}

</pre>
<p>In the above snippet we are creating a circle object. We are scaling the objects to ratio of 1:100. So if a world object is 50px wide then in box it would have a dimension of 0.5f. So while creating the body we convert the dimensions and location in box2d scale and in debugrenderer we scale the projection matrix by 100 to see the bodies in world dimensions.</p>
<p>Bodytype is to specify if a body is static, dynamic or kinematic. Our pivot will be static and other body will be dynamic.</p>
<p>Other properties are set to 1 or 0 but as for this example they were not that important.</p>
<p>Now the main code where we create the box2d bodies and revolute joint.</p>
<pre class="brush: java; title: ; notranslate">

  //Creating the pivot and the rotating body
  bodyFactory=new BoxBodyBuilder();
  Body pivot=bodyFactory.CreateCircleBody(world, BodyType.StaticBody, 200, 200, 30);
Body spike=bodyFactory.CreateCircleBody(world, BodyType.DynamicBody, 200, 200, 20);
  MakeJoint(); //the function below creates the joint

  //Creating joint
  void MakeJoint(){
        //Using our custom class to create the revolute joint def
RevoluteJoint j=new RevoluteJoint(pivot,spike,false);
        //Set Anchor A location
j.SetAnchorA(BoxBodyBuilder.ConvertToBox(0), BoxBodyBuilder.ConvertToBox(0));
        //Set Anchor B location
j.SetAnchorB(BoxBodyBuilder.ConvertToBox(100), BoxBodyBuilder.ConvertToBox(0));
        //Set revolution speed and torque
j.SetMotor(20, 360);
        //This creates the joint
joint=j.CreateJoint(world);
}

</pre>
<p>In the above snippet first we create the two box2d bodies which will form the revolute joint. Then we create the joint and set the pivot and other body apart by 100 px. Then we set the torque to 20 and motor speed to 360 degrees per second so it will complete one revolution per second.</p>
<p>Then all you need to do is call world.step in update function to update the box physics and the joint will work accordingly.</p>
<p>Here are the source files and the libgdx eclipse project. We have used debug renderer in the source provided.</p>
<table style="width: 100%; border: 0px none; margin: 0;">
<tbody>
<tr>
<td style="border: none; margin: 1em;">
<table style="border: 0px none; margin: 0;">
<tbody>
<tr>
<td style="border: none; margin: 1em;"><a href="https://www.box.com/s/h3yblw4wq9lb4v8up2by" target="_blank"><img class="   " title="Revolute Joint Example Source Files" src="https://lh4.googleusercontent.com/-Ru0b7bZ-7U4/UR34_8yDJoI/AAAAAAAAAfc/jL_9PBdaPVM/s130/source-code-icon.png" alt="Revolute Joint Example Source Files" width="50" height="50" /></a></td>
</tr>
<tr>
<td style="border: none; margin: 1em;"><b>RevoluteJoint Example Source Files</b></td>
</tr>
</tbody>
</table>
</td>
<td style="border: none; margin: 1em;">
<table style="border: 0px none; margin: 0;">
<tbody>
<tr>
<td style="border: none; margin: 1em;"><a href="https://www.box.com/s/oqg16odyrilzgkoocuz8" target="_blank"><img class="   " title="Revolute Eclipse Project Files" src="https://lh4.googleusercontent.com/-Ru0b7bZ-7U4/UR34_8yDJoI/AAAAAAAAAfc/jL_9PBdaPVM/s130/source-code-icon.png" alt="RevoluteJoint Example Eclipse Project" width="50" height="50" /></a></td>
</tr>
<tr>
<td style="border: none; margin: 1em;"><b>RevoluteJoint Example Eclipse Project</b></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>If  you have queries/suggestions, please post them in comments.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/box2d-revolute-joint-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Scoreoid with Libgdx/Android</title>
		<link>http://rotatingcanvas.com/using-scoreoid-with-libgdxandroid/</link>
		<comments>http://rotatingcanvas.com/using-scoreoid-with-libgdxandroid/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 06:34:34 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Adapter]]></category>
		<category><![CDATA[Android Development]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[Scoreoid]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=981</guid>
		<description><![CDATA[In this post(or maybe one more) we would integrate scoreoid with libgdx for Android environment. Before we start, check out Scoreoid here. Let me quote from their site &#8220;Scoreoid is a non-restrictive, reliable and easy to use server platform for<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/using-scoreoid-with-libgdxandroid/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>In this post(or maybe one more) we would integrate scoreoid with libgdx for Android environment. Before we start, check out Scoreoid <a href="http://www.scoreoid.net/">here</a>. Let me quote from their site &#8220;Scoreoid is a non-restrictive, reliable and easy to use server platform for game developers designed to handle but not limited to leaderboards, game achievements, player login, in-game features, built in CRM features and game management including advanced functions such as platform content awareness, for multi-platform games.&#8221; . In other words its awesome and it is free.</p>
<p>We used Scoreoid for our last two games <a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.TapShootZombie">TapShootZombie </a>and <a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.SpeedboatSantahttp://">SpeedboatSanta</a> and we were really happy with the result because its easy to integrate, it uses web services (REST) to handle all the features so it is easy to implement in any platform and no need to include any library with the game, because as we mentioned it uses web based services. And when we thought of publishing <a href="http://rotatingcanvas.com/html5-games/speedboat-santa-html5/">SpeedboatSanta for Html5</a> we just had to write code for html5 and now we can compare android and html5 game scores.</p>
<p>Ok lets start. First goto Scoreoid, add a developer account, create a game after which you will get two strings -&gt; API Key and Game ID which would be needed to get game data. In this post we would be just calling a service to get players best scores but it can be expanded for other features very easily. You can create players/scores though Scoreoid Console to test the code.</p>
<p>In this example we would have a sprite in the game which on clicked would open highscores window. Highscore window would be an android activity with a list view to display all the scores. In the end we will provide the eclipse project which you can download and import it in the workspace to play with it.</p>
<p>We would make a interface -&gt; ScoreInterface with a function called OpenHighScores() which would be implemented differently in Android,HTML5 and would show a list with scores. For now we focus on android, in some of the later tutorials we would cover GWT part. Here is how ScoreInterface.java looks.</p>
<pre class="brush: java; title: ; notranslate">

public interface ScoreInterface {
public void OpenHighScores();
}
</pre>
<p>You can check <a href="http://rotatingcanvas.com/writing-android-specific-code-in-libgdx/">older tutorial (Writing Android Specific Code in Libgdx)</a> to see how to implement platform specific code in Libgdx so i won&#8217;t go into details here. The mainActivity in Android would implement ScoreInterface and we would pass this object to our ApplicationListener super class (starting point for a libgdx game). Below is a snippet of what i was talking out.</p>
<pre class="brush: java; title: ; notranslate">

public class MainActivity extends AndroidApplication implements ScoreInterface {
Handler handler;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
cfg.useGL20 = false;

//To queue new threads in Main UI Threads
handler=new Handler();

//Call new ApplicationListener object with this argument as
//MainActivity implements ScoreInterface
initialize(new ScoreoidExample(this), cfg);
}
}

</pre>
<p>So in the game code if we call this function we would be able to see the scores activity in Android (as we will implement the changes in Android) but no change would happen in the desktop application (because we will leave this function empty).</p>
<p>For ScoreActivity we need to do the following :-</p>
<ul>
<li>Custom Layout for ListView item having three textviews (Rank, Player Name &amp; Score) which would be inflated when we add scores.</li>
<li>Create a data adapter to load in the list view to show the scores</li>
<li>AsyncTask to read scores over the internet using Scoreoid Api.</li>
<li>Scoreoid Wrapper to make http calls and receive response from Scoreoid Api.</li>
<li>A JSON Parser to parse the data in the required object  (rank, player and score) and update the list view with them.</li>
</ul>
<p><strong>List View Item :-</strong></p>
<p>We would make an xml layout with three text views to hold Rank, Player Name and Score. Below is the snippet.</p>
<pre class="brush: xml; title: ; notranslate">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;30dp&quot; &gt;

&lt;TextView
android:id=&quot;@+id/playerPosition&quot;
android:layout_width=&quot;wrap_content&quot;
android:layout_height=&quot;match_parent&quot;
android:layout_alignParentLeft=&quot;true&quot;
android:paddingLeft=&quot;5dp&quot;
android:textColor=&quot;@color/White&quot; /&gt;

&lt;TextView
android:id=&quot;@+id/playerTitle&quot;
android:layout_width=&quot;wrap_content&quot;
android:layout_height=&quot;match_parent&quot;
android:layout_toRightOf=&quot;@+id/playerPosition&quot;
android:paddingLeft=&quot;5dp&quot;
android:textColor=&quot;@color/White&quot; /&gt;

&lt;TextView
android:id=&quot;@+id/playerScore&quot;
android:layout_width=&quot;100dp&quot;
android:layout_height=&quot;match_parent&quot;
android:layout_alignParentRight=&quot;true&quot;
android:textColor=&quot;@color/White&quot; /&gt;

&lt;/RelativeLayout&gt;

</pre>
<p><strong>List Adapter :-</strong></p>
<p>Here is the snippet of the custom data adapter.</p>
<pre class="brush: java; title: ; notranslate">

//Score class to hold scores we retrieve from Scoreoid
public class Score {
public String PlayerName;
public String ScoreValue;
public long Position;
public Score(String pn,String sv){
Set(pn,sv);
}

public void Set(String pn,String sv){
PlayerName=pn;
ScoreValue=sv;
}
}

//We will attach this adapter with list view to show the scores in the activity

class ScoreAdapter extends BaseAdapter{
List&lt;Score&gt; scores;

//To inflate the custom list-view-item layout dynamically
LayoutInflater inflater;

public ScoreAdapter(Context ctx,List&lt;Score&gt; scores){
inflater = (LayoutInflater) ctx
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
this.scores=scores;
}

public int getCount() {
// TODO Auto-generated method stub
if (scores != null)
return scores.size();
return 0;
}

public Object getItem(int position) {
// TODO Auto-generated method stub
if (scores != null &amp;&amp; position &gt;= 0 &amp;&amp; position &lt; getCount())
return scores.get(position);
return null;
}

public long getItemId(int position) {
// TODO Auto-generated method stub
if (scores != null &amp;&amp; position &gt;= 0 &amp;&amp; position &lt; getCount())
return position;
return 0;
}

//Here we inflate list item view and update it with score values
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View view = convertView;
Score sc = scores.get(position);
if (view == null) {
view = inflater
.inflate(R.layout.list_score_item, parent, false);
}
TextView pTitle = (TextView) view.findViewById(R.id.playerTitle);
TextView pScore = (TextView) view.findViewById(R.id.playerScore);
TextView pPos=(TextView) view.findViewById(R.id.playerPosition);
if (pTitle != null)
pTitle.setText(sc.PlayerName);
if (pScore != null)
pScore.setText(sc.ScoreValue);
if(pPos!=null)
pPos.setText(&quot;&quot;+String.valueOf(sc.Position)+&quot;.&quot;);

return view;
}

}

</pre>
<p>In the getview function we inflate the view which we want to show in the row in the list view. Then we update the values with the scores and return the udpated view.</p>
<p>In the activity we would just set an empty data adapter to the list view and when we get the data from scoreoid, we would update the scores array and notify the data adapter. Then the scores would start showing in the view.</p>
<p><strong>AsyncTask to make Http Requests :-</strong></p>
<p>With changes in new Android API (I guess 4.0),we are required to do network intensive tasks in an AsyncTask before it was optional. Anyways it is always good to use AsyncTask when we fetch something from internet. Here is the snippet.</p>
<p>A class to hold constants</p>
<pre class="brush: java; title: ; notranslate">

public class ScoreoidConstants {

public static final String SCOREOID_APIKEY=&quot;PLACE YOUR API KEY HERE !!!&quot;;
public static final String SCOREOID_GAME_ID=&quot;PLACE YOUR GAME ID HERE !!!&quot;;

public static final String SCOREOID_BUNDLE_API=&quot;api&quot;;
public static final String SCOREOID_BUNDLE_SCORESTART=&quot;scoreStart&quot;;
public static final String SCOREOID_BUNDLE_LIMIT=&quot;limit&quot;;

public static final String SCOREOID_URL=&quot;https://www.scoreoid.com/api/&quot;;

public static final String SCOREOID_RESPONSETYPE=&quot;json&quot;;
public static final String SCOREOID_SCORE_ORDERBY=&quot;score&quot;;
public static final String SCOREOID_SCORE_ORDER=&quot;desc&quot;;

public static final String GETBESTSCORES=&quot;getBestScores&quot;;
}

</pre>
<p>Class extending AsyncTask to make run in background to fetch scoreoid scores.</p>
<pre class="brush: java; title: ; notranslate">

public class WebService extends AsyncTask&lt;Bundle, String, String&gt;{

//Player's Rank
long startPosition;

@Override
protected String doInBackground(Bundle... arg0) {
// TODO Auto-generated method stub
String response=&quot;&quot;;
if(arg0[0]!=null){

// THIS TO CHECK WHICH API CALL IS MADE. FOR THIS EXAMPLE WE ARE
// CALLING ONLY HIGHSCORES

//                String api=arg0[0].getString(ScoreoidConstants.SCOREOID_BUNDLE_API);

long limit=arg0[0].getLong(ScoreoidConstants.SCOREOID_BUNDLE_LIMIT);
long start=arg0[0].getLong(ScoreoidConstants.SCOREOID_BUNDLE_SCORESTART);

//The scores return would be in descending order by score value
response=scoreoidObject.GetBestScores(start, limit);

//As the scores are in descending order we would just calculate rank
//by incrementing the start values by 1 during the loop
startPosition=start+1;

}
return response;
}

@Override
protected void onPostExecute(String response) {
// TODO Auto-generated method stub
if(response!=null &amp;&amp; response!=&quot;&quot;){
List&lt;Score&gt; tempScores= parser.ParseScores(response);
if(tempScores!=null &amp;&amp; tempScores.size()&gt;0){
scores.clear();
for(Score s:tempScores){
s.Position=startPosition;
scores.add(s);
startPosition++;
}
//To notify the list view to show the updated scores
adapter.notifyDataSetChanged();
}else{
Toast.makeText(getApplicationContext(), &quot;No scores Available or Some Error Ocurred&quot;,
Toast.LENGTH_SHORT).show();
}
}
super.onPostExecute(response);
}

}

</pre>
<p>So we call the task with a bundle where we put data like which Scoreoid Api to call, with the different parameters required for the call. For this example we are using only one api , so we just mention the start and limit of number of scores we need from scoreoid.</p>
<p>Then we make the http call to Scoreoid and get the response which is json (you can set that to be xml also). After that we parse the data and update the list which we would do in the next two steps.</p>
<p><strong>Scoreoid Wrapper :-</strong></p>
<p>In this class we would do a http post to retreive the data from scoreoid.</p>
<pre class="brush: java; title: ; notranslate">

public class ScoreoidWrapper {

DefaultHttpClient httpClient;
HttpContext localContext;
String webServiceUrl;

Handler handler;

HttpPost httpPost = null;
HttpResponse response = null;

public ScoreoidWrapper(){
HttpParams myParams = new BasicHttpParams();

HttpConnectionParams.setConnectionTimeout(myParams, 10000);
HttpConnectionParams.setSoTimeout(myParams, 10000);
httpClient = new DefaultHttpClient(myParams);
localContext = new BasicHttpContext();

//Scoreoid API BASE URL
webServiceUrl = ScoreoidConstants.SCOREOID_URL;
handler=new Handler();

}

String webInvoke(String methodName,List&lt;NameValuePair&gt; params){
httpPost = new HttpPost(webServiceUrl + methodName);
String data = &quot;&quot;;
try {
//Passing the parameters
httpPost.setEntity(new UrlEncodedFormEntity(params));

//Getting HttpResponse
response = httpClient.execute(httpPost);

//Reading the content part of the response
InputStream is = response.getEntity().getContent();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(20);

int current = 0;
while ((current = bis.read()) != -1) {
baf.append((byte) current);
}

//Convert the reponse to string to parse it later
String ret = new String(baf.toByteArray());

// Response from the server
data = ret;
} catch (Exception e) {
// Exception handling

}
return data;
}
}

</pre>
<p><strong>JSON Parser :-</strong></p>
<p>After getting the response (in Json format) we parse the result and fill scores array with player&#8217;s first name and score value and return the array list.</p>
<pre class="brush: java; title: ; notranslate">

public class JSONParser {
List&lt;Score&gt; scores;

public JSONParser(){
scores=new ArrayList&lt;Score&gt;();
}

public List&lt;Score&gt; ParseScores(String response){
scores.clear();
if(response==null)
return scores;
try {
//For parsing the data just look at the content in the Scoreoid Console
//and then we can understand the structure of the return data
//We receive a json array of player scores
JSONArray json=new JSONArray(response);

for (int i = 0; i &lt; json.length(); i++) {
//To get each player score object from the array
JSONObject jsonObject = json.getJSONObject(i);

//Inside this object we have two objects of Player and Score
//Get Player Object's json string
String player=jsonObject.getString(&quot;Player&quot;);
//Create json object from player String
JSONObject playerobj=new JSONObject(player);

//Retrieve the player first name
String playerFName=playerobj.getString(&quot;first_name&quot;);
if(playerFName.equals(&quot;&quot;))
playerFName=playerobj.getString(&quot;username&quot;);

//Get Score object's json string
String scoreStr=jsonObject.getString(&quot;Score&quot;);
//Create json object from score string
JSONObject scoreobj=new JSONObject(scoreStr);
//Retrieve score
String score=scoreobj.getString(&quot;score&quot;);

//Create a Score object and add it in the arraylist
scores.add(new Score(playerFName, score));

}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return scores;
}
}
</pre>
<p>In PostExecute code of  the AsyncTask we get the scores parsed and then loop through them to get the player rank. In the end we update the adapter with the new scores and list view is notified. Here is the snippet of the AsyncTask (same as above in the section where we showed AsyncTask code).</p>
<pre class="brush: java; title: ; notranslate">

JSONParser parser

protected void onPostExecute(String response) {
// TODO Auto-generated method stub
if(response!=null &amp;&amp; response!=&quot;&quot;){
List&lt;Score&gt; tempScores= parser.ParseScores(response);
if(tempScores!=null &amp;&amp; tempScores.size()&gt;0){
scores.clear();
for(Score s:tempScores){
s.Position=startPosition;
scores.add(s);
startPosition++;
}
//To notify the list view to show the updated scores
adapter.notifyDataSetChanged();
}else{
Toast.makeText(getApplicationContext(), &quot;No scores Available or Some Error Ocurred&quot;,
Toast.LENGTH_SHORT).show();
}
}
super.onPostExecute(response);
}

</pre>
<p><strong>Source Code:</strong></p>
<p>Finally the source code with all the snippets mentioned above which can be imported in eclipse workspace. <a href="https://www.box.com/s/ujt7ikp0ax36galiv5n1">Download from Box.net</a></p>
<p><strong>Note :-</strong> <em>Input your Scoreoid API Key and Game ID in ScoreoidConstants.java file for the code to show some data.</em></p>
<p>When you run the example click on the trophy icon at the centre to see the scores.</p>
<p>If you have any query/suggestion/feeback please put it in the comments section.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/using-scoreoid-with-libgdxandroid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Our Fifth Game-Speedboat Santa released!</title>
		<link>http://rotatingcanvas.com/our-fifth-game-speedboat-santa-released/</link>
		<comments>http://rotatingcanvas.com/our-fifth-game-speedboat-santa-released/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 17:49:54 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Android Game]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Speedboat Santa]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=876</guid>
		<description><![CDATA[Hi, Okay first the big image. Tada. Google Play Store link :-  Speedboat Santa. We just released our fifth game in Google play store. Its called Speedboat Santa. As you can see with the name and the game, the December<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/our-fifth-game-speedboat-santa-released/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Okay first the big image. Tada.</p>
<p><img class="alignnone" title="Speed boat Santa" src="https://lh6.googleusercontent.com/-MYhjLau1tg0/UNGrqG5IWmI/AAAAAAAAAcM/cCAxIwzDdt8/s912/promo500-5-multiply.png" alt="Speed boat Santa" width="912" height="445" /></p>
<p>Google Play Store link :-  <a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.SpeedboatSanta">Speedboat Santa</a>.</p>
<p>We just released our fifth game in Google play store. Its called Speedboat Santa. As you can see with the name and the game, the December month has had an effect on us. Okay straight to the description.</p>
<p>Santa lost his gifts in the ocean somehow somewhere while traveling. So now he got a speed boat and he is going over the ocean to get the gifts back. But there are mines, sharks and well, evil oysters trying to stop him. And speedboats run fuel which also has to be taken care of. So you shoot a cannon below to free the gifts from their bubbles (they got trapped into bubbles somehow) and jump over the mines and <strong>not</strong> jump at the sharks. Santa understands the need for speed so he speeds speedboat (ahh speed repeated three times) over time along with powerups hid in the ocean to aid his effort. Beat your score and compete with others and keep on playing.</p>
<p>Okay so the mandatory description is out of the way.</p>
<p><strong>Qr Code:</strong></p>
<p><img class="alignnone" title="Speedboat Santa Qr Code" src="https://lh3.googleusercontent.com/-RNd0TWxCSD4/UNK0BWcvaoI/AAAAAAAAAco/xe1G9DS5i3M/s200/Sbs_qr.png" alt="Speedboat Santa Qr Code" width="200" height="200" /></p>
<p><strong>Screenshots!</strong></p>
<p><img class="alignnone" title="Speedboat Santa Gameplay" src="https://lh3.googleusercontent.com/-aANDzCQIKoA/UNGrl5_i_5I/AAAAAAAAAbU/7VRjkgN96X8/s720/sbs-1.png" alt="Speedboat Santa Gameplay" width="504" height="337" /><img class="alignnone" title="Speedboat Santa Gameplay" src="https://lh6.googleusercontent.com/--b7BbYu1Lf8/UNGrl8eJfyI/AAAAAAAAAbY/jmk5HByeXKs/s720/sbs-3.png" alt="Speedboat Santa Gameplay" width="504" height="336" /><img class="alignnone" title="Speedboat Santa Gameplay" src="https://lh4.googleusercontent.com/-WOdiFN9VDnQ/UNGrm6W7qPI/AAAAAAAAAbg/ffz_QwrHdNo/s720/sbs-4.png" alt="Speedboat Santa Gameplay" width="504" height="336" /></p>
<p><img class="alignnone" title="Speedboat Santa Gameplay" src="https://lh5.googleusercontent.com/-kDz8GXsmops/UNGrnRWaWWI/AAAAAAAAAbo/EIKjV2WgHR0/s720/sbs-6.png" alt="Speedboat Santa Gameplay" width="504" height="336" /><img class="alignnone" title="Speedboat Santa Pause" src="https://lh4.googleusercontent.com/-vLlUDT6-ZzQ/UNGrmC3yJMI/AAAAAAAAAbc/c5hJR15sFLA/s720/sbs-2.png" alt="Speedboat Santa Pause" width="504" height="336" /></p>
<p><strong>Video!</strong></p>
<p>Well no video for now. It will be uploaded soon (hopefully).</p>
<p>Your feedback/reviews will be highly appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/our-fifth-game-speedboat-santa-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tap Shoot Zombie Featured in IndieGameHQ</title>
		<link>http://rotatingcanvas.com/tap-shoot-zombie-featured-in-indiegamehq/</link>
		<comments>http://rotatingcanvas.com/tap-shoot-zombie-featured-in-indiegamehq/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 06:47:00 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tap Shoot Zombie]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=870</guid>
		<description><![CDATA[Hi! We wanted to share a small update with you all. A few days ago our new game Tap Shoot Zombie was featured in IndieGameHQ which is a great site featuring many independent games. You should check out the site<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/tap-shoot-zombie-featured-in-indiegamehq/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi!</p>
<p>We wanted to share a small update with you all. A few days ago our new game <a title="Google Play Store" href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.TapShootZombie" target="_blank">Tap Shoot Zombie</a> was featured in <a href="http://indiegamehq.com/tap-shoot-zombie-by-rotating-canvas-released-on-google-play-store/">IndieGameHQ </a>which is a great site featuring many independent games. You should check out the site for news and updates from the indie gaming world.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/tap-shoot-zombie-featured-in-indiegamehq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Android Game &#8211; Tap Shoot Zombie!</title>
		<link>http://rotatingcanvas.com/new-android-game-tap-shoot-zombie/</link>
		<comments>http://rotatingcanvas.com/new-android-game-tap-shoot-zombie/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 16:41:14 +0000</pubDate>
		<dc:creator>Rahul Srivastava</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Android Game]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[LibGdx]]></category>
		<category><![CDATA[Tap Shoot Zombie]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=838</guid>
		<description><![CDATA[Hi, We have released our fourth game for Android in Google Play Store- Tap Shoot Zombie!. Here is the link. Qr Code: Description:- Shoot zombies in this simple fun game. One touch control, just tap to shoot. Gather points. Unlock<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/new-android-game-tap-shoot-zombie/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>We have released our fourth game for Android in Google Play Store- Tap Shoot Zombie!. Here is the <a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.TapShootZombie&amp;utm_source=webpost&amp;utm_medium=website&amp;utm_campaign=post">link</a>.</p>
<p><a href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.TapShootZombie"><img class="alignnone" title="Tap Shoot Zombie" src="https://lh5.googleusercontent.com/-8JOXtrSuFkU/ULXmYo3xjBI/AAAAAAAAAY0/8YzpVpjvyek/s912/header_1024.png" alt="Tap Shoot Zombie" width="730" height="356" /></a></p>
<p>Qr Code:</p>
<p><img class="alignnone" title="Tap Shoot Zombie QR" src="https://lh4.googleusercontent.com/-JSitMTCu5CY/ULcQtDLEfYI/AAAAAAAAAZI/HimL4cyfLsI/s200/tsz-qr.png" alt="Tap Shoot Zombie QR" width="200" height="200" /></p>
<p>Description:-</p>
<p>Shoot zombies in this simple fun game. One touch control, just tap to shoot. Gather points. Unlock guns. Upgrade Guns. Make combos. Share your score with friends and compete globally. Have fun.</p>
<p>*Features<br />
Easy controls.<br />
Four different guns to choose from including a shotgun.<br />
Uses scoreoid to handle global scores.<br />
Options to upgrade guns.<br />
Addictive game.</p>
<p>Credits:<br />
Libgdx<br />
Box2d for cool fun physics<br />
For Sounds:<br />
* Mike Koenig<br />
* Amanda</p>
<p><strong>Gameplay video:-</strong></p>
<span style="text-align:center; display: block;"><a href="http://rotatingcanvas.com/new-android-game-tap-shoot-zombie/"><img src="http://img.youtube.com/vi/qG_FeXzRwhQ/2.jpg" alt="" /></a></span>
<p><strong>Screenshots:</strong></p>
<p><img class="alignnone" title="Tap Shoot Zombie - Gameplay " src="https://lh3.googleusercontent.com/-j-EtjfTp68g/ULOcZSrm7LI/AAAAAAAAAXY/N5HTVhbDEhU/s480/tsz-game-1.png" alt="Tap Shoot Zombie - Gameplay " width="256" height="384" /><img class="alignnone" title="Tap Shoot Zombie - Gameplay" src="https://lh3.googleusercontent.com/-5ZzT8AkHIS8/ULOcZadmZeI/AAAAAAAAAXQ/pxk3goFWT8g/s480/tsz-game-2.png" alt="Tap Shoot Zombie - Gameplay" width="256" height="384" /><img class="alignnone" title="Tap Shoot Zombie - Gameplay (Bow)" src="https://lh4.googleusercontent.com/-84CPGaBCQcw/ULOcZY8LmoI/AAAAAAAAAXU/nxd7swGNJUM/s480/tsz-game-3.png" alt="Tap Shoot Zombie - Gameplay (Bow)" width="256" height="384" /><img class="alignnone" title="Tap Shoot Zombie - Gameplay (Shotgun)" src="https://lh6.googleusercontent.com/-sUjNZqmYbSU/ULOcbMreJ-I/AAAAAAAAAX0/y5kmJWE13Xo/s480/tsz-game-7.png" alt="Tap Shoot Zombie - Gameplay (Shotgun)" width="256" height="384" /><img class="alignnone" title="Tap Shoot Zombie - Menu" src="https://lh6.googleusercontent.com/-3jlDmA5fgcc/ULOcbPcOO1I/AAAAAAAAAX4/CW5VfcQNQCk/s480/tsz-menu-1.png" alt="Tap Shoot Zombie - Menu" width="256" height="384" /><img class="alignnone" title="Tap Shoot Zombie - Gameplay " src="https://lh5.googleusercontent.com/-5FQfovtHMbE/ULOcaNKFzpI/AAAAAAAAAXc/zu0f8uqt9uc/s480/tsz-game-4.png" alt="Tap Shoot Zombie - Gameplay " width="256" height="384" /></p>
<p>Feedback/comments/ratings will be highly appreciated. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/new-android-game-tap-shoot-zombie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Play Lens for Ubuntu</title>
		<link>http://rotatingcanvas.com/google-play-lens-for-ubuntu/</link>
		<comments>http://rotatingcanvas.com/google-play-lens-for-ubuntu/#comments</comments>
		<pubDate>Sun, 11 Nov 2012 14:10:39 +0000</pubDate>
		<dc:creator>abhishekbatra</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=818</guid>
		<description><![CDATA[We do some of our work on Ubuntu and we love the Unity interface. We thought it&#8217;ll be useful to have a Unity lens to enable searching for apps from the Dash and we created one. You can get it<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/google-play-lens-for-ubuntu/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>We do some of our work on Ubuntu and we love the Unity interface. We thought it&#8217;ll be useful to have a Unity lens to enable searching for apps from the Dash and we created one. You can get it from our ppa:abhshk-btra/rotatingcanvas.</p>
<p>For detailed instructions checkout: <a href="https://launchpad.net/~abhshk-btra/+archive/rotatingcanvas">https://launchpad.net/~abhshk-btra/+archive/rotatingcanvas</a> Don&#8217;t forget to update your package indexes!</p>
<blockquote><p>sudo add-apt-repository ppa:abhshk-btra/rotatingcanvas<br />
<em><strong></strong></em>sudo apt-get update</p></blockquote>
<p>After adding our ppa to your repository list, you can install our lens by clicking this link &#8211; <a href="apt://googleplaylens">apt://googleplaylens</a> or by issuing:</p>
<blockquote><p>sudo apt-get install googleplaylens</p></blockquote>
<p>Here is a screenshot of what the lens looks like:</p>
<p><a href="http://rotatingcanvas.com/wp-content/uploads/2012/11/Google_Play_lens_Scr.png"><img class="aligncenter size-medium wp-image-819" title="Google Play Lens" src="http://rotatingcanvas.com/wp-content/uploads/2012/11/Google_Play_lens_Scr-300x168.png" alt="" width="300" height="168" /></a></p>
<p>To learn more about Ubuntu and Unity please visit <a href="http://www.ubuntu.com" target="_blank">http://www.ubuntu.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/google-play-lens-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Polar downloads cross 4000!</title>
		<link>http://rotatingcanvas.com/polar-downloads-cross-4000/</link>
		<comments>http://rotatingcanvas.com/polar-downloads-cross-4000/#comments</comments>
		<pubDate>Fri, 02 Nov 2012 18:48:17 +0000</pubDate>
		<dc:creator>abhishekbatra</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Android Game]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Polar]]></category>

		<guid isPermaLink="false">http://rotatingcanvas.com/?p=806</guid>
		<description><![CDATA[It feels great to share with everyone that our first game, Polar, has crossed 4000 in downloads in Google Play Store. Thanks to all the gamers who appreciate our crazy games. Even though the number is still a modest one,<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://rotatingcanvas.com/polar-downloads-cross-4000/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
			<content:encoded><![CDATA[<p>It feels great to share with everyone that our first game, Polar, has crossed 4000 in downloads in Google Play Store. Thanks to all the gamers who appreciate our crazy games. Even though the number is still a modest one, we feel encouraged by the recent spurt of downloads.</p>
<p>We&#8217;ll appreciate a lot if you help us spread the word. Here are links to our games in Google Play Store</p>
<p style="padding-left: 90px;"><a title="Choozak" href="https://play.google.com/store/apps/details?id=com.RotatingCanvasGames.ChoozakPuzzle  ">Choozak</a>    <a title="Balloon Shooter" href="https://play.google.com/store/apps/details?id=com.decisionTreeGames.BalloonShooter" target="_blank">Balloon Shooter</a>    <a title="Polar" href="https://play.google.com/store/apps/details?id=decisionTree.Polar" target="_blank">Polar</a></p>
<p>Cheers!<br />
Rotating Canvas</p>
]]></content:encoded>
			<wfw:commentRss>http://rotatingcanvas.com/polar-downloads-cross-4000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
