Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling.long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

--

SOAP web services is probably the best place to start (link), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.

For consuming SOAP web services on Android, I'd look herehere.

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

--

SOAP web services is probably the best place to start (link), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.

For consuming SOAP web services on Android, I'd look here.

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

--

SOAP web services is probably the best place to start (link), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.

For consuming SOAP web services on Android, I'd look here.

added 550 characters in body
Source Link
Nate
  • 5.1k
  • 2
  • 31
  • 46

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

--

SOAP web services is probably the best place to start (link), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.

For consuming SOAP web services on Android, I'd look here.

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.

--

SOAP web services is probably the best place to start (link), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.

For consuming SOAP web services on Android, I'd look here.

Source Link
Nate
  • 5.1k
  • 2
  • 31
  • 46

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.

In order to provide updates in near real-time, I recommend you look into long polling. The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.

In terms of what data should you send back, always treat the client as hostile. The client should send whatever its "turn-state" is, the server validates it, and then if everything checks out, it sends the new "game-state" back to all connected clients.