Meaning I've wasted a bit of time trying to do it the hard way. I have
learnt more about introspection.
It needs a bit of introspection or reflection (I forget the difference
between the two) to get the mMap field which is normally private
Without all the error handling a function to do this looks roughly like
// And some other stuff
String IntenttoJson (Intent i)
Gson g = new Gson();
mMapField = Bundle.class.getDeclaredField("mMap");
return ( g.toJson(mMapField.get(i.getExtras() )));
I can make a class for this if you want Tom? But it would probably be
as easy to include this snippet.
So now you should be able to add crap to Intents then easily send it
over to the server without caring what it is.
Saw this. Hmm.
I'd probably go for UDP for updating on going game state, which we
don't care about losing much. Although we should probably do the final
game state updates over TCP so that we don't have to worry about how
to do the guaranteed reception.
Might have to think about not using Tornado and going back to twistd.
Or going threaded and having a TCP and an UDP server updating the same
Or maybe erlang so no one has a clue about the code :P It would be
great for large scale tracking of people using the code for the
Command and Conquer game mode.