I am building an android game which is intended to be a multiplayer game. The goal is to have users with 10 to 20 or so units being able to control them and update their locations with the server. I have never done this type of thing with an android application, so I was curious.
What kind of speeds should I be expecting here?
What is the best way to h开发者_运维技巧andle this type of action?
I'm guessing I'm going to be sending some kind of request to my server (which will be PHP) with the current grid (x,y), type, target, and action of each particular unit.
I tried looking for some tutorials on this type of thing, but i'm not coming up with much. Any suggestions or insight would be awesome!
If you want a solution with one Server that every player connects to, you might want to use Sockets. But this shouldn't be done with PHP (but it can be).
Your clients will then send their Data over a OutputStream
to your Server, which will process them (do whatever is necessary) and then send them back to the other listening devices (using an InputStream
on the client side).
Unfortunately, you'll need a root-server to run your own server-program.
精彩评论