开发者

Android game networking

开发者 https://www.devze.com 2023-01-22 06:47 出处:网络
I need help finding the best method for networking in a multiplayer game.I want to connect to a phone and maintain the connection until the game is over, hosting the game on one of the phones.There ar

I need help finding the best method for networking in a multiplayer game. I want to connect to a phone and maintain the connection until the game is over, hosting the game on one of the phones. There are other threads, but none of them really explain how to connect or use the networking, only saying to use such-and-such library. Examples or links to good tutorials would b开发者_运维技巧e extremely helpful.


You have to options: TCP/IP sockets or Bluetooth.

For TCP/IP socket there is a good discussion on "Thinking in Enterprise Java" by Bruce Eckel, you can access the digital edition for free (see chapter 2).

Fro bluetooth there is a tutorial on the android developer website. Just be advised that peering between phones is supported only starting from android 2.0.

0

精彩评论

暂无评论...
验证码 换一张
取 消