BG开发者日志429:故事模式的思路

1、故事模式已有的一关试验关中,直接揭示了一些重要真相,白给了。

/原设计思路是玩家可以直接玩故事模式,很快就能通关本模式的所有关卡,知道所有真相。

/原表现方式是步行模拟,到地点看对话。

(现在看来,这几点都是很不合理的。

故事模式不是可有可无的东西,而是gameplay关卡之外的第二个主线,需要精心设计,需要闯关过程与视觉表现方式。)

-------

2、改为主角要保持一个失忆状态,需要懵逼。

真相需要严格的隐藏,逐步发现一点点,逐步揭开真相。

/故事模式本身不能直接玩,而是与普通模式进度挂钩,逐步解锁。

主线十章,对应故事模式的十关。

/剧情表现方式,除了步行模拟之外,需要强化视觉表现、弱gameplay的支撑,越麻烦越有价值。单纯看对话是懒汉做法。

----------------------

python 我想打开窗口显示html界面的内容,但是我把HTML和样式js,css都放在相同的路径,还是不能显示完整的HTML界面,这是我的代码,帮我修改一下,修改好完整的发给我 import tkinter as tk import logging import os import sys from tkinter import messagebox # 配置日志记录 logging.basicConfig(level=logging.DEBUG, filename='app.log', format='%(asctime)s - %(levelname)s - %(message)s') # 检查tkinterweb是否安装 try: from tkinterweb import HtmlFrame logging.debug("tkinterweb库导入成功") except ImportError as e: logging.error("tkinterweb库导入失败,请确保已安装: pip install tkinterweb", exc_info=True) messagebox.showerror("导入错误", "tkinterweb库未安装,请运行 'pip install tkinterweb' 安装") sys.exit(1) except Exception as e: logging.error(f"导入库时发生意外错误: {str(e)}", exc_info=True) messagebox.showerror("导入错误", f"导入库时发生错误: {str(e)}") sys.exit(1) class DynamicFaceApp: def __init__(self, root): try: logging.debug("开始初始化DynamicFaceApp") self.root = root self.root.title("软件卸载") self.root.geometry("720x460") self.root.configure(bg="#ccc") self.root.resizable(False, False) # 创建顶部标题栏 logging.debug("创建标题栏") header_frame = tk.Frame(self.root, bg="#ccc", height=40) header_frame.pack(fill=tk.X, padx=10) header_frame.pack_propagate(False) # 创建标题栏按钮 close_btn = tk.Button(header_frame, bg="#a43", width=2, height=1, bd=0, relief=tk.FLAT, command=self.root.quit) close_btn.pack(side=tk.LEFT, padx=5) minimize_btn = tk.Button(header_frame, bg="#cb3", width=2, height=1, bd=0, relief=tk.FLAT, command=lambda: self.root.iconify()) minimize_btn.pack(side=tk.LEFT, padx=5) maximize_btn = tk.Button(header_frame, bg="#6a4", width=2, height=1, bd=0, relief=tk.FLAT) maximize_btn.pack(side=tk.LEFT, padx=5) # 创建标题 title = tk.Label(header_frame, text="软件卸载", bg="#ccc", font=('SimHei', 12)) title.place(relx=0.5, rely=0.5, anchor=tk.CENTER) # 创建主体内容 logging.debug("创建主体内容框架") body_frame = tk.Frame(self.root, bg="#ccc") body_frame.pack(expand=True, fill=tk.BOTH, padx=40, pady=20) # 创建HTML显示组件 logging.debug("创建HTML渲染组件") self.html_frame = HtmlFrame(body_frame, horizontal_scrollbar="auto", vertical_scrollbar="auto") self.html_frame.pack(expand=True, fill=tk.BOTH) # 尝试加载HTML文件的可能路径 possible_paths = [ os.path.join(os.path.dirname(os.path.abspath(__file__)), "index.html"), os.path.join(os.path.dirname(os.path.abspath(__file__)), "笑脸动态代码", "index.html") ] html_path = None for path in possible_paths: if os.path.exists(path) and os.path.isfile(path): html_path = path break if html_path: logging.debug(f"找到HTML文件: {html_path}") try: logging.debug("尝试加载HTML文件") html_content = open(html_path, 'r', encoding='utf-8').read() base_dir = os.path.dirname(html_path) # 替换相对路径为绝对路径 html_content = html_content.replace('href="styles.css"', f'href="file:///{base_dir.replace(os.sep, "/")}/styles.css"') html_content = html_content.replace('src="script.js"', f'src="file:///{base_dir.replace(os.sep, "/")}/script.js"') self.html_frame.load_html(html_content) except Exception as e: error_msg = f"加载HTML文件失败: {str(e)}" logging.error(error_msg, exc_info=True) self.show_error(body_frame, error_msg) else: error_msg = f"未找到HTML文件,已尝试路径: {possible_paths}" logging.error(error_msg) self.show_error(body_frame, error_msg) except Exception as e: error_msg = f"初始化界面失败: {str(e)}" logging.error(error_msg, exc_info=True) messagebox.showerror("初始化错误", error_msg) self.root.after(5000, self.root.quit) # 显示错误后5秒自动退出 def show_error(self, parent, message): """显示错误信息""" error_label = tk.Label(parent, text=message, bg="#ccc", fg="red", wraplength=400, font=('SimHei', 10)) error_label.pack(expand=True, padx=20, pady=20) # 同时显示消息框确保用户看到错误 messagebox.showerror("加载错误", message) if __name__ == "__main__": try: logging.debug("程序启动") root = tk.Tk() app = DynamicFaceApp(root) root.mainloop() except Exception as e: error_msg = f"程序运行失败: {str(e)}" logging.error(error_msg, exc_info=True) messagebox.showerror("程序错误", error_msg) print(error_msg) # 让控制台保持打开状态以便查看错误 input("按Enter键退出...") raise
07-01
(myenv) C:\Users\shaopeng.qi>python D:\ccccode\人文建设\get.py INFO:get:共享盘根路径配置: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 INFO:get:根路径存在: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 INFO:get:应用启动 - 监听地址: 0.0.0.0:5001, 调试模式: False INFO:get:共享盘根路径: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 * Serving Flask app 'get' * Debug mode: on INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5001 * Running on http://10.8.224.248:5001 INFO:werkzeug:Press CTRL+C to quit INFO:werkzeug: * Restarting with stat INFO:get:共享盘根路径配置: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 INFO:get:根路径存在: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 INFO:get:应用启动 - 监听地址: 0.0.0.0:5001, 调试模式: False INFO:get:共享盘根路径: \\isi-sh\SCM\scm-rf-pdm\00-班组管理新\00-班组管理\04-团队建设\14-班务通充电站素材\模块封面\团体活动 WARNING:werkzeug: * Debugger is active! 访问生成的链接,没有跳转到相应主题的展示的界面 INFO:werkzeug:10.8.224.248 - - [12/Jul/2025 14:43:04] "GET /photo-wall.html?topic=团队建设 HTTP/1.1" 200 -
07-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值