简体   繁体   English

Andengine蓝牙

[英]Andengine Bluetooth

I am new to android gaming development. 我是android游戏开发的新手。 After too much of research I have found Andengine is the best to work with for freshers. 经过大量的研究,我发现Andengine是最适合初学者使用的工具。 But my game involves connectivity over bluetooth. 但是我的游戏涉及通过蓝牙进行连接。 Can anyone tell me whether andegine supports bluetooth api or not? 谁能告诉我andegine是否支持蓝牙api? if yes please share the link. 如果是,请共享链接。

I have an Andengine game using bleutooth for multiplayer features. 我有一个使用蓝牙实现多人游戏功能的Andengine游戏。 In theory it's fairly easy. 从理论上讲,这很容易。 You just need to implement it jult like the "bluetooth chat" example. 您只需要像“蓝牙聊天”示例一样实现它即可。 See here: https://android.googlesource.com/platform/development/+/eclair-passion-release/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java 参见此处: https : //android.googlesource.com/platform/development/+/eclair-passion-release/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java

And then integrate it to your game. 然后将其集成到您的游戏中。 When one player sends a message, the other one will scan the message for possible matches which are mapped to specific actions. 当一位玩家发送消息时,另一位玩家将扫描该消息以查找可能匹配到特定动作的比赛。

eg If message = "jump" make call the jump function 例如,如果消息=“跳转”,则调用跳转功能

You will need to look further into the bluetooth chat example and figure out how to integrate it to your application. 您将需要进一步研究蓝牙聊天示例,并弄清楚如何将其集成到您的应用程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM