做一款浏览器 3D 大逃杀,最多 10 人,用 MQTT 联机,不要自建游戏服。 联网: ws:/...

تم الإنشاء في: ٩ سبتمبر ٢٠٢٦

تمت الإجابة باستخدام GPT-6 Pro بواسطة Chat01

سؤال

做一款浏览器 3D 大逃杀,最多 10 人,用 MQTT 联机,不要自建游戏服。

联网:
ws://112.126.64.150:8083/mqtt
账号 mqttgame
密码 MqttGameea5a3b32ae47
路径 /mqtt

玩法:
大厅创建/加入房间,每个房间只要有1人随时可以其他人加入pk。跳进一张能跑能藏的小地图,缩圈,搜打撤,最后活下来的赢。第三人称,可开镜。中文 UI。

开局可选武器(必须平衡,各有短板,没有绝对最强):

  • 步枪:中距稳,身法一般
  • 冲锋枪:近战快,远了废
  • 霰弹:贴脸狠,出了近距没用
  • 狙击:远距一击,近身极差、开镜慢
  • 手枪:灵活但伤害低,适合残局补枪

开局自带所选武器和基础弹药,地图上还能捡护甲、医疗、投掷物、备用弹药。不要技能树、载具、建造。

手感要比教学 Demo 狠:能开枪、能掉血、能击杀、能缩圈、能看还剩几个人。两个浏览器窗口必须能互打。掉线清人,别留幽灵。

技术别堆框架,Vite + Three.js + mqtt.js 就够。视觉阴冷霓虹贫民窟,别做成彩色胶囊人演示。

الفكرة

Deciding on architecture

Determining game architecture, deciding on live MQTT testing, and establishing precise rules for gameplay dynamics. This involves live network container evaluation and MQTT setup.

Converting characters

Thinking through how to efficiently manage both ASCII and Unicode characters, including Python and shell commands for extensive Chinese text. Progress is steady and innovative.

Wondering about budget changes

I'm thinking about increasing the budget and its impact on not using the npm network registry, while possibly setting up a proxy environment for external container downloads.

Assessing development needs

Noticing the broad task of creating 60,000 tokens with potential updates. Evaluating network and sanitization methods.

Ensuring network access

OK, let me see—I'm focusing on practical container network IP configurations and considering potential issues with network disablement.

Harnessing npm cache

Maximizing offline npm cache usage, progressing towards enhanced efficiency.

Examining dependencies

I’m evaluating artifact tool node packages for internet dependencies. Considering remote web text access and downloading external files via the container.download method.

Evaluating proxy usage

I’m assessing the feasibility of an offline npm installation in a Python setup, particularly focusing on accessing three.js files and managing external plugins.

Investigating network issues

I'm looking into the network download, noting inconsistent system summaries. Progressing through each module now.

Analyzing network constraints

I'm examining network-disabled containers, web-crawled JS, and cached npm packages. Progress includes parsing raw data and considering CDN imports for testing JavaScript.

Managing offline npm packages

I'm piecing together an offline npm setup, ensuring continuous access to dependencies without relying on network connections.

Crafting a fallback

I'm working on a fallback 2D CSS lobby for a 3D dynamic module to ensure UI testing without dependencies.

Setting up the environment

I’m detailing the start of a map with deterministic rules, collision handling, and movement mechanics, along with authority simulation and player mechanics.

Testing and validating

I’m ensuring the simulated server's vertical movement is accurate and aligns with client expectations. Progressing through reconciliation, aiming adjustments, and smooth camera rendering using fixed tick rates.

Validating shooting accuracy

I'm confirming the server checks the player's angle deviation and distance to the hit point, ensuring precise shooting mechanics.

Examining mechanics

I’m analyzing game mechanics including ammo replenishment, grenades, and zone dynamics. The game integrates competitive elements and extraction mechanics.

Evaluating tactical options

I’m thinking through the use of extraction pads for retreats and evacuations, ensuring they optimally facilitate safe withdrawals and loot conservation.

Navigating MQTT complexity

OK, let me see: Using UUIDs per page to prevent conflicts. Subscribing to topics for presence and state updates. Absorbing the need for offline topic management.

Facilitating player interaction

I’m working through joining and communicating game events, managing commands, tracking movements, and ensuring authoritative game state updates. Progress is steady, focusing on synchronization and player management.

Refining reconnect strategy

I'm improving the disconnection and reconnection process, ensuring correct state restoration and handling potential unique identifier issues to prevent cheating.

Testing setups
I’m testing various aspects of Vite optimization and web socket connectivity, including production mode and browser control setups. Potential for a comprehensive network test doesn’t look promising.

Modifying permissions

I’m making an attempt to adjust directory permissions for a Python container setup. This task involves changing the permissions to root ownership.

Re-executing Python code

Fixing token issues and ensuring variables and helpers are defined. Writing the package failed due to missing files.

Ensuring collision stability

I’m working on refining collision functionality to prevent characters from getting stuck mid-jump and enabling smoother landings and movement. This includes enhancing moveBody and managing jump and fall interactions.

Evaluating network modules

I'm mapping out various network modules like LocalTransport and MqttTransport, considering offline capabilities, robustness, and dynamic imports. Offline practice might be essential.

Understanding transport events

I’m thinking through MQTT transport events: connecting, connecting lost, and subscribed. The mqttDisconnect: potential action can’t be triggered during network listสร้าง.

Analyzing network protocols

I’m mapping out network behavior: publishing presence, managing UIs during page unloads, and gracefully handling client exits. This approach ensures efficient protocol management and smooth operation.

Polling for state

I’m working through how the host keeps its online state fresh by polling for state updates and sending snapshot events periodically.

Allocating development tasks

Creating test modules to catch logic errors early and define project scope. Using CSS and dark mode accents for UI.

Enhancing the connection

Working on flawless connectivity integration for MQTT transport, ensuring seamless retries and error handling, with a dynamic room list and secure connections.

Mapping out procedural textures

Crafting a dark city scene, combining procedural textures for materials like brick and asphalt, and integrating neon signs and character avatars to bring it all to life.

Setting up visual ambiance

I’m detailing the visual elements: a cylindrical world zone, glowing collectibles, grenades' effects, and explosion dynamics, ensuring consistency with hardware limitations.

Crafting the camera

Piecing together the camera settings, mixing local position smoothing with shoulder and height offsets, and ensuring sniper views are well-placed for a seamless gameplay experience.

Gathering game elements

I’m gathering info on various game visuals and mechanics, like the scope UI, range ticks, and camera movement, to enhance the overall gaming experience.

Pulling together

I’m aligning GPU and renderer requirements, addressing task dependencies and integration nuances.

Refining ammo prediction

Balancing optimistic ammo decrement to prevent misfire. Using predicted mags until snapshot acknowledged ensures a more responsive user experience.

Engaging logic and mechanics

I'm piecing together hops and aiming mechanics from players' interactions, considering WorldStats for judge handling and movement fragmentation scaling effects.

Investigating game behavior

I’m gathering info on player transitions, UI interactions, and HUD elements to ensure a seamless game experience. Progress is evident in automating functionality and enhancing player guidance.

Integrating sound elements

I'm adding audio features like gun shots, footsteps, and ambient sounds to enhance the immersive experience, using WebAudio and local storage for settings.

Crafting the table

I’m working through theoretical DPS to guide config tweaks, considering test hooks and UI tweaks for balanced bots.

Crafting and aligning

I'm coding a session-based game, ensuring events synchronize with the view's readiness and managing network statuses effectively. Progress is steady and methodical.

Define actor actions

First, actors are instructed to move towards their assigned locations without engaging in combat.

Tracking progress

I’m keeping tabs on timestamp500 to manage reloads and hits. Now that the HUD is active, I’m working through trigger predictions, avoiding stuttering, and ensuring smooth updates.

Managing network interruptions

  • Handling offline status and reconnecting.
  • Updating UI and controlling player actions during net offline.

Navigating MQTT transport

I’m analyzing the MQTT transport bug, addressing import issues, async loading, caching, and error handling. Ensuring UI settings apply correctly and weapon card descriptions balance properly.

Setting up the environment

I'm ensuring data load, validating URL settings, and managing sessions for a game using MQTT for real-time updates.

Testing game mechanics

I’m curious about weapon loadout functionality, including recoil and ammunition consistency. Ensuring mod-supported weapons don't break upon activation.

Assessing security and dependencies

Mapping out security, avoiding fake previews, testing network interaction, and securing critical checkpoints such as accurate screen captures and dependency management.

Taking a closer look

OK, let me see. The angle is adjusted to perfectly align with the target's height, ensuring a precise shot.

Honing server accuracy

I’m piecing together migration authority timing, clock skew tests, and graceful leave handling to boost server precision. Progressing smoothly!

Managing MQTT connections

I’m noting the sequential and dependent MQTT subscription and publishing steps, including event handling and snapshot application. Notably, the test for split brain recovery and domain validation is crucial.

Assessing event joining

I'm examining the ability to join events in progress, determining if it presents any problems. Interestingly, specific error handling and event validation are crucial.

Fixing loot and colliders

I’m addressing loot placement within the workshop, ensuring objects like benches have proper colliders for physics interactions. Improving high cover mechanics to optimize movement and engagement dynamics.

Ensuring movement precision

Wrapping my mind around the mechanics, vertical adjustments and horizontal movements take constant boundaries into account to ensure smooth transitions within the constraints of the environment.

Evaluating network issues

Testing network connectivity, addressing Python hooks, and considering browser networking with CDN.

Script review

I’m checking the script output and ensuring accurate screenshot capture. Noting any browser inconsistencies and firewall issues. Each point is a step closer to a methodical completion of the task.

Requesting specific command

Managing network security

Navigating local file adjustments with page.gate and allow-file-access-from-files for streamlined module imports.

Testing physics behavior

I'm thinking through the physics and collision dynamics within a 3D environment, ensuring accurate movement and interactions before deployment. Progress is steady, and I'm mapping out the logical checks needed for validation.

Ensuring compatibility

I’m working through integrating WebSocket brokers and verifying the necessity for a static Vite preview, ensuring security and credentials are meticulously aligned with policies.

Revisiting spawn zones

I’m setting up late join mechanics so new players parachute outside the safe zone, ensuring no disruptive impact on the match.

Pulling together

I'm aligning the third-party changes with our systems, layering in test node requirements, engine validation, and source metadata review.

Crafting the foundation

Combining scripts, data, and styles into a coherent single HTML. Applying OpenAI's policy on minimizing external requests.

Updating Vite for security

Reviewing library versions

I verified the usage of Playwright 1.55.0 and Chromium for the security audit, ensuring they are the latest stable versions.

Adjusting muzzle origin

Tweaking the game aiming mechanics for a more immersive experience by anchoring muzzle movement to the weapon model's world position and refining trace origins and occlusions.

Piecing together graphics

I’m optimizing renderer fallback and scene setup. Adjusting visual effects and ensuring uniform network testing.

Testing connections

I’m gathering info on testing server connections to ensure reliability and debug effectively, specifically with MQTT protocols and client reconnections.

Crafting gameplay dynamics

Piecing together combat sequences and shooting patterns, ensuring smooth transitions and accurate host migrations.

Testing connectivity

I'm evaluating the stability of network connections, ensuring all tests are completed successfully within specified limits, and documenting steps clearly for future reference.

Identifying issues
I noticed bugs across various sections, including placeholder math models, world movement validations, and view tracing. Resolving these will enhance code clarity.

Evaluating potential risks

Identifying subpar command sequence validation, ignoring duplicate fields, and only soft clearing states.

Clarifying audio expectations

I'm addressing remote footsteps, ensuring local state tracks enemy positions without resorting to networking commands. This setup leads me to refine audio event triggers per actor movement.

Balancing gameplay mechanics

I'm weighing the shotgun's one-shot potential versus its drawbacks, especially with armor. Sniper recoil and weapon mechanics are also up for discussion.

Mapping out network protocols

I'm detailing reconnection strategies, bandwidth management, and latency mitigation, ensuring smooth game experiences across variable conditions.

Tracing performance

OK, let me see: I’m thinking through page wait times, simulation delays, host throttling, and state migration. Progressing through each aspect methodically.

Assessing connectivity

Wondering about network idle states, CDN blocks, and import timeouts. This leads to considering fallback strategies and scripting issues.

Navigating dependencies

I’m working through the integration of a 3D rendering project with Source OK, ensuring all necessary dependencies are satisfied for a successful incorporation.

Laying out the options

I'm sorting through game mechanics, inventory limits, and player protocols. This calls for careful balancing of strategies for a robust game system.

Analyzing viewport layout

I’m working through a viewport layout, refining sections and adjusting design principles to ensure a cross-platform layout adapts seamlessly to various screen sizes and devices.

Examining the image

Searching exact URL

I'm mapping out the specific URL for "three.js" package via UNPKG, but facing a possible 307 redirect error.

Mapping the timeline

Taking a closer look at the past work effort. Will finish essential QA shortly. Okay, let me see, let’s stick to verified networks. Testing game runtime is a top priority. Finally, I’ll confirm all download API URLs are accurate.

Organizing work details

I'm gathering details on tasks and browser features, emphasizing clarity and efficiency.

Grasping the context

Examining the broader picture to capture all relevant aspects. This approach helps avoid overlooking critical nuances and ensures a more comprehensive understanding.

Clarifying subscription priorities

I’m finalizing subscription settings for optimal performance. Specifically, I'm focusing on priority and reliability.

Addressing code integrity

I'm working through code quality, focusing on preventing broken or incomplete deliveries. Ensuring meaningful input and thorough testing is crucial for robust, error-free software.

Taking a closer look

I’m examining JavaScript code. Ternary operator behavior suggests sniper?.00065:.00125 simplifies to .00125.

Mapping out next steps

I’m thinking about eliminating distractions and unnecessary loops. The last patch should include a standalone file with THREE import and dynamic config environment.

Crafting repository

I’m piecing together the repository details, including a brief README, weapon table, and addressing permissions.

Navigating development needs

OK, let me see. Creating a comprehensive game, respecting privacy, and ensuring security. Progress is steady, but more work is ahead.

Ensuring code quality

I’m sifting through code, identifying networking and usability issues, and verifying authentication procedures to ensure everything runs smoothly.

Gathering information

I'm pulling together the final package and ensuring all referenced syntax and files are correctly included. This involves detailed checks and creating the source zip file.

Preparing for testing

I’m organizing files, including a ZIP and HTML, for final testing. The main features are highlighted, and credentials are configured. Allied documentation covers essential environment details and testing commands.

Worked for 30m 32s

الإجابة

《雾港 / 最后信号》源码已打包

下载完整项目 ZIP
中文启动说明 · 测试记录与联机验收清单

技术栈是 Vite + Three.js + mqtt.js + 原生 JavaScript。你提供的 MQTT 地址、账号、密码及 /mqtt 路径已配置。

启动

使用 Node.js 22.12 或以上版本,解压后执行:

bash
cd fogport npm install npm run dev

然后用两个独立浏览器窗口打开:

text
http://localhost:5173

窗口 A 创建房间,窗口 B 输入六位房间码加入,两边分别点击「继续行动」锁定鼠标。单人先进入时可以跑图、搜集;第二人加入后开始生存战,之后仍允许中途加入,最多 10 人。

项目包含

  • 战斗与回合: 第三人称、右键开镜、换肩、疾跑、蹲伏、跳跃;射击、身体/头部命中、护甲吸收、扣血、击杀、观战;四阶段缩圈、存活人数、胜负结算及自动下一局。
  • 武器与搜集: 五类起始武器及基础弹药,分别设置射速、散布、衰减、移动速度、开镜时间和换弹时间。地图可拾取护甲、医疗、手雷和弹药,拾取统一判定,避免重复领取。狙击设为无甲身体一击、满甲需爆头,以慢开镜和差腰射限制近身能力。
  • 地图与表现: 可进入的街边店铺、窄巷、集市和高低掩体;程序化湿路、雨雾、中文霓虹招牌、旧楼管线;战术装备网格人物,而非彩色胶囊。包含枪口、弹道、命中反馈、后坐与程序音效。

联机采用玩家浏览器担任裁判、MQTT 负责中继:统一处理命中、血量、物资和胜负,并实现心跳超时清人、MQTT 遗嘱、重连及房主掉线接管。Vite 不承担游戏裁判逻辑。

验证情况

41 项自动化测试通过,0 项失败。 覆盖双方射击与击杀状态一致、短点击触发、十人上限、拾取竞争、断线清理、房主接管、重连恢复和旧回合消息拒绝。另完成三种桌面尺寸的界面及操作流程检查。

尚未完成真实公网双窗口联调和完整 WebGL 实测。 当前执行环境无法下载 npm 依赖或访问指定 MQTT 地址,因此没有验证 Vite 构建、真实 Three.js 场景运行及该 Broker 的实际连接权限。网络测试使用内存消息总线,界面检查替换了渲染器和网络层;不能把这些结果当作真实联机已通过。

你给的是 ws://,先按上述 HTTP localhost 方式运行;部署到 HTTPS 时需要可用的 WSS 端点,否则会遇到混合内容限制。(MDN Web Docs)

另外,这个浏览器裁判架构适合好友局,不具备竞技级防作弊能力;客户端连接凭据也是可见的,公开发布前应更换凭据并限制 Broker 主题权限。

سؤال

1.生成脚本一键游玩,不需要写代码。
2.游戏开始时候自动锁定鼠标或者加一个锁定鼠标的按钮,不然动不了
3.人物更灵活一点

الفكرة

Assessing progress

I’m examining the remaining 27k tokens for the zip real project, reviewing the necessary skills, and ensuring the container project is thoroughly checked.

Packing node binaries

I'm thinking about bundling portable Node.js binaries (30MB zip) in the launcher for offline work. The goal? Simplifying setup and ensuring smooth operation.

Examining the issue

It's interesting to see that the challenge is about robustly resetting time tokens. I'm thinking through methods like npm asset retrieval via web URLs or prebundled caches. Progress depends on examining caches and bundled dependencies availability.

Organizing resources

I’m gathering npm package names and system libraries in /opt/nvm/lib/node_modules for efficient caching to make judicious use of our abundant tokens.

Recharging my approach

Thinking through continuous efforts and tool use, but managing them carefully.

Evaluating resource needs
I’m noting the necessity of accessing and downloading a large context, focusing on the advisor's role.

Harnessing npm's power

We need a solution that leverages npm for self-bootstrap, allowing one-click setup and automated downloads, avoiding delays from prebundling.

Ensuring stability

I'm verifying the integrity of Node.js and npm installations using official sources and comparing hashes to prevent supply chain risks.

Crafting the interface

I'm constructing a Chinese UI with Python scripts, using \u escapes for HTML unicode. This ensures accurate representation across languages.

Consulting policies

Working through HUD elements and controlling inputs effectively, ensuring a user-friendly interface with consistent status updates. Balancing weapon speeds for optimal gameplay.

Refining jump mechanics

I’m gathering info on jump mechanics, considering buffer integration, detaching, and discrete time steps. Progressing towards better implementation details for a stable experience.

Refining mechanics

I’m adjusting character mechanics, including grounded and aerial movements, sprinting stamina, and collision handling. Enhancing control and prediction to balance realism and playability.

Adjusting game settings

I’m tweaking camera FOV, sprint lean, and aim responsiveness to ensure smoother gameplay. Testing with play.mjs might need some runtime checks on the server.

Ensuring security

I'm working through npm installations, focusing on registry options and package validation. Avoiding duplicate builds and maintaining consistent environment paths are key considerations.

Examining window behavior

Investigating how window.open clones sessionStorage, causing duplicate tabs to share the same client ID.

Crafting pointer control

I’m outlining a Python script to manage pointer capture. It handles pointer lock requests, releases, and errors, with a focus on safety and unit testing.

Revising gameplay mechanics

I’m adjusting the gameplay mechanics for requestLock calls, ensuring locking state transitions are handled smoothly and synchronously to optimize player experience.

Analyzing test assumptions
I'm examining if the test is built on the protocol's compatibility and the protocol2's provisions.

Assessing impact

Looks like the cost of resetting the context is minimal. Progressing to actual code implementation.

Setting up and scripting

I’m gathering info on setting up Node.js on Windows and ensuring proper script execution on various systems, including handling Chinese filenames and Unicode constants.

Setting parameters

OK, let me see. Create functionGet-WithRetry to handle retries and use Invoke-WebRequest to download and save files. This approach ensures smooth handling of download tasks.

Verifying dependencies
I’m ensuring the system checks for required tools like curl or wget, confirming the correct version of Node.js via SHA manifests, and verifying the tar extraction process.

Ensuring build integrity

I’m verifying the build version fingerprint, dependencies, and autoinstallation of node_modules to ensure smooth server startup and accurate health checks.

Addressing PowerShell quotes

Mapping out PowerShell's handling of quotes in native commands, simplifying node execution, and aligning behavior with legacy systems.

Testing browser functionality

I’m thinking through how to implement and test static HTML and bootstrap offline logic, using Playwright for browser control and realChromium headless for pointerlock events.

Verifying UI elements

Ensuring the user interface is accurate while refraining from overcomplicating the process with unnecessary features.

Refining the process

Piecing together the final real-pointer tests with explicit substitutes, gathering three.js from python-trimesh, ensuring node artifact has valid threepack versions, automating dependency downloads, and verifying npm versions against the official catalog.

Crafting the setup

I’m assembling a browser script to simulate UI interactions, addressing browser and server compatibility, and planning to test various player movement and input scenarios.

Simulating interactions

Testing HTMLCanvasElement with pointer lock, covering error handling, viewport sizes, and cross-browser context. Using Playwright for browser automation.

Strategizing content rewriting

I'm working through rewriting the web page content, favoring data URLs and modules. This method avoids network access, testing both user and browser behavior, and ensuring security settings are aligned.

Navigating updates

I’m assessing node mirror configurations, adjusting protocols, and planning extensive tests. Delving into network setups and dependencies, aiming for smooth transitions and thorough validation.

Reworking storage solutions

I'm refining how storage works in simulations, using dynamic Blob URLs for JS scripts. This involves recovering files, securing imports, and replacing modules for simplicity.

Setting up workers

I’m piecing together server and worker configurations, ensuring the main URL search is error-free and that onerror assignments are scheduled correctly.

Inspecting browser results

Evaluating browser results is key to determining if a count of 20 is on track.

Validating package integrity

I’m testing the robustness of the first-install script to handle various issues like cached reuse, port conflicts, and encoding. Unit tests and staged builds are also being considered.

Consulting OpenAI's guidelines

I’m ensuring the README stays concise, avoiding repetition, and updating sections and paths.

Strategizing fixes

I’m pinpointing bugs related to jump sequence resets and handling networked inputs, ensuring smoother gameplay mechanics.

Ensuring compatibility

I'll make sure the final artifact link is accurate and test various systems, including servers and npm dependencies, to verify compatibility. Progress is steady!

Anticipating SNIRgear's debut

I’m getting ready for SNIRgear's upcoming debut. It’s intriguing to see how customers and partners perceive its potential and usability.

Organizing test files

Copying script files, package.json, and static assets to a temporary directory for node script testing.

Scaling server efficiency

I'm pulling together strategies to ramp up server efficiency, considering features like event loop management and performance testing to ensure optimal performance.

Updating documents

I’m working through updating the documentation for version 1.1, preserving historical details, and ensuring clarity in new UI changes and developer guidelines.

Wrapping up the script

I’m thinking through the final script, ensuring UI functionality and smooth dependencies. eyeing pm2 for process management and Nginx for route handling.

Analyzing code behaviors

I'm noticing how various test cases impact browser performance and Python container configurations. The aim is to generate precise documentation and ensure accurate analysis.

Pulling together final details

Wrapping up the final verification of package generation, updating the README, and ensuring all crucial frameworks and documents are included. Progressing smoothly!

Taking a closer look

Consulting detailed balancing and mobility information, ensuring changes don't skew the balance. Progressing through verification and sandbox setup step-by-step.

Worked for 17m 48s

الإجابة

已更新为 v1.1:一键启动、鼠标锁定修复、人物机动性增强

下载完整更新包(含一键启动脚本)

请把新版完整解压到新文件夹,两个游戏窗口都使用这一版,不要与旧版混用。

1. 双击启动,不用写代码

Windows:进入解压后的 fogport 文件夹,双击 一键开玩.bat START_GAME.bat 也是同一个启动入口。

macOS 使用 一键开玩.command;Linux 使用 一键开玩.sh

脚本会检查运行环境,自动下载缺失的 Node.js 和项目依赖、构建游戏,然后打开浏览器。首次运行需要联网下载,不是完全离线免下载包;成功后会复用本地缓存。

游玩时保持启动器窗口打开。它只提供本机网页文件,不承担游戏判定,也不需要你部署游戏服。原来的 MQTT 地址、账号、密码和路径已保留。

双窗口测试时,先在大厅点 「再开一窗互打」,再由 A 创建房间、B 输入房间码加入。

2. 入场自动请求锁定,失败也有明确按钮

创建房间、加入房间或进入离线试枪时,现在都会自动请求锁定鼠标。浏览器拒绝自动请求时,中央会显示大按钮:

「锁定鼠标,开始行动」

点击按钮或按 Enter 接管;按 Esc 释放鼠标。浏览器可能要求一次用户点击才能授权锁定,所以保留了这个明确入口。(MDN Web Docs)

同时修复了两个会导致“进去了却动不了”的问题:首帧角色状态没到时,不再隐藏接管按钮;锁定成功后,键盘焦点会从代号输入框转到游戏画布。

3. 人物更灵活,但保留武器短板

基础移速整体提高约 18%~19%,疾跑倍率从 1.4 提到 1.55,蹲移也更快;疾跑体力消耗降低、恢复加快。

跳跃更高,加入落地前的跳跃预输入和刚离开边缘时的短暂容错;短按空格通过序号同步,减少按键被同步间隔漏掉的问题。没有增加二段跳,也保留了斜跑不额外加速和防穿墙检查。

手枪仍最快,狙击仍最慢;武器伤害、射速、弹量、距离衰减和开镜时间未改。 客户端与房主判定使用同一套移动参数。


验证情况:70 项自动化测试、19 项浏览器操作检查通过。 已检查真实浏览器鼠标锁定、拒绝后的按钮接管、Enter 恢复、WASD 移动和短按跳跃。

需要说明:浏览器检查替换了 3D 渲染器和 MQTT 层。当前环境仍无法下载 npm 依赖或连接指定 Broker,因此尚未完成真实 Vite 构建、WebGL 场景、公网双窗口互打,以及 Windows/macOS 首次安装的整机实测

中文启动说明 · 详细测试记录

مشاركة هذا السؤال والجواب