制作局域网象棋游戏需要帮助

发布于 2024-10-02 20:36:19 字数 426 浏览 6 评论 0原文

我是一名自学成才的计算机编程爱好者。我已经学习了 C、相当多的 Java,目前正在学习 Python。在我的大学,校园内有一个内部局域网,最近我突然想到制作一款国际象棋游戏,校园内的用户可以通过局域网来玩。

游戏只是有一个登录系统,用户可以使用他们的用户名和密码登录。登录后,他们会看到当前在线人员的列表。他们可以挑战任何玩家。被挑战的玩家将收到挑战通知,并可以接受或拒绝挑战。一旦被接受,两名玩家将进行一对一的国际象棋比赛(有时间限制)。我也希望玩家能够互相聊天。我想这样做并不是太难。 :)

虽然我以前也做过小游戏,但是从来没有一个可以联网玩的游戏。相反,我对制作这款游戏​​所涉及的网络概念不太了解。你们中的任何人都可以告诉我我需要学习什么才能提出这样的申请吗?

我知道使用 Jquery 和 AJAX 的 Web 应用程序很容易制作,但我想制作一个桌面应用程序。 提前致谢 :) 。

I am a self-taught computer programming enthusiast. I have learn C, quite a bit of Java and am currently learning Python. At my college there is an internal LAN within the campus and recently I was struck with the idea of making a chess game than can be played by users within the campus through the LAN.

The game would be simply having a login system, where user can login with their usernames and passwords. On logging in, they would see a list of people who are currently online. They can challenge any of the players. The challenged player whould be notified of the challenge and can accept or decline it. Once accepted, the two players would play a one-on-one chess game (with time limitations). I would also like the players to be able to chat with each other. I guess its not too difficult to do so. :)

Although I have made small games before, but never a game that can be played online. Rather, I don't have much idea about the concepts of networking that would go into the making of this game. Could any of you give me an idea what all do I have to learn to make such an application?

I know a web-application using Jquery and AJAX would me quite easy to make, but I would like to make a desktop application.
Thanks in advance :) .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷迭香的记忆 2024-10-09 20:36:19

拥有一个好的国际象棋引擎,您需要了解线程和套接字。因此,您应该创建一个用于侦听端口(套接字)的 UI,然后创建在线用户列表。然后其中之一应设置为服务器(以便运行国际象棋算法)并接收其他用户的输入并用新情况更新它们。

having a good chess engine, you need to learn about Threads and Sockets. so, you should create an UI for listening to a port (socket) and then create a list of online users. then one of them should be set as server (in order to run the chess algorithm) and receives other users inputs and update them with new situation.

能否归途做我良人 2024-10-09 20:36:19

如果您使用 C++,请查看 Raknet。它简化了 TJ 博士提到的许多事情,并提供了几个示例供您查看。如果您已经知道如何编写国际象棋游戏程序,那么使用 Raknet 这样的库使其成为多人游戏就很简单了。再次,看看这些例子,它应该会给你一个好的开始。

If you are using C++, take a look at Raknet. It simplifies a lot of the things that Dr TJ has mentioned and has several examples that you can take a look at. If you already know how to program a chess game, then making it multiplayer is trivial with libraries like Raknet. Again, take a look at the examples, it should give you a good start.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文