MUD编程问题
我曾经玩过基于 Smaug 代码库 的 MUD。它是高度定制的,但核心是相同的。我有这个 MUD 的源代码,并且有兴趣编写自己的源代码(只是为了一个有趣的项目)。不过,我有一些问题,主要是关于设计方面的问题。也许有人可以帮我?
- 我应该使用什么语言?解释的还是编译的?有什么区别吗? SMAUG 是用 C 编写的。我对很多语言都很熟悉,并且学习更多语言也没有问题。
- 我是否应该遵循某种特定的方法来不影响性能?面向对象、函数式等等?
- 我应该使用什么介质来存储数据?平面文件(这就是 SMAUG 使用的文件),或者类似 SQLite 的文件。两者的性能优缺点是什么?
- 有没有人知道如何开始这样的项目的指南?
我希望它能够扩展到允许 50 名玩家同时在线,而性能不会下降。如果我使用 Ruby 1.8(非常慢),与使用 Python 3.1(更快)或编译的 C/C++ 相比会有什么不同吗?
如果有人可以伸出援手并提供一些信息或建议,我将永远感激不已。
I used to play a MUD based on the Smaug Codebase. It was highly customized, but was the same at the core. I have the source code for this MUD, and am interested in writing my own (Just for a fun project). I've got some questions though, mostly about design aspects. Maybe someone can give me a hand?
- What language should I use? Interpreted or compiled? Does it make a difference? SMAUG is written in C. I am comfortable with a lot of languages, and have no problem learning more.
- Is there a particular approach I should follow to not hinder performance? Object Oriented, functional, etc?
- What medium should I use for storing data? Flat files (This is what SMAUG uses), or something like SQLite. What are the performance pros/cons of both?
- Are there any guides that anyone knows of on how to get started on a project like this?
I want it to scale to allow 50 players online at a time with no decrease in performance. If I used Ruby 1.8 (very slow), would it make a difference compared to using Python 3.1 (Faster), or compiled C/C++?
If anyone can lend a hand and give some info or advice, I'd be eternally grateful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会尝试一下:
这有点即兴,我确信会有不同意见。 :) 祝你好运!
I'll give this a shot:
This is a bit off the cuff , I'm sure there are dissenting opinions. :) Good luck!
这是一个基于文字的游戏,对吗?在这种情况下,使用当前的硬件,似乎您所需要担心的并不是意外创建 O(n**2) 算法。即使这样对于 50 个用户来说也可能不会太糟糕。
This is a text based game, right? In that case, with current hardware, it seems all you would have to worry about is not accidentally creating an O(n**2) algorithm. Even that probably wouldn't be too bad with 50 users.