结合Java和nodejs的Andr​​oid应用nodejs、Java、oid、Andr

2023-09-05 07:35:39 作者:伤心※不如失心

我在努力的Andr​​oid游戏,这是基于转,而我选择Nodejs服务器端。我一直在探索了大约两个星期如何从Android客户端传送给Nodejs服务器。有没有办法在两者之间进行通信。

I'm working on Android game which is turn based, and I've chosen Nodejs for the server side. I've been exploring for about two weeks how to communicate from the Android client side to the Nodejs server. Is there any way to communicate between the two.

请帮助我,如果任何一个有这样一个项目的经验。

Kindly help me if any one have any experience with such a project.

推荐答案

有很多这样的事情取决于你的游戏需要为客户机和服务器之间的通信选项。比如查找TCP客户端Android版在这里显示出来像这的答案。如果快速更新服务器和客户端之间的重要的话UDP是一种选择,如果你的游戏可以应付在中间部分的数据包的丢失。

There are lots of options for something like this depending on what your game requires for communicating between client and server. For instance looking up "TCP clients for android" here shows up answers like this. If fast updates are important between server and client then UDP is one option, if your game can cope with the loss of some packets in the middle.

除了TCP / UDP你也有像的WebSockets 为Android。

Besides TCP/UDP you also have things like WebSockets for Android.

 
精彩推荐
图片推荐