Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 Feb 2013
Offline Last Active Jan 09 2014 02:59 PM

Posts I've Made

In Topic: Android 2 player game - connecting

19 November 2013 - 04:15 PM

I came across a snippet of code today which demonstrates connecting two phones in a client/server relationship rather easily (can't find it right now but will post if anyone was interested) but would only work locally.  The topic did however spread to the ability to move this to client/client using a third party as a server - I imagine utilising the likes of Google App Engine, Parse, EC2 etc.


My initial thought is that I want this to be as close to free as possible while I am still working on this, the $25 Google developer fee seems the cheapest option to me.


I looked deeper into the Google App/Engine/Game services and feel the documentation on these is sufficient to get myself started on the connectivity side of things.


Thanks for the input guys.

In Topic: Android 2 player game - connecting

14 November 2013 - 01:13 PM

I have given this a perusal and the Amazon EC2 concept appears to be a place to hold the common data, and the node.js is the proverbial web-server?  I feel if I was to use this approach i could, for at least testing purposes, create a local testing environment with a copy of Ubuntu server?


I am currently using Parse.com to deal with my user accounts and databases and am led to believe they support this too?  I may be wrong, but it would be good to keep everything in one place.  If it comes to it though, G+ will be the way to go - at least for the immediate term.


Thanks H+

In Topic: Android 2 player game - connecting

13 November 2013 - 04:32 PM

Hi H+


As I say, I'm not too much against the G+ signin, however I'm a little bit too 'new' to understand your second paragraph I'm afraid.


I'm happy to build the infrastructure myself, but wouldn't know where to begin - I imagine I need my own server space to be used as a room for the players to connect to?


I'm not sure what an Amazon EC2 micro instance is either, but I imagine a quick search will give me that information.



In Topic: "Parse" and Querying

06 November 2013 - 03:42 AM

I have looked at the documentation around the ParseQuery API but am only seeing example queries for single table queries (If Parse supported SQL I would have this nailed).


Apologies for being rather vague in my question - I felt that general practice would cover the issues I'm having here, so maybe that's not the case.  My end goal is a card game (as I imagine you may have guessed), but with this snippet what I am trying to achieve is a list of cards owned by the current user.  There will be situations where cards get added, I would need a separate list for a deck which will contain some of the cards in the entire list, and perhaps the ability to trade cards with other players (this part is a long way off).


I know it might appear as though I'm starting from the middle, however I am trying to ensure I can fully query the Parse database in the way that I need to before deciding it is what I want.  Having read about peoples issues when taking a standalone app and making it work with users/logins, I am covering this part off first and adding the game logic to it.



In Topic: "Parse" and Querying

05 November 2013 - 12:03 PM

Hi Again,


After some debugging I found that it is not blank, the StringBuilder just isn't populated prior to being set.  Very much a simpleton question here I'm sure, but how do I synchronise my code? I've always thought it runs in order and each function is completed before it moves on.


I've changed StringBuilder to StringBuffer, and the app still compiles, but the data is still blank? I assume this is due to the synchronising you mention?





My ParseQuery public void section now looks like this:

public void done(ParseObject object, com.parse.ParseException e) {
			                if (e == null) {
			        			cards.append("Card: ");
			                	Log.d("Card","Contains " + object.getString("CARD_NAME"));
			            		TextView CardsList = (TextView) findViewById(R.id.CardsList);
			               } else {

This compiles and gives me the list I expect, however when the page loads I can see the list being populated - is this something I need to drag into the very beginning and cache, or am I doing something wrong which slows it all down?