如何为游戏设置 Android 对等网络?
因此,在了解如何在图像中制作透明度之后,我能够在我们的游戏中正确使用我的一些朋友的图像。我们的目标是让 3 个相邻的人可以一起玩游戏。这个想法是,你可以点击并击退一波又一波的小坏人。我有点击、射击、生成坏人和碰撞检测,但现在我想了解 Android 上的点对点网络?或者这不是你的社交方式?我完全错了吗?您将如何建立一个不超过 4 名当地人的基本网络?堆栈溢出说这是固执己见的,但我只是更好奇避免常见陷阱的方法以及如何解决这个问题。{
谢谢,
So after finding out how to make transparencies in my images, i was able to use some of my friends images properly for our game. Our goal was to have a game where 3 people who were next to each other, could play the game together. The idea was that you would point and click and fight off waves of little bad guys. I have the point and click, the shooting, the spawning bad guys, and the collision detection ,but now I want to learn about peer to peer networking on the android? Or is this not how you network? Am i completely wrong? How would you set up a basic network of no more than 4 local people? stack overflow said that was opinionated, but i was just more curious of ways to avoid common pitfalls and where to turn for this.{
Thank you,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有几种不同的方法可以做到这一点,这实际上取决于哪一种最适合您的情况。
There are a couple different ways you can do this, it really depends on which one is the best fit for your situation.
正如 dbryson 所建议的,您可以使用 WiFi Direct。但它仅适用于 OS 4.0 ICS 及更高版本。以下是一些链接:
http://developer.android.com/guide/topics/ wireless/wifip2p.html
http://developer.android.com/资源/样本/WiFiDirectDemo/index.html
As dbryson suggested, you can use WiFi Direct. However it only works for OS 4.0 ICS and higher. Here are some links:
http://developer.android.com/guide/topics/wireless/wifip2p.html
http://developer.android.com/resources/samples/WiFiDirectDemo/index.html