Unity3D-向附近的其他手机发送消息 [英] Unity3D -- Send message to other mobile phones in the same vicinity
问题描述
说我们有一个10人的小组,彼此之间20m之内.每个人都有一部手机(iPhone/Android/Windows手机).
Say we have a group of 10 people, within 20m of one another. Each person has a mobile phone (iPhone / android / Windows phone).
然后一个人点击屏幕以发送消息.
And one person taps the screen to send a message.
这立即被其他人注册.同步是关键.它必须在几毫秒内击中所有目标设备.
And this is instantly registered by the others. Synchronisation is the key. It has to hit all target devices within a few milliseconds.
我该怎么办?
- 网络套接字:由于无法保证存在任何Wi-Fi网络,因此无法正常运行.也许我将一部电话设置为接入点,其他电话连接到它?
- 蓝牙:也许?
- 音频:也许,声音的速度可能接近足够的时间分辨率.但是很乱.
- 还有什么?
尽管在Unity3D中它允许移动插件,但我可以在每个平台上单独实现.
I'm working in Unity3D, although since it allows mobile plug-ins I could implement separately per platform.
仅使用iphone的解决方案仍然很有趣.
An iphone-only solution would still be of interest.
请不要只说使用蓝牙"
Please don't just say 'Use Bluetooth'
重新表达问题的一种方法:是否可以设置一堆手机,以便可以在它们之间发送UDP数据包? (Ad-Hoc网络?)
One way to rephrase the question: is it possible to set up a bunch of mobile phones so that UDP packets can be sent between them? (Ad-Hoc networking?)
链接: 在iOS中通过蓝牙在两个设备之间传输NSString 通过蓝牙在iOS和Android之间传输数据?
推荐答案
使用UNET可以创建一个运行UNET的专用服务器以及一个基于地理位置的聊天室.
Use UNET make a dedicated server running UNET and a chatroom for locations, based on geolocations.
这篇关于Unity3D-向附近的其他手机发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!