如何使多人游戏 [英] how to make Multiplayer Game
问题描述
我已经知道的Android编程的基础,尤其是那个在比赛。现在我想试试多人游戏。但我没有任何有关多人游戏的背景。所以我想有一些问题:
I already knew the basic of android programming, especially the one at game. now I want to try multiplayer game. but I dont have any background about multiplayer game. so I want have a number of question :
- 什么是多人编程的基本?
- 如何多人的通信方法?应该是蓝牙?或者客户端 - 服务器?或者对等?如果进行必要,我希望游戏2 android手机靠近对方?
- 我应该知道,以了解这多人?
- 有没有关于如何使多人游戏的任何基础教程?
- 可以在Android手机充当服务器?
我不打算做任何复杂的游戏呢。可刚多人打井是正常的我。最重要的是,我明白了多人游戏编程的基本。 :)
I don't plan to make any sophisticated game yet. may be just multiplayer tic tac toe is alright for me. the most important is that I understand the basic of multiplayer game programming. :)
推荐答案
我想给这个系列的文章读:
I would give this series of articles a read:
<一个href="http://gafferongames.com/networking-for-game-programmers/">http://gafferongames.com/networking-for-game-programmers/
这主要是在C / C ++,但你可以将其转换为Java。了解有关Java的UDP套接字,例如:
It's mostly in C/C++, but you can translate it to Java. Learn about UDP sockets in Java, for example:
<一个href="http://download.oracle.com/javase/tutorial/networking/datagrams/index.html">http://download.oracle.com/javase/tutorial/networking/datagrams/index.html
这应该足以让你去。我可能会做客户端 - 服务器设置。你可以做P2P但它是从我所听到的困难。
This should be enough to get you going. I would probably do client-server setup. You can do P2P but it's harder from what I've heard.
这篇关于如何使多人游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!