0

我是这里的初学者,慢慢学习Python。我写了一个基于文本的 RPG 游戏,我正在寻找一种方法来创建它的网络版本。但是,我不想遵循在游戏中发生某些事情时生成 HTML 的方法(即玩家去不同的房间等)。从美学上讲,我想要一个带有嵌入式控制台的网页,它只运行我的文本 RPG 代码,并在此控制台下方有一个输入字段以允许用户输入。我应该为此使用哪个 Web 框架?

4

1 回答 1

0

if I understand you right you want to send the player's commands to the server asynchronously. I would suggest Pyramid because of a number of reasons:

  1. It is simple to use
  2. it is VERY well tested
  3. It is associated with a massive community of helpful people
  4. it is malleable - it does not make assumptions about what you want to do and so doesn't place restrictions on you in terms of, well, anything. You can pick your templating engine (or use more than one if you want), you can choose your database, you can choose how to talk to your database, etc

check this out:

http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/introduction.html

于 2012-12-13T12:47:11.757 回答