python的基于文本的rpg引擎。
pyadventure的Python项目详细描述
用python创建一个基于文本的rpg!
每天都有新功能!
当前功能:
- 玩家
- 敌人
- 地图
- 移动
即将推出:
- 战斗
- 库存
开始示例:
from pyadventure import pa class myGame(pa.Game): def MainLoop(self, player, world): while True: super().MainLoop(player, world) def setup(self): pa.m_print("Hello and welcome to my custom game!") pa.m_print("What is your name?") p = pa.Player(input()) pa.m_print("Hello, " + p.name + "! How big should the world be?") size = int(input()) w = super().GenerateWorld(size) self.MainLoop(p, w) if __name__ == "__main__": g = myGame() g.setup()