posted 10 years ago
I have made a game where you navigate a map and have to find an object. It is a very simple sprite game and now I want to now make it so that two players will communicate with each other so they can effectively race against each other.
The idea is to make one of the phones the "Server" and the other devices (as may make it for 3-4 players to play against each other) will connect to it and then when they have got the "item" send the time it took to complete to the server.
This will then wait for the others to complete the game and the collect the times. My question is how do I best run the bluetooth server socket in the background of the "Server" phone which will want to play the game as well as being responsible for collecting all the data.
I have read that using a service would be a good idea but I have never made one so not sure how communication between and activity and service would work.