-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这个可以用来制作rpg游戏中的小镇地图吗 #2
Comments
Thank you for your interest! We are currently working on extending our CityGen with more features. And we will definitely take your suggestions into consideration, stay tuned! |
我试着用如下基于随机和矩形密度分布的部分,把NPC们的房子选址问题转换成一个优化问题,因为我发现实际上LLM很难处理这种逻辑问题,但是下面的代码非常粗糙,我很好奇你们的工作能不能用在rpg游戏的地图自动生成上 import time 设置支持中文的字体plt.rcParams['font.sans-serif'] = ['SimHei'] # 例如使用黑体 openai.log = "debug"openai.api_key = locations_descriptions=[] for i in range(3):
转换为JSONlocations_json = json.dumps(locations_descriptions, ensure_ascii=False, indent=4) 读取现有的JSON文件json_file_path = r"J:\xxoo\fanyi\locations.json" # 确保这是现有文件的正确路径 try: 将新的描述添加到现有的数据中existing_data.extend(locations_descriptions) 将更新后的数据写回文件with open(json_file_path, 'w', encoding='utf-8') as file: print(f"JSON file saved at: {json_file_path}") import matplotlib.pyplot as plt def create_rotated_rect(center, width, height, angle): def does_rect_overlap(rect, other_rects): 假设 characters 列表已经包含了角色信息和居所位置characters = [{'name': f'NPC{i}', 'residence': {'location': (random.randint(0, 49), random.randint(0, 49))}} for i in fig, ax = plt.subplots(figsize=(10, 10)) for character in characters:
ax.set_xlim(0, 50) |
方便从我的主页添加我的微信吗,我们可以进一步交流 |
你好,加了 |
似乎是需要用一些地理信息,从地理信息中作信息增强得到一些合理的额外信息來建模整个城市中的建筑物,想知道如果我们只有一些NPC的建筑物的文本描述和这些NPC的建筑物的坐标在这个基础上可以做类似的事情吗
The text was updated successfully, but these errors were encountered: