Libgdx and server game - java

I wish to create a multiplayer card game but with a server side.
I develop on Libgdx (android) for visual.
I succes to connect my application with Google Play Service because i think i can use the google play account for create the information i need for my game in the server. Like number of victory, number of defeat...
I 'm really confused because I feel wrong. Should I continue with google or create my own login and create an account on my server directly with socket ?
Thank you very much
(and sorry for my english)

You should, if you can, take advantage of the Google Play infrastructure for tracking the state of your game server. It should solve a lot of problems for you (especially identifying users reliably) vs rolling your own infrastructure.
One downside of the Google Play infrastructure is that it only works on Android devices (so if your Libgdx app also runs on other platforms, those will need a different solution).
Google Play infrastructure also assumes that your Android clients can talk to each other and can push simple state (like win/loss values and saved game state) to the Google servers or between each other. I don't think there is any support for running real server-side code with Google Play infrastructure (though you may be able to leverage the sign-on, at least).
Have you seen the Libgdx documentation and code tutorials here: https://github.com/libgdx/libgdx/wiki/Google-Play-Game-Services-in-LibGDX

Related

How to implement Gmail connection in Android games

I am a beginner Android developer and I am working on my first Android game
We all had the experience of Android games. When we enter the game, game ask us to connect via Gmail to it can save the progress of the game for us.
Now what should I do if I want to add something like this to my game?
You have to use google play services for this purpose. As there are many scenarios for login in and saving data from your game, it would be better you go through the following documents for sign-in and saving game data.
As you didn't mention that what you using to develop your game, the installation instructions can't be given specifically. For Android Native, you have to add a dependency on your build.gradle. For game engines, you may have to use packages/libraries developed for that purpose.

Emulating Android Drone Control App On Windows

I recently purchased a Yuneec Breeze quad-copter drone that uses an Android and iOS app with its own WiFi connection as a controller.
I am looking to write a Java application that performs the functions of the Android app with Game Controller support (the Breeze Cam app uses the touchscreen which means my big thumbs cover the streaming video) but am running into a roadblock.
While being proficient in Java, including network functions, I find myself woefully uninformed as to how to capture and read the network traffic between my phone and my drone. Its simply a skill I never needed until now.
Any place to help me get started?
OR -
Since I'm writing this in Java would de-compiling and hacking away at the Android source be a more viable option?
If so what decompilers are recommended?
In my experience these apps tend to be written in proprietary code. Android may be an open-source project, but the apps written for it don't have to be. It's unlikely you'll be able to write your own code to control the drone unless Yuneec provides an API/SDK to do so.
A quick Google search yields this thread on their forums: https://yuneecpilots.com/threads/api-sdk.745/
It's not much info, but it looks like you're SOL. Sorry.

Best practice / best services for going online and interactive with a mobile (Android) game

I would like to create a multiplayer turn game, in which users authenticate (through a Facebook account) and eventually play some games against other players.
I assume I need a server that, through some sql query, keeps specular authentication on its side and can store and retrieve information about the ongoing matches and whatever else. There's no need to any web server, so the server would actually only have these two roles: authenticate and store information.
I actually already have the game and I already authenticate with FB, but don't go further as soon as I currently don't have any dedicated server for this.
As soon as this - I suppose - is a very common situation for anyone that would like to make interactive his own mobile game, before starting this long journey I was wondering if there is something already made: libraries that I could use both on server and on client side, or even online services ready to be used, with facebook synced authentication and a few commands to enter the very few information that is needed for my game to run, without having to fight with security problems, syncronization issues and whatever else may arise.
Also templates, tutorials or complete examples (both sides, server and client) are welcome
Thank you very much.
There are actually a lot of full solutions for your game.
You will need a strong server side and a lot of server logic. But again you can use existing services that handle the server side for you. http://www.skiller-games.com/ has good support and monetization features.
Others:
http://www.scoreloop.com/
http://www.exitgames.com/
If you really want to make everything your own, you need to read up on some networking.
how to make Multiplayer Game

How to go about setting up a Java server and database for a multiplayer Android application

I want to make a multiplayer Android game and am an absolute novice at anything and everything networking. I have some knowledge of socket programming in C and Java, however from what I understand, it is not that simple when communicating from an Android device to a remote server. Basically, I am just unsure of how to go about setting up server-side components of this project. I've been told to look into frameworks, but am not really sure exactly how they would be used in my particular case.
Here is a breakdown of how my application works and how I want it to communicate to the server. The client application will send a request to the server whenever a user wants to login, create game, make a move, check statistics, etc. The server will update or retrieve information from a database(somehow) and send it to the client. If the player is to make a move, the server is responsible for doing all calculations, storing the gamestate, and pushing the updated game to both players.
I was hoping somebody could shed some light on how I would go about starting this. Any information would be greatly appreciated. Thanks
Essentially you want to set up a Socket Server program listening on your server for connections from the client. You can achieve this through any number of ways, but it seems like you are going to want to tap into a database (such as MySQL) running server side in order to handle authentication of users logging in, etc. Since you say you have familiarity with Java already, and Android is Java based, I would suggest you go with Java for the server application. A few things to look into to get started would be:
Socket Programming in Java:
http://docs.oracle.com/javase/tutorial/networking/sockets/index.html
Chat Client/Server Examples in Java here:
http://pirate.shu.edu/~wachsmut/Teaching/CSAS2214/Virtual/Lectures/chat-client-server.html
Also look into Java JDBC tutorials on Oracle's website (for interfacing Java with a MySQL server), and you will likely find that Android AsyncTask class will come in handy when you implement your Android client. It might be better to start with a pure Java client to get the server aspect working first and then move to an Android-based client. Once you establish some code you can make more refined posts here and gather more specific answers. Hope that helps and good luck.

Controlling your phone from laptop

Idea: create a remote control for your android phone.
Why: I like listening music on my phone in a dock station with speakers connected. Now sometimes I want to turn the volume up/down, change the song, etc. So I need to unlock the phone, locate app that is playing music (Music player, internet radio app, etc.). Sometimes I manage to undock the phone or just mess something up and generally this s*cks.
So I would like to control my phone (on a data connection, not wifi) from the laptop (on wifi).
I had investigated couple of approaches and would like to get some recommendations on them:
Use XMPP. This is nice as there a lots of free XMPP services I can use. Two libraries (both based on smack) that I tried work just fine (Flow aSmack port and Beem smack port). I could automatically create new user on device and present some id/password combination that I (user) would enter on a desktop side to link both devices.
Use JXTA. Should be the next real deal but could be an overkill. I would imagine running a rendezvous&relay server somewhere (need to get hosting to work around firewall/NAT) and creating a peer group protected with password. Use device unique id and password (withing group) to link to the desktop application. (A great eBook explaining p2p and JXTA can be downloaded from here).
Use C2DM. Could be the answer, but notification delivery sometimes can take more then couple of seconds to deliver and there would be no feedback mechanism.
So far first solutions looks like a lot easier choice. Create custom extension or just create chat between both endpoints and use that for relaying commands/messages. But I wonder if I would be abusing XMPP system?
JXTA sounds great, but from all the reading I done it is apparent that it is designed for group communication and service sharing and not a solution for connecting two endpoints.
What do you guys think? I welcome all suggestions too.
UPDATE I do not want to remote to a phone and interactively control it. I want to establish a connection (socket connection) between laptop and phone even if both of them are on different networks secured behind firewalls, routers. With this I could define a protocol to issue commands to the phone (lower volume, mute, start app, etc.).
UPDATE 2 I'm giving JXTA a shot. It is a nice solution but lack of documentation is a bit of a downer. Got VPS FreeBSD server to test RDV/relay side of things. I keep updating this question further as it may be helpful for others.
UPDATE 3 Some more reading:
How to make two android devices to communicate through TCP
Connection between two computers without opening ports using a third computer
UPDATE 4
So far I did not have enough time to further continue my project. I did find an interesting project. At the moment project owners are re-writing their library, you can track their progress here.
why do not you try installing VNC server on machine and then use VNC client on laptop to access mobile
Mobile Shell (Mosh) maybe just the tool you are looking for. I have been looking for a good project to use Mosh, your idea seems pretty interesting :)

Categories

Resources