diff --git a/AGENTS.md b/AGENTS.md index abf0349..3fee858 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -77,13 +77,18 @@ assets/blocks/directional_boost/ - 工坊默认空白,保存到 [designer/drafts](designer/drafts)。内置示例从 `playtest/` 读取,保存时写入草稿副本,不直接覆盖实验原件。 - 展示:[showcase.tscn](playtest/showcase/scenes/showcase.tscn);早期试玩:[main.tscn](playtest/baseline/scenes/main.tscn)。 - `levels/` 仅用于明确发布的正式关卡。不要把试跑成功、示例或工坊草稿自动当作正式关卡。 -- [blocks.md](references/design/blocks.md) 是方块完整规则的唯一维护文档,保留“滑槽 / 实体”结构;[physics_system.md](references/design/physics_system.md) 管理物理和小球数据;[game_reference.md](references/design/game_reference.md) 管理整体玩法及参考方向。 +- [blocks.md](references/design/blocks.md) 是方块完整规则的唯一维护文档,保留“滑槽 / 实体”结构;[physics_system.md](references/design/physics_system.md#当前运行模型) 管理物理和小球数据,现行行为以其顶部“当前运行模型”为准,后续旧版完整刚体模型中的风力、滑滚转换和阻力矩公式不得当作现用规则;[game_reference.md](references/design/game_reference.md) 管理整体玩法及参考方向。 - 外部游戏资料在 `references/games/`,机械笔记在 `references/mechanics/`。区分资料中的建议、用户指令与已确认规则。 -- 原木球、陶瓷球、铁球半径均为 0.3 m;质量和空气响应来自物理预设。当前木球 60 kg、陶瓷球 330 kg、铁球约 890.08 kg;`dragCoefficient` 分别为 0.47 / 0.04 / 0.47。铁球与其他球使用同一空气力公式;当前风场下因质量和正常接触阻力而难以推动。禁止为铁球设置风力豁免、零阻力特例或速度/位置锁定,也不得在验证中覆盖真实铁球配置来掩盖问题。 -- 小球对照入口:[materials.tscn](playtest/materials/scenes/materials.tscn),支持滚动入洞、同风场和定向加速三种场景;`./scripts/run.zsh test-balls` 运行专项检查。 +- 现行物理使用 Godot 4.7 / Jolt、120 Hz 固定物理步、Y 轴向上和 **9.81 m/s²** 重力。原木、陶瓷、铁球半径均为 **0.3 m**,质量分别为 **60 / 330 / 约 890.08 kg**;三种球共享同一规则,是参与动力学积分的刚体,固体方块保持静态。接触支持力、碰撞冲量与运动积分由引擎统一求解,不得另写第二套轨道积分或把同一接触反力重复作为连续力施加。 +- **持续固体接触只通过滚动阻力耗能;瞬时碰撞仍按恢复系数回弹并可能耗能。** 木槽、冰面、墙面的恢复系数分别为 0.08 / 0.02 / 0.02。保留重力、碰撞、水的浮力和相对水流阻力,不能用“只有滚动阻力耗能”推导出碰撞无能量损失。 +- 滚动阻力沿承托面的切向施加,近似大小为 `c_rr·N`,并限制单步冲量不超过 `m·|v_t|`,避免只靠阻力使球反向。`N` 来自重力、外载和水作用在合成承托法线上的压紧分量,不能固定取 `mg`;多个接触每球每物理步只施加一次等效阻力,系数取承载分量最大的接触面。木槽、冰面、墙面的滚动阻力系数分别为 **0.025 / 0.002 / 0.8**。球的切向滚动角速度按切向速度和半径直接同步,不通过静摩擦交换平动与转动能量,不另加旧版滚动阻力矩或纯滚动 `5/7` 加速度修正。 +- 水密度为 **1000 kg/m³**,水中阻力系数为 **0.47**,单块流速固定为 **5 m/s**,逐块 `flowSpeed` 不得覆盖。浮力按球与水块并集的实际浸没体积计算;水阻力按球与浸没部分有效流速的相对速度二次计算,并限制单步冲量以避免越过流速。跨水格不重复提供浮力,不同流向按浸没部分合成有效流速。沉底不锁定球的位置或速度,只有固体河床提供滚动阻力。完整公式见 [水流与浮力](references/design/physics_system.md#35-水流与浮力)。 +- 风力、空气阻力、静摩擦和动摩擦不参与当前运行,原生线性、角度阻尼也为零。`physics.json` 中非零的 `dragCoefficient`、`airDensity`、`staticFriction`、`dynamicFriction` 是保留的历史字段,运行时不读取;修改这些字段不会改变当前行为,恢复相应机制必须同时明确扩展实现、规则和验证。 +- 小球对照入口:[materials.tscn](playtest/materials/scenes/materials.tscn),支持滚动入洞和定向加速;`./scripts/run.zsh test-balls` 使用真实质量和运行配置检查三种球、空中运动和定向加速。修改水、冰或墙面行为时运行 `./scripts/run.zsh test-environment`。共享物理脚本按实际影响选择并组合必要专项,历史报告不能替代本次运行结果。 + - 弯槽统一为一种 **90°弯槽**(`turn_90`),双向通行,保留 0° / 90° / 180° / 270° 四个旋转朝向。菜单、库存和新存档不得再区分左右弯槽;左转/右转仅描述球的行进方向。旧存档载入时,`turn_cw` 保持角度,`turn_ccw` 额外顺时针转 90°;V1 槽上起点的路径参数反转以保持原球心与来向。保留旧源文件和历史快照,不自动改写用户草稿。 - 五种滑槽均采用实心底座,仅保留顶部滚动槽;模型和碰撞体中不得恢复底部通孔。底孔实验场景与入口已删除。 -- 定向加速方块每次固定增加 **5 m/s**,工坊与运行中均不可调;旧存档的 `speedGain` 不得覆盖该规则。 +- 定向加速是**真实顶面接触触发的一次性速度事件,不是持续力或额外冲量**。每次有效触发先将水平方向改为箭头方向,再令水平速率固定增加 **5 m/s**,即 `v'_h = d·(|v_h| + 5 m/s)`,其中 `d` 为箭头的水平单位方向;保留竖直速度,同一次持续接触不重复触发,充分离开后才可再次触发。增量在工坊与运行中均不可调,旧存档的 `speedGain` 不得覆盖该规则,也不得为同一事件再叠加等效力或冲量。 - 滑槽以静态碰撞体存在,不受重力或球撞击推动,**可以悬空,不需要在路线下方铺墙承托**。玩家摆放的一面依附条件属于搭建规则,不是重力支撑条件。空中点选格和预览只用于显示/选取,不得添加隐藏承托碰撞体。 - 普通教学关的小球放在固定的定向加速方块上,从静止释放并经真实顶面接触起步;不要专门铺起跑斜坡或直接设置球的初速度。缓坡、急坡用于教学路线的高差衔接。受控物理验证中的自由落体等对照球按其验证目标设置。 @@ -108,7 +113,7 @@ assets/blocks/directional_boost/ ## 验证与迁移记录 -- 检查脚本在 `playtest/checks/`,早期专项在 `playtest/baseline/checks/`,截图脚本在 `playtest/captures/`。 +- 检查脚本在 `playtest/checks/`,截图脚本在 `playtest/captures/`。早期 `baseline-test` 及 `playtest/baseline/checks/` 中的三组过时检查已删除;早期试玩场景和历史报告保留,不得把旧报告当作仍可运行的专项。 - `playtest/artifacts/baseline/`、`styled/`、`reorganization/` 分别收纳早期产物、当前画风实验产物及迁移记录。历史报告中的旧路径是当时证据,移动文件不代表重新运行了实验。 - [迁移清单](playtest/artifacts/reorganization/files.json) 保存旧路径、新路径及迁移前 SHA-256;[路径映射](playtest/artifacts/reorganization/path_map.json) 用于追溯。 - 用户不希望为小改动重复跑全套物理实验。验证应匹配改动:目录调整主要检查路径、语法、导入和入口加载;仅在确实涉及相应行为时运行必要专项。 diff --git a/README.md b/README.md index d0440c0..bb90a61 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Godot 工程入口是 [godot_engine/project.godot](godot_engine/project.godot) 定向加速方块固定增加 **5 m/s**,工坊与运行中均不可调;见 [方块设定](references/design/blocks.md#定向加速方块)。 -工坊「小球」菜单可选原木球、陶瓷球和铁球,尺寸相同、质量及受风程度不同。[三球对照场景与验证](playtest/materials/README.md)。 +工坊「小球」菜单可选原木球、陶瓷球和铁球,尺寸相同,质量及水中浮沉表现不同。[三球对照场景与验证](playtest/materials/README.md)。 [等级一:滑槽入门](playtest/tutorial/README.md) 包含五个可操作教学关,逐步练习直槽/缓坡、转弯、旋转、急缓坡搭配与综合通道。双击 `scripts/Tutorial.command`,从未完成布局开始搭建,真实入洞后进入下一关;它们仍是 `playtest/` 实验关卡。 diff --git a/assets/README.md b/assets/README.md index ca3d784..b33322f 100644 --- a/assets/README.md +++ b/assets/README.md @@ -22,7 +22,7 @@ 三种球的第一版风格化材质使用同一平滑球面与 1024×512 的颜色和粗糙度贴图。铁球以 Metal 032 的冷灰缎面和 Metal 009 的细磨痕为参考。陶瓷球用白瓷釉色与 Porcelain 001 的钴蓝弧纹。木球结合 Wood 092 的暖木面与 DeadKir 的宽木纹。原始图像和 CC0 授权见 [参考库](../references/materials/ball-materials/README.md)。[Godot 改造前后对比](balls/shared/previews/material-style-v1/comparison.png)上、下两行使用教学关镜头、光照和同一组三条直槽,顺序是铁球、陶瓷球、木球。 -球洞外壳现为与墙壁同材质的 1×1×1 方块,内部保留原有锥面和落球通道,碰撞由实际带孔网格生成。制作入口为 `./scripts/asset.zsh goal_hole`;[外观对照](../playtest/artifacts/styled/goal_block/wall_comparison.png)、[入洞与侧壁专项](../playtest/checks/validate_goal_block.gd)及其[36 项检查结果](../playtest/artifacts/styled/goal_block/physics.json)记录此次修改,完整规则见[方块文档](../references/design/blocks.md#非触发方块)。 +球洞外壳现为与墙壁同材质的 1×1×1 方块,内部保留原有锥面和落球通道,碰撞由实际带孔网格生成。制作入口为 `./scripts/asset.zsh goal_hole`;[外观对照](../playtest/artifacts/styled/goal_block/wall_comparison.png)、[入洞与侧壁专项](../playtest/checks/validate_goal_block.gd)及其[检查结果](../playtest/artifacts/styled/goal_block/physics.json)记录此次修改,完整规则见[方块文档](../references/design/blocks.md#非触发方块)。 90°弯槽的现用资源为 [turn_90](chutes/turn_90/README.md)。旧 `turn_cw` / `turn_ccw` 文件仅保留作历史源资产,不在现用目录配置中注册,不再出现在素材菜单;旧制作入口转调统一资源。来源快照保留原名称,制作器显式映射为统一类型。 diff --git a/assets/balls/ceramic_ball/model.glb b/assets/balls/ceramic_ball/model.glb index b08ed68..b308cdd 100644 Binary files a/assets/balls/ceramic_ball/model.glb and b/assets/balls/ceramic_ball/model.glb differ diff --git a/assets/balls/ceramic_ball/source/model.blend b/assets/balls/ceramic_ball/source/model.blend index 8ab2cb4..f4c853c 100644 Binary files a/assets/balls/ceramic_ball/source/model.blend and b/assets/balls/ceramic_ball/source/model.blend differ diff --git a/assets/balls/iron_ball/source/model.blend b/assets/balls/iron_ball/source/model.blend index 2fc1870..37a7c1d 100644 Binary files a/assets/balls/iron_ball/source/model.blend and b/assets/balls/iron_ball/source/model.blend differ diff --git a/assets/balls/shared/physics.gd b/assets/balls/shared/physics.gd index e6c6eb4..f4172d5 100644 --- a/assets/balls/shared/physics.gd +++ b/assets/balls/shared/physics.gd @@ -13,20 +13,11 @@ var water_drag_force := Vector3.ZERO var impact_contacts: Dictionary={} var last_linear_velocity := Vector3.ZERO var radius: float = 0.3 -var drag_coefficient: float = 0.47 -var air_density: float = 1.225 -var wind_velocity := Vector3.ZERO -var mu_static: float = 0.42 -var mu_dynamic: float = 0.32 var rolling_resistance: float = 0.025 -var friction_enabled := true var rolling_enabled := true -var drag_enabled := true +var rolling_force := Vector3.ZERO var contact_count := 0 var ball_contact_count := 0 -var contact_slip := 0.0 -var air_force := Vector3.ZERO -var rolling_torque := Vector3.ZERO var travelled := 0.0 var previous_position := Vector3.ZERO var tracking_started := false @@ -46,25 +37,33 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: return contact_count = state.get_contact_count() ball_contact_count = 0 - contact_slip = 0.0 + apply_water_forces(state) + var load_force := mass * state.total_gravity + constant_force + buoyancy_force + water_drag_force + var strongest_load := 0.0 + var contact_bounce := base_bounce var support_normal := Vector3.ZERO var active_pair: Dictionary={} var impacts: Dictionary={} active_surface="painted_wood" for i in range(contact_count): var collider: Node=state.get_contact_collider_object(i) - if collider is RigidBody3D:ball_contact_count+=1 - var surface: String=collider.get_meta("piece_type","") if collider!=null else "" - if surface_pairs.has(surface): - var pair: Dictionary=surface_pairs[surface] - if active_pair.is_empty() or pair.dynamicFriction>active_pair.dynamicFriction: - active_pair=pair;active_surface=surface - # Contact positions are global; the sphere's radial direction is unambiguous. + if collider is RigidBody3D: + ball_contact_count+=1 + continue + if not collider is StaticBody3D:continue + var surface: String=collider.get_meta("piece_type","") + var pair: Dictionary = surface_pairs.get(surface,{}) + if not pair.is_empty():contact_bounce = float(pair.restitution) var n := (state.transform.origin - state.get_contact_local_position(i)).normalized() - var relative := state.get_contact_local_velocity_at_position(i) - state.get_contact_collider_velocity_at_position(i) - var slip := relative - n * relative.dot(n) - contact_slip = maxf(contact_slip, slip.length()) + var load_on_face := -load_force.dot(n) + if load_on_face > 0.0: + support_normal += n * load_on_face + if load_on_face > strongest_load: + strongest_load = load_on_face + active_pair = pair + active_surface = surface if not active_pair.is_empty() else "painted_wood" if surface=="ice": + var relative := state.get_contact_local_velocity_at_position(i) - state.get_contact_collider_velocity_at_position(i) var block: Node=collider while block!=null and not block.has_method("receive_impact"):block=block.get_parent() if block!=null: @@ -72,10 +71,6 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: if not impacts.has(id):impacts[id]={"block":block,"impulse":0.0,"approach":0.0} impacts[id].impulse+=absf(state.get_contact_impulse(i).dot(n)) impacts[id].approach=maxf(impacts[id].approach,maxf(-relative.dot(n),-last_linear_velocity.dot(n))) - if n.dot(Vector3.UP) > 0.15 or (surface=="wall" and (mass*state.total_gravity+constant_force+air_force+buoyancy_force+water_drag_force).dot(n)<-.01): - support_normal += n - # Godot exposes one native friction coefficient. Select a slip-dependent - # coefficient; native contact solver still owns the friction impulse. for id in impacts: if not impact_contacts.has(id): var impact: Dictionary=impacts[id] @@ -86,12 +81,16 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: impact_contacts[id]=true for id in impact_contacts.keys(): if not impacts.has(id):impact_contacts.erase(id) - var contact_static: float=active_pair.get("staticFriction",mu_static) - var contact_dynamic: float=active_pair.get("dynamicFriction",mu_dynamic) - var contact_rolling: float=active_pair.get("rollingResistance",rolling_resistance) - physics_material_override.friction = (contact_static if contact_slip < 0.035 else contact_dynamic) if friction_enabled else 0.0 - physics_material_override.bounce=active_pair.get("restitution",base_bounce) + physics_material_override.bounce=contact_bounce boost_controller.integrate(state, radius) + apply_rolling_resistance(state,support_normal,load_force,active_pair.get("rollingResistance",rolling_resistance)) + last_linear_velocity=state.linear_velocity + if tracking_started: + travelled += state.transform.origin.distance_to(previous_position) + previous_position = state.transform.origin + tracking_started = true + +func apply_water_forces(state: PhysicsDirectBodyState3D) -> void: var water: Dictionary=Water.sample(state.transform.origin,radius,get_tree().get_nodes_in_group("water_blocks")) submerged_fraction=water.fraction;water_velocity=water.velocity var volume:=4.0/3.0*PI*radius*radius*radius*submerged_fraction @@ -102,21 +101,17 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: var drag_limit:=relative_water.length()*mass/state.step if water_drag_force.length()>drag_limit:water_drag_force=water_drag_force.normalized()*drag_limit state.apply_central_force(buoyancy_force+water_drag_force) - var relative_air := state.linear_velocity - wind_velocity - air_force = -0.5 * air_density * drag_coefficient * PI * radius * radius * relative_air.length() * relative_air * (1.0-submerged_fraction) if drag_enabled else Vector3.ZERO - state.apply_central_force(air_force) - rolling_torque = Vector3.ZERO - if rolling_enabled and support_normal.length_squared() > 0.001: - var n := support_normal.normalized() - var roll := state.angular_velocity - n * state.angular_velocity.dot(n) - if roll.length() > 0.0001: - var support := maxf(0.0, -(mass * state.total_gravity + constant_force + air_force + buoyancy_force + water_drag_force).dot(n)) - var moment := 0.4 * mass * radius * radius - var limit := roll.length() * moment / state.step - rolling_torque = -roll.normalized() * minf(contact_rolling * support * radius, limit) - state.apply_torque(rolling_torque) - last_linear_velocity=state.linear_velocity - if tracking_started: - travelled += state.transform.origin.distance_to(previous_position) - previous_position = state.transform.origin - tracking_started = true + +func apply_rolling_resistance(state: PhysicsDirectBodyState3D, support_normal: Vector3, load_force: Vector3, coefficient: float) -> void: + rolling_force = Vector3.ZERO + if support_normal.length_squared() > 0.0: + var normal := support_normal.normalized() + var tangent := state.linear_velocity.slide(normal) + if rolling_enabled and not tangent.is_zero_approx(): + var load_n := maxf(0.0,-load_force.dot(normal)) + # One equivalent force per ball, even on a groove or a tile seam. + var magnitude := minf(coefficient * load_n, mass * tangent.length() / state.step) + rolling_force = -tangent.normalized() * magnitude + state.apply_central_force(rolling_force) + # Show rolling from the travelled speed without a tangential contact impulse. + state.angular_velocity = normal.cross(tangent) / radius + normal * state.angular_velocity.dot(normal) diff --git a/assets/balls/wood_ball/model.glb b/assets/balls/wood_ball/model.glb index fc5b0d0..08177a9 100644 Binary files a/assets/balls/wood_ball/model.glb and b/assets/balls/wood_ball/model.glb differ diff --git a/assets/balls/wood_ball/source/model.blend b/assets/balls/wood_ball/source/model.blend index 3bc3d1a..3087e7f 100644 Binary files a/assets/balls/wood_ball/source/model.blend and b/assets/balls/wood_ball/source/model.blend differ diff --git a/assets/blocks/directional_boost/behavior.gd b/assets/blocks/directional_boost/behavior.gd index 06dde62..0263301 100644 --- a/assets/blocks/directional_boost/behavior.gd +++ b/assets/blocks/directional_boost/behavior.gd @@ -7,6 +7,25 @@ const SPEED_GAIN := 5.0 var active: Dictionary = {} var events: Array = [] +# Keep the solid cube under the guide. A vertical pick on the centreline can +# otherwise pass between the two mirrored triangle strips at some rotations. +static func guide_shape(mesh: Mesh, top: float) -> ConcavePolygonShape3D: + var faces := mesh.get_faces() + var raised := PackedVector3Array() + var cut := Plane(Vector3.DOWN,-top) + for i in range(0,faces.size(),3): + var triangle := faces.slice(i,i+3) + if maxf(triangle[0].y,maxf(triangle[1].y,triangle[2].y)) <= top+.00001:continue + var polygon := Geometry3D.clip_polygon(triangle,cut) + for j in range(1,polygon.size()-1): + raised.append(polygon[0]) + raised.append(polygon[j]) + raised.append(polygon[j+1]) + var shape := ConcavePolygonShape3D.new() + shape.backface_collision = true + shape.set_faces(raised) + return shape + func integrate(state: PhysicsDirectBodyState3D, radius: float) -> void: var touching: Dictionary = {} for i in range(state.get_contact_count()): @@ -19,7 +38,8 @@ func integrate(state: PhysicsDirectBodyState3D, radius: float) -> void: var normal := (state.transform.origin - contact).normalized() var local: Vector3 = block.to_local(contact) var bounds: AABB = block.get_meta("boost_bounds") - if normal.y < .9 or absf(local.y - bounds.end.y) > .025:continue + var rise := float(block.get_meta("outlet_rise",0.0)) + if normal.y < .9 or local.y < bounds.end.y-.025 or local.y > bounds.end.y+rise+.025:continue touching[block.get_instance_id()] = block for id in active.keys(): if touching.has(id):continue @@ -27,8 +47,10 @@ func integrate(state: PhysicsDirectBodyState3D, radius: float) -> void: if not is_instance_valid(block):active.erase(id);continue var local: Vector3 = block.to_local(state.transform.origin) var bounds: AABB = block.get_meta("boost_bounds") - if local.x < bounds.position.x-.025 or local.x > bounds.end.x+.025 or local.z < bounds.position.z-.025 or local.z > bounds.end.z+.025 or absf(local.y-bounds.end.y-radius) > .06: - active.erase(id) + var rise := float(block.get_meta("outlet_rise",0.0)) + # The sphere can straddle the mouth after its centre leaves the tile. + var guide := AABB(Vector3(bounds.position.x,bounds.end.y,bounds.position.z),Vector3(bounds.size.x,rise,bounds.size.z)) + if not guide.grow(radius+.025).has_point(local):active.erase(id) # Stable order for the rare case of simultaneously touching two top faces. var blocks: Array = touching.values() blocks.sort_custom(func(a,b):return str(a.get_meta("record_id",a.name)) < str(b.get_meta("record_id",b.name))) diff --git a/assets/blocks/directional_boost/model.glb b/assets/blocks/directional_boost/model.glb index c4b16b6..6a13e87 100644 Binary files a/assets/blocks/directional_boost/model.glb and b/assets/blocks/directional_boost/model.glb differ diff --git a/assets/blocks/directional_boost/source/model.blend b/assets/blocks/directional_boost/source/model.blend index 6881138..32f9506 100644 Binary files a/assets/blocks/directional_boost/source/model.blend and b/assets/blocks/directional_boost/source/model.blend differ diff --git a/assets/blocks/directional_boost/source/outlet.py b/assets/blocks/directional_boost/source/outlet.py new file mode 100644 index 0000000..a9f2e67 --- /dev/null +++ b/assets/blocks/directional_boost/source/outlet.py @@ -0,0 +1,61 @@ +"""Author the launcher's permanent outlet with the straight chute's mouth profile.""" +from math import cos, pi, sin + + +def build_outlet(radius, mesh_object, outline, mats): + # The last cross-section uses the same 32 facets as the adjoining chute. + groove = [(radius * sin(i*pi/32), radius * (1-cos(i*pi/32))) for i in range(-16, 17)] + profile = [(-.5, radius), *groove, (.5, radius)] + + start = -.375 + + def rise(x, depth): + u = min(1, max(0, (x-start)/(.5-start))) + return depth * u*u*(3-2*u) + + vertices, faces = [], [] + for i in range(25): + x = -.5+i/24 + ring = [(x, y, 1+rise(x, depth)) for y, depth in profile] + vertices.extend([*ring, (x,.5,0), (x,-.5,0)]) + width = len(profile)+2 + for row in range(24): + for col in range(width): + a = row*width+col + b = row*width+(col+1)%width + faces.append((a,b,b+width,a+width)) + # Blender triangulates the concave end caps on export. + faces.extend([tuple(reversed(range(width))), tuple(range(24*width,25*width))]) + body = mesh_object('directional_boost',vertices,faces) + for key in ['wall','wall_top']: + body.data.materials.append(mats[key]) + for face in body.data.polygons: + face.material_index = int(face.normal.z>0.001) + group = [body,outline(body)] + + # Sample the graphic along the same cross-section so it lies on the wood. + for suffix,scale,lift,color in [('border',1,.003,'ink'),('fill',.82,.005,'red')]: + verts, polys = [], [] + # Separate bands at the arrow shoulders to keep their sharp corners. + for low,high,shaft in [(-.28,-.12,False),(-.12,.12,True),(.12,.28,False)]: + cuts = [(low*scale,None),*((y,d) for y,d in groove if low*scale < y < high*scale),(high*scale,None)] + for y, depth in cuts: + if depth is None: + for (ya,da),(yb,db) in zip(groove,groove[1:]): + if ya<=y<=yb: + depth=da+(db-da)*(y-ya)/(yb-ya) + break + left = (-.34 if shaft else .04)*scale + right = .36*scale-.32*abs(y)/.28 + for j in range(9): + x=left+(right-left)*j/8 + verts.append((x,y,1+rise(x,depth)+lift)) + band_start=len(verts)-9*len(cuts) + for i in range(len(cuts)-1): + for j in range(8): + a=band_start+9*i+j + polys.append((a,a+1,a+10,a+9)) + arrow=mesh_object('ink_boost_arrow_'+suffix,verts,polys) + arrow.data.materials.append(mats[color]) + group.append(arrow) + return group diff --git a/assets/blocks/ice/source/model.blend b/assets/blocks/ice/source/model.blend index 377cf3d..6ac9837 100644 Binary files a/assets/blocks/ice/source/model.blend and b/assets/blocks/ice/source/model.blend differ diff --git a/assets/blocks/wall/source/model.blend b/assets/blocks/wall/source/model.blend index 2540ce7..a8fe40c 100644 Binary files a/assets/blocks/wall/source/model.blend and b/assets/blocks/wall/source/model.blend differ diff --git a/assets/blocks/water/source/model.blend b/assets/blocks/water/source/model.blend index f1cb1a1..c3268ac 100644 Binary files a/assets/blocks/water/source/model.blend and b/assets/blocks/water/source/model.blend differ diff --git a/assets/chutes/gentle/source/model.blend b/assets/chutes/gentle/source/model.blend index 5a80a21..e7601d8 100644 Binary files a/assets/chutes/gentle/source/model.blend and b/assets/chutes/gentle/source/model.blend differ diff --git a/assets/chutes/steep/source/model.blend b/assets/chutes/steep/source/model.blend index cce787a..cf84f64 100644 Binary files a/assets/chutes/steep/source/model.blend and b/assets/chutes/steep/source/model.blend differ diff --git a/assets/chutes/straight/source/model.blend b/assets/chutes/straight/source/model.blend index 4a4b3ec..ffd2c7a 100644 Binary files a/assets/chutes/straight/source/model.blend and b/assets/chutes/straight/source/model.blend differ diff --git a/assets/chutes/turn_90/source/model.blend b/assets/chutes/turn_90/source/model.blend index c3b2920..b5752ec 100644 Binary files a/assets/chutes/turn_90/source/model.blend and b/assets/chutes/turn_90/source/model.blend differ diff --git a/assets/chutes/y_merge/source/model.blend b/assets/chutes/y_merge/source/model.blend index 2d1bc78..1632e80 100644 Binary files a/assets/chutes/y_merge/source/model.blend and b/assets/chutes/y_merge/source/model.blend differ diff --git a/assets/collections/storybook/catalog.json b/assets/collections/storybook/catalog.json index 3f01225..cf68472 100644 --- a/assets/collections/storybook/catalog.json +++ b/assets/collections/storybook/catalog.json @@ -2035,7 +2035,7 @@ "directional_boost": { "role": "boost", "category": "interactive", - "collisionShape": "box", + "collisionShape": "guidedBase", "cellFootprint": [ 1, 1 @@ -2049,19 +2049,20 @@ "max": [ 0.5, 0.5, - 1 + 1.32 ], "size": [ 1, 1, - 1 + 1.32 ] }, "declaredSize": [ 1, 1, - 1 + 1.32 ], + "baseHeight": 1, "geometryOrigin": "authored", "arrowDirectionGodot": [ 1, @@ -2071,36 +2072,6 @@ "path": "res://assets/blocks/directional_boost/model.glb", "sourceBlend": "assets/blocks/directional_boost/source/model.blend" }, - "wood_ball": { - "path": "res://assets/balls/wood_ball/model.glb", - "radius": 0.3, - "boundsBlender": { - "size": [ - 0.6, - 0.6, - 0.6 - ] - }, - "albedoTexture": "res://assets/balls/wood_ball/textures/albedo.png", - "sourceBlend": "assets/balls/wood_ball/source/model.blend", - "role": "ball", - "geometrySource": "iron_ball" - }, - "ceramic_ball": { - "path": "res://assets/balls/ceramic_ball/model.glb", - "radius": 0.3, - "boundsBlender": { - "size": [ - 0.6, - 0.6, - 0.6 - ] - }, - "albedoTexture": "res://assets/balls/ceramic_ball/textures/albedo.png", - "sourceBlend": "assets/balls/ceramic_ball/source/model.blend", - "role": "ball", - "geometrySource": "iron_ball" - }, "water": { "role": "water", "category": "nonInteractive", @@ -2173,6 +2144,36 @@ "geometryOrigin": "authored", "path": "res://assets/blocks/ice/model.glb", "sourceBlend": "assets/blocks/ice/source/model.blend" + }, + "wood_ball": { + "path": "res://assets/balls/wood_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "albedoTexture": "res://assets/balls/wood_ball/textures/albedo.png", + "sourceBlend": "assets/balls/wood_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball" + }, + "ceramic_ball": { + "path": "res://assets/balls/ceramic_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "albedoTexture": "res://assets/balls/ceramic_ball/textures/albedo.png", + "sourceBlend": "assets/balls/ceramic_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball" } }, "styleFamily": "railbound_inspired", diff --git a/assets/collections/storybook/entities.json b/assets/collections/storybook/entities.json index 4687599..2c1ca31 100644 --- a/assets/collections/storybook/entities.json +++ b/assets/collections/storybook/entities.json @@ -28,4 +28,4 @@ "assetId": "water" } ] -} +} \ No newline at end of file diff --git a/assets/collections/storybook/physics.json b/assets/collections/storybook/physics.json index 4f0815b..1873675 100644 --- a/assets/collections/storybook/physics.json +++ b/assets/collections/storybook/physics.json @@ -164,10 +164,8 @@ ], "notes": [ "Game tuning: all balls have the same authored radius and shape. Wood mass 60 kg; ceramic 330 kg (confirmed initial mass, sinks and travels less than 2 m in the 8-second reference current); iron keeps its original 890.076 kg.", - "Air drag coefficients are gameplay parameters, not measured material constants: wood 0.47, ceramic 0.04, iron 0.47. Iron receives aerodynamic force through the same equation as other balls; its mass and ordinary contact resistance limit motion in the reference wind.", - "No extra fan multiplier or direct wind velocity override. All types use the established contact coefficients to isolate mass and aerodynamic differences.", - "The current native per-body friction/restitution approximation is retained; simultaneous mixed contact-pair solving is not introduced by this asset change.", - "Wall contacts use high friction and rolling resistance; ice uses low friction and rolling resistance. These are shared surface tuning, never per-level ball overrides." + "All balls use gravity, normal collisions, buoyancy and water drag. Solid contact dissipates through rollingResistance only. Air and native contact friction are disabled. dragCoefficient, airDensity, staticFriction and dynamicFriction are retained as historical configuration fields.", + "Rolling resistance coefficients are shared by the three ball types for each surface. Ice has low rolling resistance and walls have high rolling resistance." ], "airDensity": 1.225 } diff --git a/assets/collections/storybook/source/build.py b/assets/collections/storybook/source/build.py index 9b77bcb..f039ef6 100644 --- a/assets/collections/storybook/source/build.py +++ b/assets/collections/storybook/source/build.py @@ -102,7 +102,7 @@ def build_wall(name='wall'): faces=[(0,2,3,1),(4,5,7,6),(0,1,5,4),(2,6,7,3),(0,4,6,2),(1,3,7,5)] return mesh_object(name,vertices,faces) -build_funnel();build_wall();build_wall('directional_boost');build_wall('water');build_wall('ice') +build_funnel();build_wall();build_wall('water');build_wall('ice') mats['water']=mat('water','74C7D8',roughness=.25) mats['water_surface']=mat('water_surface','63B8C5',roughness=.25) mats['ice']=mat('ice','A8DAE0',roughness=.12) @@ -121,9 +121,10 @@ catalog['models']['water']['flowDirectionGodot']=[1,0,0] catalog['models']['wall']={'role':'solid','category':'nonInteractive','collisionShape':'box', 'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]}, 'declaredSize':[1,1,1],'geometryOrigin':'authored'} -catalog['models']['directional_boost']={'role':'boost','category':'interactive','collisionShape':'box', - 'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]}, - 'declaredSize':[1,1,1],'geometryOrigin':'authored','arrowDirectionGodot':[1,0,0]} +boost_radius=catalog['models']['straight']['grooveRadius'] +catalog['models']['directional_boost']={'role':'boost','category':'interactive','collisionShape':'guidedBase', + 'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1+boost_radius],'size':[1,1,1+boost_radius]}, + 'declaredSize':[1,1,1+boost_radius],'baseHeight':1,'geometryOrigin':'authored','arrowDirectionGodot':[1,0,0]} catalog['models']['goal_hole']={'role':'goal','category':'nonInteractive','openingRadius':.32, 'entranceRadius':.46,'funnelDepth':.35,'depth':1.0,'cellFootprint':[1,1], 'boundsBlender':{'min':[-.5,-.5,-1],'max':[.5,.5,0],'size':[1,1,1]}, @@ -160,17 +161,6 @@ def outline(obj): bm.free() return lines(obj.name,segments) -def boost_arrow(): - # Flat authored graphic above the top face; excluded from collision like ink outlines. - points=[(-.34,-.12),(.04,-.12),(.04,-.28),(.36,0),(.04,.28),(.04,.12),(-.34,.12)] - result=[] - for suffix,scale,z,color in [('border',1,1.002,'ink'),('fill',.82,1.003,'red')]: - arrow=mesh_object('ink_boost_arrow_'+suffix,[(x*scale,y*scale,z) for x,y in points],[tuple(range(7))]) - arrow.data.materials.append(mats[color]);arrow['visual_only']=True - result.append(arrow) - return result - - def asset_dir(kind): category = 'balls' if kind == 'iron_ball' else 'goals' if kind == 'goal_hole' else 'blocks' if kind in ('wall','directional_boost','water','ice') else 'chutes' return ROOT / 'assets' / category / kind @@ -186,6 +176,9 @@ groups=[];report=[] all_kinds=kinds+['iron_ball','goal_hole','wall','directional_boost','water','ice'] if ONLY_ASSET is not None and ONLY_ASSET not in all_kinds:raise ValueError(ONLY_ASSET) for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds): + if kind=='directional_boost': + author=runpy.run_path(str(asset_dir(kind)/'source/outlet.py')) + group=author['build_outlet'](boost_radius,mesh_object,outline,mats) obj=bpy.data.objects[snapshot_turn if kind=='turn_90' else kind] if kind=='turn_90': obj.name=kind @@ -194,7 +187,7 @@ for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds): obj.data=obj.data.copy() before_coords=[tuple(v.co) for v in obj.data.vertices] old_indices=[p.material_index for p in obj.data.polygons] - obj.data.materials.clear() + if kind!='directional_boost':obj.data.materials.clear() if kind in kinds: for key in ['body','groove','top']:obj.data.materials.append(mats[key]) for face,old in zip(obj.data.polygons,old_indices): @@ -228,11 +221,10 @@ for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds): ice_style['apply_ice_surface'](obj,mats['ice'],mats['ice_top']) group.append(outline(obj)) category='entities' - else: + elif kind!='directional_boost': obj.data.materials.append(mats['wall']);obj.data.materials.append(mats['wall_top']) for face in obj.data.polygons:face.material_index=1 if face.normal.z>.5 else 0 group=[obj,outline(obj)] - if kind=='directional_boost':group+=boost_arrow() category='entities' obj['style_family']='railbound_inspired' obj['collision_source']='authored mesh' if kind in ('wall','goal_hole','directional_boost','water','ice') else 'unchanged source mesh' diff --git a/assets/collections/storybook/source/collection.blend b/assets/collections/storybook/source/collection.blend index 9bee027..77c3437 100644 Binary files a/assets/collections/storybook/source/collection.blend and b/assets/collections/storybook/source/collection.blend differ diff --git a/assets/collections/storybook/source/verify.py b/assets/collections/storybook/source/verify.py index a1b3443..2c850f3 100644 --- a/assets/collections/storybook/source/verify.py +++ b/assets/collections/storybook/source/verify.py @@ -83,17 +83,21 @@ for kind,data in catalog['models'].items(): if authored: bm=bmesh.new();bm.from_mesh(obj.data) volume=abs(bm.calc_volume(signed=True));closed=all(e.is_manifold for e in bm.edges);bm.free() - correct=correct and closed and all(abs(d-1)<1e-6 for d in obj.dimensions) - if kind in ('wall','directional_boost'): + correct=correct and closed and (obj.dimensions-Vector(data['boundsBlender']['size'])).length<1e-6 + if kind=='wall': correct=correct and abs(volume-1)<1e-6 - if kind=='directional_boost': - arrow=bpy.data.objects.get('ink_boost_arrow_fill') - correct=correct and arrow is not None - if arrow is not None: - points=[v.co for v in arrow.data.vertices] - tip=max(points,key=lambda v:v.x) - correct=correct and tip.x>0 and abs(tip.y)<1e-6 and all(10 and abs(tip.y)<1e-6 and base.json`,覆盖时保留 `.json.bak`。从列表选择名称后点击“载入”;非法对象、非数值坐标或方块重叠会被拒绝,失败不会清空当前关卡。 -自动拼接与玩家教学关共用 [placement.gd](scripts/placement.gd) 的 `align_surfaces()`。高度不再强制取整到 0.5 m,Y 坐标栏按 0.01 m 调整,存档保留实际高度;X/Z 仍对齐网格。例如加速块底面 Y=2、顶面 Y=3,陡坡高端槽底相对底面为 1.18 m,所以接入该端时陡坡底面应为 **Y=1.82**,不能同底放在 Y=2。 +自动拼接与玩家教学关共用 [placement.gd](scripts/placement.gd) 的 `align_surfaces()`。高度不再强制取整到 0.5 m,Y 坐标栏按 0.01 m 调整,存档保留实际高度;X/Z 仍对齐网格。例如加速块底面 Y=2、出口槽底 Y=3,陡坡高端槽底相对底面为 1.18 m,所以接入该端时陡坡底面应为 **Y=1.82**,不能同底放在 Y=2。加速块在放置预览和单独摆放时就带有 U 形槽与方向箭头。沿箭头接坡时,出口中央和两侧槽沿同时接齐。已保存的布局重新载入即可生效。 连接只调整待放件的高度,不自动改变坡型、朝向或已有方块。两端无法同时满足时,工坊优先连接所点方块,玩家格位优先匹配更多邻接槽口、再选最接近格位高度的解;仍需选对坡型与朝向。手动输入坐标会退出此次自动面吸附,便于精确编辑。旧草稿保持原坐标,已有错误接缝需要重新点选放置或手动修正。 选择 **交互方块 → 定向加速**,选位置并点击“放置新方块”;按 `R` 旋转箭头方向。所有方块每次触发均固定增加 **5 m/s**,工坊只显示“固定增速:+5 m/s”,不提供调节入口,运行中也不可更改。 -把任一种小球放在方块顶面并启动,即可在首次真实顶面接触时沿箭头起步。运动中的球先改为箭头方向,再在原水平速率上加上增量:原水平速率 2 m/s 时,触发结果为沿箭头的 7 m/s。保留当时的竖直速度和角速度;之后继续正常物理运动。侧面、底面及悬空经过不触发;每颗球每次接触只触发一次,充分离开再接触可重新触发,暂停/继续不重复增速,重置会清空触发记录。顶面被其他实体覆盖时,不会隔着覆盖物加速。方块仍提供完整实心碰撞,箭头为不参与碰撞的平面标识。 +把任一种小球放在方块顶面并启动,即可在首次真实顶面接触时沿箭头起步。运动中的球先改为箭头方向,再在原水平速率上加上增量:原水平速率 2 m/s 时,触发结果为沿箭头的 7 m/s。保留当时的竖直速度和角速度;之后继续正常物理运动。侧面、底面及悬空经过不触发;每颗球每次接触只触发一次,充分离开再接触可重新触发,暂停/继续不重复增速,重置会清空触发记录。顶面被其他实体覆盖时,不会隔着覆盖物加速。方块仍提供完整实心碰撞,箭头贴合槽面,仅作方向标识。 加速方块以 `kind: "directional_boost"`、位置与 `quarter` 保存到实体记录中,支持保存/载入、移动、删除和撤销。速度增量属于固定玩法规则,不写入关卡数据。旧存档中的 `speedGain` 会在载入时忽略,再次保存时移除;任何旧数值均不能覆盖固定的 +5 m/s。不含加速方块的旧关卡不会新增加速效果。 diff --git a/designer/drafts/TestLevel1.json b/designer/drafts/TestLevel1.json new file mode 100644 index 0000000..546dbce --- /dev/null +++ b/designer/drafts/TestLevel1.json @@ -0,0 +1,215 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [ + { + "ballTypeId": "iron_ball", + "id": "iron_ball_54733144_11", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + -4.02999973297119, + 3.3199999332428, + -0.0799999982118607 + ] + } + ], + "entities": [ + { + "id": "piece_15858038_1", + "kind": "wall", + "position": [ + -4.0, + 0.0, + 1.0 + ], + "quarter": 0 + }, + { + "id": "piece_18049673_2", + "kind": "wall", + "position": [ + -4.0, + 1.0, + 1.0 + ], + "quarter": 0 + }, + { + "id": "piece_19796675_3", + "kind": "wall", + "position": [ + -4.0, + 0.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_21292261_4", + "kind": "wall", + "position": [ + -4.0, + 1.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_23084086_5", + "kind": "wall", + "position": [ + -4.0, + 0.0, + -1.0 + ], + "quarter": 0 + }, + { + "id": "piece_24705746_6", + "kind": "wall", + "position": [ + -4.0, + 1.0, + -1.0 + ], + "quarter": 0 + }, + { + "id": "piece_26513152_7", + "kind": "wall", + "position": [ + -4.0, + 2.0, + -1.0 + ], + "quarter": 0 + }, + { + "id": "piece_28199731_8", + "kind": "wall", + "position": [ + -4.0, + 2.0, + 1.0 + ], + "quarter": 0 + }, + { + "id": "piece_32033087_9", + "kind": "directional_boost", + "position": [ + -4.0, + 2.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_45816500_10", + "kind": "goal_hole", + "position": [ + -2.0, + 1.0, + 0.0 + ], + "quarter": 0 + } + ], + "pieces": [ + { + "id": "piece_70046522_12", + "kind": "straight", + "position": [ + -3.0, + 2.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_77038214_13", + "kind": "turn_90", + "position": [ + -2.0, + 2.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_89895659_14", + "kind": "gentle", + "position": [ + -2.0, + 2.0, + 1.0 + ], + "quarter": 3 + }, + { + "id": "piece_103149940_15", + "kind": "turn_90", + "position": [ + -2.0, + 1.5, + 2.0 + ], + "quarter": 2 + }, + { + "id": "piece_160941968_17", + "kind": "gentle", + "position": [ + -1.0, + 1.5, + 2.0 + ], + "quarter": 2 + }, + { + "id": "piece_173516839_18", + "kind": "turn_90", + "position": [ + 0.0, + 1.0, + 2.0 + ], + "quarter": 1 + }, + { + "id": "piece_195109380_19", + "kind": "straight", + "position": [ + 0.0, + 1.0, + 1.0 + ], + "quarter": 1 + }, + { + "id": "piece_215538886_20", + "kind": "turn_90", + "position": [ + 0.0, + 1.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "piece_242631404_21", + "kind": "steep", + "position": [ + -1.0, + 0.5, + 0.0 + ], + "quarter": 0 + } + ], + "schemaVersion": 2, + "title": "TestLevel1" +} \ No newline at end of file diff --git a/designer/drafts/my_level.json b/designer/drafts/my_level.json new file mode 100644 index 0000000..4897c1a --- /dev/null +++ b/designer/drafts/my_level.json @@ -0,0 +1,115 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [ + { + "ballTypeId": "iron_ball", + "id": "iron_ball_164994389_10", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + -4.01999998092651, + 4.31999969482422, + 2.95000004768372 + ] + } + ], + "entities": [ + { + "id": "piece_99132318_5", + "kind": "wall", + "position": [ + -4.0, + 0.0, + 3.0 + ], + "quarter": 0 + }, + { + "id": "piece_100675506_6", + "kind": "wall", + "position": [ + -4.0, + 1.0, + 3.0 + ], + "quarter": 0 + }, + { + "id": "piece_102310872_7", + "kind": "wall", + "position": [ + -4.0, + 2.0, + 3.0 + ], + "quarter": 0 + }, + { + "id": "piece_108466479_8", + "kind": "directional_boost", + "position": [ + -4.0, + 3.0, + 3.0 + ], + "quarter": 0 + }, + { + "id": "piece_193286052_13", + "kind": "goal_hole", + "position": [ + 1.0, + 1.0, + 3.0 + ], + "quarter": 2 + } + ], + "pieces": [ + { + "id": "piece_157935970_9", + "kind": "gentle", + "position": [ + -3.0, + 3.3199999332428, + 3.0 + ], + "quarter": 2 + }, + { + "id": "piece_172677659_11", + "kind": "straight", + "position": [ + -2.0, + 2.8199999332428, + 3.0 + ], + "quarter": 2 + }, + { + "id": "piece_177149779_12", + "kind": "steep", + "position": [ + -1.0, + 2.3199999332428, + 3.0 + ], + "quarter": 2 + }, + { + "id": "piece_214624797_14", + "kind": "steep", + "position": [ + 0.0, + 1.3199999332428, + 3.0 + ], + "quarter": 2 + } + ], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/designer/scripts/level_data.gd b/designer/scripts/level_data.gd index 45ebe63..2f6a737 100644 --- a/designer/scripts/level_data.gd +++ b/designer/scripts/level_data.gd @@ -17,8 +17,13 @@ func valid_vector(value: Variant) -> bool: if not (n is float or n is int) or not is_finite(float(n)):return false return true -func overlaps(a: Dictionary,b: Dictionary) -> bool: +func overlaps(a: Dictionary,b: Dictionary, saved_layout := false) -> bool: var ab: AABB=lib.record_bounds(a);var bb: AABB=lib.record_bounds(b) + # Earlier saves allow another block directly above the 1 m base. + # Accept those coordinates on load. New placements reserve the full rim. + if saved_layout: + if a.kind=="directional_boost":ab.size.y=lib.catalog[a.kind].baseHeight + if b.kind=="directional_boost":bb.size.y=lib.catalog[b.kind].baseHeight var extent: Vector3=ab.end.min(bb.end)-ab.position.max(bb.position) return extent.x>.001 and extent.y>.001 and extent.z>.001 @@ -42,7 +47,7 @@ func validate(data: Variant) -> String: if r.kind!="goal_hole" and (r.position[0]!=round(r.position[0]) or r.position[2]!=round(r.position[2])):return "积木 X / Z 坐标必须对齐网格" var d={"id":r.id,"kind":Chutes.canonical_kind(r.kind),"position":lib.vector(r.position),"quarter":Chutes.canonical_quarter(r.kind,int(r.quarter))} for other in decoded: - if overlaps(d,other):return "关卡中有重叠方块" + if overlaps(d,other,true):return "关卡中有重叠方块" decoded.append(d);ids.append(r.id) var ball_ids: Array=[] for b in data.balls: diff --git a/designer/scripts/placement.gd b/designer/scripts/placement.gd index 57b9f3f..4f833e6 100644 --- a/designer/scripts/placement.gd +++ b/designer/scripts/placement.gd @@ -51,13 +51,23 @@ func ports(record: Dictionary) -> Array: result.append({"surface":center+basis*local,"normal":basis*outward}) return result +func boost_mouth(record: Dictionary) -> Dictionary: + var bounds: AABB = lib.record_bounds(record) + var basis := Basis(Vector3.UP, -int(record.quarter)*PI/2) + var normal: Vector3 = basis * lib.vector(lib.catalog[record.kind].arrowDirectionGodot) + var surface := bounds.get_center() + normal*.5 + surface.y = record.position.y + lib.catalog[record.kind].baseHeight + return {"surface":surface, "normal":normal} + func connections(candidate: Dictionary,neighbors: Array) -> Array: var matches: Array=[] - for own in ports(candidate): + var is_boost: bool = candidate.kind == "directional_boost" + var own_ports: Array = [boost_mouth(candidate)] if is_boost else ports(candidate) + for own in own_ports: for other in neighbors: if other.id==candidate.id:continue var targets: Array=ports(other) - if other.kind in ["wall","directional_boost","ice","goal_hole"]: + if not is_boost and other.kind in ["wall","directional_boost","ice","goal_hole"]: # Flat solid tops and the goal rim have no groove. Use the edge at # this lane, not the block bottom or the decorative arrow mesh. var bounds: AABB=lib.record_bounds(other) @@ -67,7 +77,8 @@ func connections(candidate: Dictionary,neighbors: Array) -> Array: var lateral:=2 if axis==0 else 0 var edge: float=bounds.position[axis] if n[axis]>0 else bounds.end[axis] if absf(p[axis]-edge)<.001 and p[lateral]>bounds.position[lateral]+.001 and p[lateral].001 or own.normal.dot(target.normal)>-.999:continue diff --git a/designer/scripts/studio.gd b/designer/scripts/studio.gd index b038b10..bae9f35 100644 --- a/designer/scripts/studio.gd +++ b/designer/scripts/studio.gd @@ -351,10 +351,10 @@ func refresh_palette() -> void: option.toggle_mode=true option.button_pressed=block_mode!="erase" and (id==ball_kind if category=="balls" else id==kind) if category=="balls": - option.tooltip_text={"wood_ball":"原木球:容易被风吹动","ceramic_ball":"陶瓷球:330 kg,在当前水域中下沉","iron_ball":"铁球:最重,普通风下难以推动"}[id] + option.tooltip_text={"wood_ball":"原木球:60 kg,在当前水域中浮起","ceramic_ball":"陶瓷球:330 kg,在当前水域中下沉","iron_ball":"铁球:约 890 kg,在当前水域中下沉"}[id] elif id=="water":option.tooltip_text="水体可穿入;泡沫顺流漂动,水速固定 5 m/s。R 顺时针旋转 90°。" - elif id=="ice":option.tooltip_text="低摩擦冰面;强撞击会破碎,静置承重不触发。" - elif id=="wall":option.tooltip_text="实心墙壁;高摩擦、高滚动阻力,也可搭建河床和河岸。" + elif id=="ice":option.tooltip_text="低滚动阻力冰面;强撞击会破碎,静置承重不触发。" + elif id=="wall":option.tooltip_text="实心墙壁;高滚动阻力,也可搭建河床和河岸。" palette_box.add_child(option) for id in category_buttons:category_buttons[id].button_pressed=id==category if block_controls!=null:block_controls.visible=category!="balls" and block_mode!="erase" @@ -508,7 +508,7 @@ func add_spawn() -> void: func refresh_ball_pick_hint() -> void: if ball_pick_hint==null:return - ball_pick_hint.text="点击场景选位置,再点“放置小球”。\n滑槽会自动对准槽内。" if ball_pick_mode.selected==0 else "先设置球心 Y,再点击场景选 X/Z,\n最后点“放置小球”。" + ball_pick_hint.text="点方块选中顶面中央,点滑槽选中槽段中点。\n确认预览后点“放置小球”。" if ball_pick_mode.selected==0 else "先设置球心 Y,再点击场景选 X/Z,\n最后点“放置小球”。" func ball_position_is_clear(at: Vector3) -> bool: var shape:=SphereShape3D.new();shape.radius=lib.ball_radius(ball_kind) @@ -516,37 +516,39 @@ func ball_position_is_clear(at: Vector3) -> bool: query.transform=Transform3D(Basis.IDENTITY,at);query.collision_mask=1;query.margin=0 return get_world_3d().direct_space_state.intersect_shape(query).is_empty() -func ball_position_on_chute(hit: Dictionary) -> Variant: - var node: Node=hit.collider - while node!=null and not node.has_meta("record_id"):node=node.get_parent() - if node==null:return null - var record: Dictionary=records[index_for(node.get_meta("record_id"))] - if record.kind not in IDS:return null - var transform:=Transform3D(Basis(Vector3.UP,-int(record.quarter)*PI/2),lib.record_center(record)) - var local: Vector3=transform.affine_inverse()*Vector3(hit.position) - var point:=Vector2(local.x,local.z) - var paths: Array=lib.catalog[record.kind].upperPaths - var distance:=INF;var best_t:=0.0;var best_branch:=0 - for branch in range(paths.size()): - var path: Array=paths[branch] - for i in range(path.size()-1): - var a:=Vector2(path[i][0],path[i][2]);var b:=Vector2(path[i+1][0],path[i+1][2]) - var segment:=b-a - var ratio:=clampf((point-a).dot(segment)/maxf(segment.length_squared(),.000001),0,1) - var d:=point.distance_squared_to(a+segment*ratio) - if d Variant: + var node: Node = hit.collider + while node != null and not node.has_meta("record_id"): + node = node.get_parent() + if node == null: + return null + var record: Dictionary = records[index_for(node.get_meta("record_id"))] + var center: Vector3 = lib.record_center(record) + if record.kind not in IDS: + var bounds: AABB = lib.record_bounds(record) + center.y = bounds.end.y + if record.kind == "directional_boost": + center.y = record.position.y + lib.catalog[record.kind].baseHeight + return center + Vector3.UP * (lib.ball_radius(ball_kind) + .018) + + var transform := Transform3D(Basis(Vector3.UP, -int(record.quarter) * PI/2), center) + var paths: Array = lib.catalog[record.kind].upperPaths + var branch := 0 + if paths.size() > 1: + # The click chooses a Y-merge branch. Its spawn point stays fixed. + var local_hit: Vector3 = transform.affine_inverse() * Vector3(hit.position) + var point := Vector2(local_hit.x, local_hit.z) + var best_distance := INF + for path_index in range(paths.size()): + var path: Array = paths[path_index] + for i in range(path.size() - 1): + var a := Vector2(path[i][0], path[i][2]) + var b := Vector2(path[i+1][0], path[i+1][2]) + var distance := point.distance_squared_to(Geometry2D.get_closest_point_to_segment(point, a, b)) + if distance < best_distance: + best_distance = distance + branch = path_index + return transform * lib.ball_on_surface(record.kind, .5, branch) func pick_ball_position(origin: Vector3,direction: Vector3,hit: Dictionary) -> void: var candidate: Variant=null @@ -554,11 +556,7 @@ func pick_ball_position(origin: Vector3,direction: Vector3,hit: Dictionary) -> v if ball_pick_mode.selected==1: candidate=Plane(Vector3.UP,ball_cursor.y).intersects_ray(origin,direction) elif not hit.is_empty(): - candidate=ball_position_on_chute(hit) - if candidate==null: - var normal: Vector3=hit.normal - if normal.length_squared()<.001:return - candidate=hit.position+normal.normalized()*(radius+.018) + candidate=ball_position_on_block(hit) else: var ground=Plane(Vector3.UP,0).intersects_ray(origin,direction) if ground!=null:candidate=ground+Vector3.UP*(radius+.018) diff --git a/godot_engine/runtime/asset_library.gd b/godot_engine/runtime/asset_library.gd index 434cf12..ce6e550 100644 --- a/godot_engine/runtime/asset_library.gd +++ b/godot_engine/runtime/asset_library.gd @@ -29,10 +29,12 @@ func create_piece(kind: String, location := Vector3.ZERO, quarter := 0) -> Node3 if kind == Booster.KIND: root.set_meta("boost_direction", vector(catalog[kind].arrowDirectionGodot)) var bounds: Dictionary = catalog[kind].boundsBlender - root.set_meta("boost_bounds", AABB(Vector3(bounds.min[0],bounds.min[2],-bounds.max[1]),Vector3(bounds.size[0],bounds.size[2],bounds.size[1]))) - if not scene_cache.has(kind): - scene_cache[kind] = load(catalog[kind]["path"]) - var visual: Node3D = scene_cache[kind].instantiate() + root.set_meta("boost_bounds", AABB(Vector3(bounds.min[0],bounds.min[2],-bounds.max[1]),Vector3(bounds.size[0],catalog[kind].baseHeight,bounds.size[1]))) + root.set_meta("outlet_rise",float(bounds.size[2])-float(catalog[kind].baseHeight)) + var path: String = catalog[kind].path + if not scene_cache.has(path): + scene_cache[path] = load(path) + var visual: Node3D = scene_cache[path].instantiate() root.add_child(visual) if kind == "ice": IceAppearance.apply(visual, location) @@ -57,13 +59,24 @@ func add_colliders(node: Node, kind: String) -> void: body.collision_mask = 2 body.set_meta("piece_type",kind) var material := PhysicsMaterial.new() - material.friction = .25 if kind=="goal_hole" else 1.0 # native pair uses min. + material.friction = 0.0 material.bounce = 0.0 body.physics_material_override = material var collider := CollisionShape3D.new() + var use_box: bool = catalog[kind].get("collisionShape","")=="box" var key := kind + ":" + str(node.name) + var bounds: Dictionary = catalog[kind].boundsBlender + if kind == Booster.KIND: + var base := CollisionShape3D.new() + var box := BoxShape3D.new() + box.size = Vector3(bounds.size[0],catalog[kind].baseHeight,bounds.size[1]) + base.shape = box + base.position.y = float(bounds.min[2])+box.size.y*.5 + body.add_child(base) if not collision_cache.has(key): - if catalog[kind].get("collisionShape","")=="box": + if kind == Booster.KIND: + collision_cache[key]=Booster.guide_shape(node.mesh,float(catalog[kind].baseHeight)) + elif use_box: var shape:=BoxShape3D.new() shape.size=node.mesh.get_aabb().size collision_cache[key]=shape @@ -72,7 +85,7 @@ func add_colliders(node: Node, kind: String) -> void: shape.backface_collision = true collision_cache[key] = shape collider.shape = collision_cache[key] - if catalog[kind].get("collisionShape","")=="box":collider.position=node.mesh.get_aabb().get_center() + if use_box:collider.position=node.mesh.get_aabb().get_center() body.add_child(collider) node.add_child(body) for child in node.get_children(): @@ -117,15 +130,11 @@ func create_ball(type_id: String = "iron_ball") -> RigidBody3D: body.radius = float(data["radius"]) body.mass = float(profile["massKg"]) body.inertia = Vector3.ONE * (0.4 * body.mass * body.radius * body.radius) - body.drag_coefficient = float(profile["dragCoefficient"]) - body.air_density = float(physics["airDensity"]) - body.mu_static = float(pair["staticFriction"]) - body.mu_dynamic = float(pair["dynamicFriction"]) body.rolling_resistance = float(pair["rollingResistance"]) body.collision_layer = 2 body.collision_mask = 3 var material := PhysicsMaterial.new() - material.friction = body.mu_static + material.friction = 0.0 material.bounce = float(pair["restitution"]) body.base_bounce=material.bounce body.physics_material_override = material @@ -158,7 +167,7 @@ func create_box(size: Vector3, location: Vector3, color: Color, solid := true) - root.collision_layer = 1 root.collision_mask = 2 var pm := PhysicsMaterial.new() - pm.friction = 1.0 + pm.friction = 0.0 root.physics_material_override = pm return root @@ -201,7 +210,8 @@ func create_goal_hole(location: Vector3) -> Node3D: return create_piece("goal_hole",location) func crossed_goal(previous: Vector3, current: Vector3, goal: Vector3, radius: float) -> bool: - var height: float=goal.y-float(catalog["goal_hole"].depth) + # Score at the entrance to the narrow throat, including when a block closes the exit. + var height: float=goal.y-float(catalog["goal_hole"].funnelDepth) if previous.y<=height or current.y>height:return false var ratio: float=(previous.y-height)/maxf(previous.y-current.y,.000001) var crossing: Vector3=previous.lerp(current,ratio) diff --git a/playtest/README.md b/playtest/README.md index 002219d..2a31227 100644 --- a/playtest/README.md +++ b/playtest/README.md @@ -4,7 +4,7 @@ | --- | --- | --- | | [baseline](baseline/README.md) | 早期滑槽、铁球、汇流实验。 | `./scripts/playtest.zsh` | | [showcase](showcase) | 当前画风固定展示及示例布局。 | `./scripts/showcase.zsh` | -| [materials](materials/README.md) | 三种小球的入洞、同风场与加速对照。 | `./scripts/materials.zsh` | +| [materials](materials/README.md) | 三种小球的入洞与加速对照。 | `./scripts/materials.zsh` | | [environment](environment/README.md) | 水流 5 m/s、冰块冲击/静置、墙壁与冰面减速对照;长期保留用于三球质量调校。 | `./scripts/environment.zsh` | | [mass_calibration](mass_calibration/README.md) | Python 浮力/质量计算与 8 秒水流位移候选核验。 | `uv run --offline --no-sync python playtest/mass_calibration/calculate.py` | | [tutorial](tutorial/README.md) | 等级一五关:直槽/缓坡、转弯、旋转、急缓坡与综合搭建。 | `./scripts/tutorial.zsh` | diff --git a/playtest/artifacts/baseline/merge_report.json b/playtest/artifacts/baseline/merge_report.json index 9a0e787..33cf86c 100644 --- a/playtest/artifacts/baseline/merge_report.json +++ b/playtest/artifacts/baseline/merge_report.json @@ -17,1501 +17,1445 @@ }, { "a": [ - -3.17831158638, - 2.35492825508118, - 0.000264580768998712 + -3.17839217185974, + 2.35494184494019, + -0.000610466115176678 ], "b": [ - -2.17829847335815, - 2.35491967201233, - 1.0002326965332 + -2.1783287525177, + 2.35491394996643, + 0.999311625957489 ], "entered": 0, "time": 0.1 }, { "a": [ - -3.16180467605591, - 2.34662413597107, - 0.0000564570291317068 + -3.16197466850281, + 2.34675788879395, + -0.00122198520693928 ], "b": [ - -2.16176319122314, - 2.34659862518311, - 0.999962985515594 + -2.16182923316956, + 2.34668350219727, + 0.998692393302917 ], "entered": 0, "time": 0.15 }, { "a": [ - -3.13863205909729, - 2.33502697944641, - -0.000414820562582463 + -3.13891077041626, + 2.33524322509766, + -0.00111552211456001 ], "b": [ - -2.13855814933777, - 2.33503341674805, - 0.999553501605988 + -2.13867807388306, + 2.33512210845947, + 0.998792111873627 ], "entered": 0, "time": 0.2 }, { "a": [ - -3.10879421234131, - 2.32013297080994, - -0.000223880895646289 + -3.10921192169189, + 2.32034587860107, + -0.000319452432449907 ], "b": [ - -2.10870862007141, - 2.32007479667664, - 0.999830663204193 + -2.10888338088989, + 2.32018661499023, + 0.999579787254333 ], "entered": 0, "time": 0.25 }, { "a": [ - -3.07230877876282, - 2.30203318595886, - 0.000458687165519223 + -3.07285213470459, + 2.30222845077515, + 0.000715207075700164 ], "b": [ - -2.07219433784485, - 2.30197358131409, - 1.0004266500473 + -2.07242846488953, + 2.30201482772827, + 1.00067448616028 ], "entered": 0, "time": 0.3 }, { "a": [ - -3.029212474823, - 2.2804594039917, - 0.000708411796949804 + -3.02982068061829, + 2.28064250946045, + 0.00112669065129012 ], "b": [ - -2.02907562255859, - 2.28032875061035, - 1.00048291683197 + -2.02924823760986, + 2.28050065040588, + 1.00114762783051 ], "entered": 0, "time": 0.35 }, { "a": [ - -2.97954058647156, - 2.2555193901062, - 0.000391338369809091 + -2.98011660575867, + 2.25583434104919, + 0.000975909817498177 ], "b": [ - -1.97934997081757, - 2.25538873672485, - 1.00021040439606 + -1.97952330112457, + 2.25553822517395, + 1.00097024440765 ], "entered": 0, "time": 0.4 }, { "a": [ - -2.92319464683533, - 2.22738885879517, - -0.000261798151768744 + -2.92379665374756, + 2.22768235206604, + 0.000239810629864223 ], "b": [ - -1.92297005653381, - 2.22726202011108, - 0.999936997890472 + -1.92313385009766, + 2.22734451293945, + 1.00016093254089 ], "entered": 0, "time": 0.450000000000001 }, { "a": [ - -2.86024928092957, - 2.19588947296143, - -0.000870606279931962 + -2.86086463928223, + 2.19619154930115, + -0.000771499762777239 ], "b": [ - -1.85999000072479, - 2.19572234153748, - 0.999918103218079 + -1.86010801792145, + 2.19580745697021, + 0.999367594718933 ], "entered": 0, "time": 0.500000000000001 }, { "a": [ - -2.79064035415649, - 2.16109442710876, - -0.00090820889454335 + -2.79127168655396, + 2.16143107414246, + -0.00128627987578511 ], "b": [ - -1.7903618812561, - 2.16091871261597, - 1.0000467300415 + -1.79042375087738, + 2.16098737716675, + 0.999055325984955 ], "entered": 0, "time": 0.55 }, { "a": [ - -2.71434903144836, - 2.12301015853882, - -0.000406702689360827 + -2.71497178077698, + 2.12337374687195, + -0.00112272729165852 ], "b": [ - -1.71408021450043, - 2.1228301525116, - 1.00017178058624 + -1.71405184268951, + 2.12287068367004, + 0.999398052692413 ], "entered": 0, "time": 0.6 }, { "a": [ - -2.63148832321167, - 2.08151364326477, - 0.000583939778152853 + -2.63211011886597, + 2.08187508583069, + -0.000369109911844134 ], "b": [ - -1.63119411468506, - 2.08138203620911, - 0.999904632568359 + -1.63110983371735, + 2.08132290840149, + 1.0002293586731 ], "entered": 0, "time": 0.65 }, { "a": [ - -2.54193639755249, - 2.03683304786682, - 0.00124578457325697 + -2.54260158538818, + 2.03714609146118, + 0.000357327633537352 ], "b": [ - -1.54168331623077, - 2.03664708137512, - 0.99960994720459 + -1.54148197174072, + 2.03658819198608, + 1.00088179111481 ], "entered": 0, "time": 0.7 }, { "a": [ - -2.44577193260193, - 1.9887136220932, - 0.00120275118388236 + -2.44647717475891, + 1.98903322219849, + 0.000528858974575996 ], "b": [ - -1.44554734230042, - 1.98856723308563, - 0.999520242214203 + -1.44525122642517, + 1.98843908309937, + 1.00089120864868 ], "entered": 0, "time": 0.75 }, { "a": [ - -2.34355926513672, - 1.98369252681732, - 0.00176057906355709 + -2.34443306922913, + 1.98352348804474, + 0.00555192306637764 ], "b": [ - -1.34343755245209, - 1.98328924179077, - 0.999544203281403 + -1.34332835674286, + 1.9835889339447, + 1.00253844261169 ], "entered": 0, "time": 0.8 }, { "a": [ - -2.2419490814209, - 1.9803466796875, - 0.0000966131337918341 + -2.2442033290863, + 1.98094379901886, + 0.00469284038990736 ], "b": [ - -1.24181544780731, - 1.98037791252136, - 0.99925023317337 + -1.24196839332581, + 1.98039829730988, + 1.00117564201355 ], "entered": 0, "time": 0.849999999999999 }, { "a": [ - -2.14067459106445, - 1.98042833805084, - -0.00180631235707551 + -2.14328813552856, + 1.98034942150116, + -0.000154362118337303 ], "b": [ - -1.14043951034546, - 1.98036897182465, - 0.99943745136261 + -1.14059543609619, + 1.98040914535522, + 0.99859482049942 ], "entered": 0, "time": 0.899999999999999 }, { "a": [ - -2.03982877731323, - 1.98043465614319, - -0.00193952140398324 + -2.04288554191589, + 1.98077869415283, + -0.0040391692891717 ], "b": [ - -1.03930878639221, - 1.98034727573395, - 0.999887228012085 + -1.03955769538879, + 1.98052000999451, + 0.997339248657227 ], "entered": 0, "time": 0.949999999999999 }, { "a": [ - -1.93899285793304, - 1.98037099838257, - -0.000605525448918343 + -1.94319415092468, + 1.98084080219269, + -0.00396247580647469 ], "b": [ - -0.938420116901398, - 1.9803501367569, - 1.00016844272614 + -0.938788414001465, + 1.98041367530823, + 0.998498618602753 ], "entered": 0, "time": 0.999999999999999 }, { "a": [ - -1.8384428024292, - 1.98043131828308, - 0.00119378697127104 + -1.843092918396, + 1.98048031330109, + -0.000789366487879306 ], "b": [ - -0.837866425514221, - 1.98038911819458, - 1.00019657611847 + -0.838234901428223, + 1.98041296005249, + 1.00053477287292 ], "entered": 0, "time": 1.05 }, { "a": [ - -1.73837327957153, - 1.98067474365234, - 0.00204949523322284 + -1.74313473701477, + 1.98049962520599, + 0.00252272794023156 ], "b": [ - -0.737645387649536, - 1.98055422306061, - 1.00006783008575 + -0.738107323646545, + 1.98065948486328, + 1.00189447402954 ], "entered": 0, "time": 1.1 }, { "a": [ - -1.63868653774261, - 1.98040640354156, - 0.00134593737311661 + -1.6438285112381, + 1.98063695430756, + 0.00344795756973326 ], "b": [ - -0.637700200080872, - 1.98046207427979, - 0.999786913394928 + -0.638543128967285, + 1.98056066036224, + 1.00198781490326 ], "entered": 0, "time": 1.15 }, { "a": [ - -1.53919970989227, - 1.98035359382629, - -0.000241321249632165 + -1.54456222057343, + 1.98042392730713, + 0.00171490968205035 ], "b": [ - -0.538079142570496, - 1.98035514354706, - 0.999724686145782 + -0.539086103439331, + 1.98038423061371, + 1.00088262557983 ], "entered": 0, "time": 1.2 }, { "a": [ - -1.44034218788147, - 1.98040544986725, - -0.00132934330031276 + -1.44573426246643, + 1.9805668592453, + -0.000804272247478366 ], "b": [ - -0.439153254032135, - 1.98042333126068, - 0.999613285064697 + -0.44025519490242, + 1.98043954372406, + 0.999605894088745 ], "entered": 0, "time": 1.25 }, { "a": [ - -1.34197592735291, - 1.98049485683441, - -0.00158992619253695 + -1.34761619567871, + 1.980473279953, + -0.00234456965699792 ], "b": [ - -0.340729922056198, - 1.98036551475525, - 0.999505937099457 + -0.341937184333801, + 1.98040437698364, + 0.998693645000458 ], "entered": 0, "time": 1.3 }, { "a": [ - -1.24387431144714, - 1.98039066791534, - -0.00101755897048861 + -1.24985349178314, + 1.98042416572571, + -0.00172037095762789 ], "b": [ - -0.242527291178703, - 1.98035001754761, - 1.00016593933105 + -0.243850454688072, + 1.98041093349457, + 0.998557865619659 ], "entered": 0, "time": 1.35 }, { "a": [ - -1.14603102207184, - 1.98035418987274, - 0.000254862010478973 + -1.1522308588028, + 1.98043382167816, + -0.00000991582055576146 ], "b": [ - -0.14474655687809, - 1.98061525821686, - 1.00114607810974 + -0.146034151315689, + 1.98037195205688, + 0.99937516450882 ], "entered": 0, "time": 1.4 }, { "a": [ - -1.04862582683563, - 1.98045170307159, - 0.00129715108778328 + -1.05499660968781, + 1.98041105270386, + 0.00144344137515873 ], "b": [ - -0.0473612844944, - 1.98046445846558, - 1.00138533115387 + -0.0487107075750828, + 1.98048949241638, + 1.00058245658875 ], "entered": 0, "time": 1.45 }, { "a": [ - -0.95153796672821, - 1.98042142391205, - 0.00166184653062373 + -0.958054542541504, + 1.98042976856232, + 0.00183683400973678 ], "b": [ - 0.0498173981904984, - 1.98037588596344, - 1.00070989131927 + 0.0482252687215805, + 1.98039245605469, + 1.00105559825897 ], "entered": 0, "time": 1.5 }, { "a": [ - -0.854718267917633, - 1.98039400577545, - 0.00108870328404009 + -0.861385703086853, + 1.9805166721344, + 0.0010783972684294 ], "b": [ - 0.146858498454094, - 1.98037254810333, - 0.999359846115112 + 0.144939303398132, + 1.98037564754486, + 1.00070178508759 ], "entered": 0, "time": 1.55 }, { "a": [ - -0.758144497871399, - 1.98041582107544, - -0.000171109844814055 + -0.764896512031555, + 1.98047423362732, + -0.000303705950500444 ], "b": [ - 0.24379126727581, - 1.98053371906281, - 0.998900473117828 + 0.241512507200241, + 1.98034739494324, + 0.999888300895691 ], "entered": 0, "time": 1.6 }, { "a": [ - -0.661675035953522, - 1.98039531707764, - -0.00111468241084367 + -0.668614387512207, + 1.98040127754211, + -0.00124090211465955 ], "b": [ - 0.340386360883713, - 1.98044669628143, - 0.999418318271637 + 0.337929278612137, + 1.9804904460907, + 0.999426484107971 ], "entered": 0, "time": 1.65 }, { "a": [ - -0.565492331981659, - 1.98039782047272, - -0.00116832728963345 + -0.57256281375885, + 1.98040890693665, + -0.00140112510416657 ], "b": [ - 0.436428755521774, - 1.980424284935, - 1.00042581558228 + 0.433989316225052, + 1.98044347763062, + 0.99944931268692 ], "entered": 0, "time": 1.7 }, { "a": [ - -0.469827920198441, - 1.98045301437378, - -0.000386643107049167 + -0.477020025253296, + 1.98042118549347, + -0.000587725429795682 ], "b": [ - 0.532079339027405, - 1.98038411140442, - 1.0008819103241 + 0.52944803237915, + 1.98041164875031, + 0.999589562416077 ], "entered": 0, "time": 1.75 }, { "a": [ - -0.375509738922119, - 1.98228240013123, - 0.00268689705990255 + -0.382715225219727, + 1.98175835609436, + 0.00246325321495533 ], "b": [ - 0.627529740333557, - 1.98036754131317, - 1.00053513050079 + 0.624756872653961, + 1.98038196563721, + 0.999751091003418 ], "entered": 0, "time": 1.8 }, { "a": [ - -0.287577658891678, - 1.98741555213928, - 0.0157017707824707 + -0.29396316409111, + 1.98691499233246, + 0.0146711179986596 ], "b": [ - 0.722810804843903, - 1.98035573959351, - 0.999712705612183 + 0.719829201698303, + 1.98035442829132, + 0.999969184398651 ], "entered": 0, "time": 1.85 }, { "a": [ - -0.207935646176338, - 1.98770749568939, - 0.04150016233325 + -0.213616937398911, + 1.98803222179413, + 0.0392699092626572 ], "b": [ - 0.818106770515442, - 1.98038601875305, - 0.99907773733139 + 0.814551055431366, + 1.98034977912903, + 0.999837934970856 ], "entered": 0, "time": 1.9 }, { "a": [ - -0.131077200174332, - 1.98278725147247, - 0.0792382284998894 + -0.136575400829315, + 1.98369061946869, + 0.0753791332244873 ], "b": [ - 0.913168966770172, - 1.9803718328476, - 0.999376654624939 + 0.909390091896057, + 1.98034334182739, + 1.00002610683441 ], "entered": 0, "time": 1.95 }, { "a": [ - -0.0533563569188118, - 1.98047387599945, - 0.125131338834763 + -0.0588155090808868, + 1.98076713085175, + 0.120840929448605 ], "b": [ - 1.00787937641144, - 1.98037588596344, - 1.00071048736572 + 1.00386655330658, + 1.9803706407547, + 1.00059914588928 ], "entered": 0, "time": 2.0 }, { "a": [ - 0.0231543108820915, - 1.98066461086273, - 0.172044783830643 + 0.0178612153977156, + 1.98053205013275, + 0.168668538331985 ], "b": [ - 1.10206544399261, - 1.98043096065521, - 1.00186347961426 + 1.09794425964355, + 1.98036897182465, + 1.00056302547455 ], "entered": 0, "time": 2.05 }, { "a": [ - 0.099859282374382, - 1.98040044307709, - 0.217260226607323 + 0.094790406525135, + 1.98052203655243, + 0.214479759335518 ], "b": [ - 1.19570159912109, - 1.98043465614319, - 1.00193905830383 + 1.19193136692047, + 1.98034274578094, + 1.00001418590546 ], "entered": 0, "time": 2.1 }, { "a": [ - 0.176871120929718, - 1.98063516616821, - 0.262263149023056 + 0.172179996967316, + 1.98065829277039, + 0.26000589132309 ], "b": [ - 1.28921902179718, - 1.98039293289185, - 1.00106561183929 + 1.2858704328537, + 1.98044216632843, + 0.999752283096313 ], "entered": 0, "time": 2.15 }, { "a": [ - 0.251551628112793, - 1.98154270648956, - 0.309692710638046 + 0.247534349560738, + 1.98142492771149, + 0.307464182376862 ], "b": [ - 1.38248538970947, - 1.98032438755035, - 0.99962991476059 + 1.37926006317139, + 1.98032402992249, + 0.999622881412506 ], "entered": 0, "time": 2.19999999999999 }, { "a": [ - 0.322315275669098, - 1.98110771179199, - 0.361498773097992 + 0.319015145301819, + 1.98121392726898, + 0.358958959579468 ], "b": [ - 1.47569942474365, - 1.98048007488251, - 0.997969269752502 + 1.47245264053345, + 1.98055076599121, + 0.998999953269958 ], "entered": 0, "time": 2.24999999999999 }, { "a": [ - 0.390266597270966, - 1.9805543422699, - 0.417083591222763 + 0.387726128101349, + 1.98041653633118, + 0.414213329553604 ], "b": [ - 1.56838047504425, - 1.9804550409317, - 0.99777752161026 + 1.56527709960938, + 1.98038518428802, + 0.999094903469086 ], "entered": 0, "time": 2.29999999999999 }, { "a": [ - 0.457278788089752, - 1.98062384128571, - 0.472235292196274 + 0.455405056476593, + 1.98048663139343, + 0.469392091035843 ], "b": [ - 1.66042375564575, - 1.9803991317749, - 0.999014258384705 + 1.6575573682785, + 1.98042869567871, + 0.999977171421051 ], "entered": 0, "time": 2.34999999999999 }, { "a": [ - 0.524836242198944, - 1.98077166080475, - 0.523641109466553 + 0.523740649223328, + 1.98070287704468, + 0.52202183008194 ], "b": [ - 1.7521094083786, - 1.98038291931152, - 1.00085496902466 + 1.74935972690582, + 1.98038470745087, + 1.00089430809021 ], "entered": 0, "time": 2.39999999999999 }, { "a": [ - 0.594832718372345, - 1.98046457767487, - 0.572699010372162 + 0.593448400497437, + 1.98052370548248, + 0.572209715843201 ], "b": [ - 1.8431943655014, - 1.98044312000275, - 1.00211668014526 + 1.84060966968536, + 1.98039269447327, + 1.00106036663055 ], "entered": 0, "time": 2.44999999999999 }, { "a": [ - 0.665389478206635, - 1.98055529594421, - 0.621433973312378 + 0.663894057273865, + 1.9805554151535, + 0.621430218219757 ], "b": [ - 1.93385851383209, - 1.98044395446777, - 1.00213289260864 + 1.93164765834808, + 1.9803740978241, + 1.00045692920685 ], "entered": 0, "time": 2.49999999999999 }, { "a": [ - 0.734963059425354, - 1.98058903217316, - 0.67061573266983 + 0.733719766139984, + 1.98055756092072, + 0.670782566070557 ], "b": [ - 2.02430081367493, - 1.9804083108902, - 1.00084412097931 + 2.02274084091187, + 1.98036241531372, + 0.999572932720184 ], "entered": 0, "time": 2.54999999999999 }, { "a": [ - 0.803547859191895, - 1.98035430908203, - 0.720338106155396 + 0.802771031856537, + 1.98034584522247, + 0.720188438892365 ], "b": [ - 2.11479449272156, - 1.98042690753937, - 0.999274373054504 + 2.11366295814514, + 1.98044681549072, + 0.999326407909393 ], "entered": 0, "time": 2.59999999999999 }, { "a": [ - 0.871598720550537, - 1.98065519332886, - 0.769512295722961 + 0.871528327465057, + 1.98050141334534, + 0.768812477588654 ], "b": [ - 2.20534777641296, - 1.98042857646942, - 0.9981889128685 + 2.20435285568237, + 1.98035001754761, + 0.999832093715668 ], "entered": 0, "time": 2.64999999999999 }, { "a": [ - 0.939828097820282, - 1.98114418983459, - 0.815074622631073 + 0.940692663192749, + 1.9808703660965, + 0.814521074295044 ], "b": [ - 2.29567313194275, - 1.98042869567871, - 0.998186588287354 + 2.29447913169861, + 1.98037946224213, + 1.00078225135803 ], "entered": 0, "time": 2.69999999999999 }, { "a": [ - 1.01023209095001, - 1.98136532306671, - 0.856622397899628 + 1.01136100292206, + 1.9811749458313, + 0.856402814388275 ], "b": [ - 2.38571429252625, - 1.98056387901306, - 0.999190390110016 + 2.38411402702332, + 1.98038613796234, + 1.00092434883118 ], "entered": 0, "time": 2.74999999999999 }, { "a": [ - 1.08256006240845, - 1.98126363754272, - 0.894773364067078 + 1.08374035358429, + 1.9812285900116, + 0.894914627075195 ], "b": [ - 2.47520637512207, - 1.9803751707077, - 1.00069403648376 + 2.47350859642029, + 1.98036110401154, + 1.0003958940506 ], "entered": 0, "time": 2.79999999999999 }, { "a": [ - 1.15601778030396, - 1.98113298416138, - 0.930506765842438 + 1.15715205669403, + 1.98112261295319, + 0.931012868881226 ], "b": [ - 2.56365823745728, - 1.98042416572571, - 1.00171959400177 + 2.56223106384277, + 1.98035788536072, + 0.999668598175049 ], "entered": 0, "time": 2.84999999999999 }, { "a": [ - 1.23011291027069, - 1.98102879524231, - 0.964614748954773 + 1.23114740848541, + 1.98104286193848, + 0.965465426445007 ], "b": [ - 2.65157771110535, - 1.98052334785461, - 1.00158786773682 + 2.65089440345764, + 1.98037970066071, + 0.999212324619293 ], "entered": 0, "time": 2.89999999999999 }, { "a": [ - 1.30417239665985, - 1.98042166233063, - 0.998058021068573 + 1.30504560470581, + 1.98037171363831, + 0.99926882982254 ], "b": [ - 2.73914861679077, - 1.98044490814209, - 1.0005863904953 + 2.73924469947815, + 1.98041951656342, + 0.999545872211456 ], "entered": 0, "time": 2.94999999999999 }, { "a": [ - 1.37191128730774, - 1.99241781234741, - 1.01806104183197 + 1.37263166904449, + 1.99313986301422, + 1.01835477352142 ], "b": [ - 2.82682299613953, - 1.98037397861481, - 0.999329328536987 + 2.82700157165527, + 1.98038184642792, + 1.00022411346436 ], "entered": 0, "time": 2.99999999999999 }, { "a": [ - 1.43238830566406, - 1.99504959583282, - 1.01894164085388 + 1.43358862400055, + 1.99487626552582, + 1.01889848709106 ], "b": [ - 2.91446161270142, - 1.98040270805359, - 0.998731315135956 + 2.91445899009705, + 1.98036277294159, + 1.00043368339539 ], "entered": 0, "time": 3.04999999999999 }, { "a": [ - 1.49300587177277, - 1.98349177837372, - 1.01041352748871 + 1.49480378627777, + 1.98317635059357, + 1.00980687141418 ], "b": [ - 3.00180983543396, - 1.98038983345032, - 0.999000072479248 + 3.00158333778381, + 1.98034536838531, + 1.00006890296936 ], "entered": 0, "time": 3.09999999999999 }, { "a": [ - 1.55994379520416, - 1.98073947429657, - 0.996116816997528 + 1.56173658370972, + 1.98085844516754, + 0.995644986629486 ], "b": [ - 3.08881211280823, - 1.98034822940826, - 0.9998699426651 + 3.08875632286072, + 1.98036479949951, + 0.999525606632233 ], "entered": 0, "time": 3.14999999999999 }, { "a": [ - 1.62541544437408, - 1.98387348651886, - 0.988766491413116 + 1.62622582912445, + 1.98392522335052, + 0.988696813583374 ], "b": [ - 3.17523145675659, - 1.98037469387054, - 1.00068187713623 + 3.17580533027649, + 1.98037421703339, + 0.999324917793274 ], "entered": 0, "time": 3.19999999999999 }, { "a": [ - 1.68884921073914, - 1.9829283952713, - 0.990334868431091 + 1.68906807899475, + 1.98290550708771, + 0.990527331829071 ], "b": [ - 3.26133179664612, - 1.98051011562347, - 1.00083315372467 + 3.26267647743225, + 1.98043608665466, + 0.999729514122009 ], "entered": 0, "time": 3.24999999999999 }, { "a": [ - 1.75518429279327, - 1.98039627075195, - 0.99886429309845 + 1.75473546981812, + 1.98038125038147, + 0.999179482460022 ], "b": [ - 3.34732794761658, - 1.98037660121918, - 1.00043082237244 + 3.34899997711182, + 1.98036658763885, + 1.00051307678223 ], "entered": 0, "time": 3.29999999999999 }, { "a": [ - 1.82214522361755, - 1.9817351102829, - 1.00703382492065 + 1.82144892215729, + 1.98181354999542, + 1.00722754001617 ], "b": [ - 3.43317890167236, - 1.9803581237793, - 0.999663710594177 + 3.43477654457092, + 1.98036968708038, + 1.00057983398438 ], "entered": 0, "time": 3.34999999999999 }, { "a": [ - 1.88788533210754, - 1.98231041431427, - 1.00841236114502 + 1.88710510730743, + 1.98231828212738, + 1.00853478908539 ], "b": [ - 3.51914477348328, - 1.98009920120239, - 0.999440550804138 + 3.52029800415039, + 1.97999620437622, + 0.99993097782135 ], "entered": 0, "time": 3.39999999999999 }, { "a": [ - 1.95382070541382, - 1.98062098026276, - 1.00334048271179 + 1.95288383960724, + 1.98060417175293, + 1.00334715843201 ], "b": [ - 3.6025607585907, - 1.97795045375824, - 1.00012612342834 + 3.60344767570496, + 1.97806084156036, + 0.999765276908875 ], "entered": 0, "time": 3.44999999999999 }, { "a": [ - 2.01990413665771, - 1.98078739643097, - 0.995927035808563 + 2.01870942115784, + 1.98070633411407, + 0.996248006820679 ], "b": [ - 3.68127179145813, + 3.68225979804993, 1.9799998998642, - 1.00083863735199 + 0.999544978141785 ], "entered": 0, "time": 3.49999999999999 }, { "a": [ - 2.08464789390564, - 1.98173904418945, - 0.992863774299622 + 2.08303737640381, + 1.98163747787476, + 0.993159592151642 ], "b": [ - 3.75979685783386, - 1.96952879428864, - 1.00091123580933 + 3.76088571548462, + 1.9692314863205, + 0.998714208602905 ], "entered": 0, "time": 3.54999999999999 }, { "a": [ - 2.14902877807617, - 1.98086023330688, - 0.995637655258179 + 2.14700269699097, + 1.98087346553802, + 0.995585560798645 ], "b": [ - 3.83844399452209, - 1.93586730957031, - 1.00072574615479 + 3.83963632583618, + 1.9352114200592, + 0.997655212879181 ], "entered": 0, "time": 3.59999999999999 }, { "a": [ - 2.21419906616211, - 1.98054945468903, - 1.0014556646347 + 2.21181058883667, + 1.98036897182465, + 1.00131750106812 ], "b": [ - 3.91709327697754, - 1.87769937515259, - 1.00053691864014 + 3.91838884353638, + 1.87668144702911, + 0.996593773365021 ], "entered": 0, "time": 3.64999999999999 }, { "a": [ - 2.2785632610321, - 1.98114216327667, - 1.00530242919922 + 2.27617478370667, + 1.98105895519257, + 1.00495326519012 ], "b": [ - 3.99574136734009, - 1.79500699043274, - 1.00034809112549 + 3.99714016914368, + 1.7936270236969, + 0.995532333850861 ], "entered": 0, "time": 3.69999999999999 }, { "a": [ - 2.34227347373962, - 1.98090159893036, - 1.00430357456207 + 2.34010457992554, + 1.98094749450684, + 1.00425314903259 ], "b": [ - 4.00690984725952, - 1.72845327854156, - 1.00041198730469 + 4.00832033157349, + 1.72408580780029, + 0.99828177690506 ], "entered": 0, "time": 3.74999999999999 }, { "a": [ - 2.40634369850159, - 1.98034286499023, - 0.999982714653015 + 2.4039785861969, + 1.98038375377655, + 1.00024509429932 ], "b": [ - 3.98434042930603, - 1.65770637989044, - 1.00060224533081 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "entered": 0, + "entered": 1, "time": 3.79999999999999 }, { "a": [ - 2.47019863128662, - 1.98069250583649, - 0.996302366256714 + 2.46756815910339, + 1.98067498207092, + 0.99658465385437 ], "b": [ - 3.98018765449524, - 1.56699693202972, - 1.00057399272919 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "entered": 0, + "entered": 1, "time": 3.84999999999999 }, { "a": [ - 2.53311395645142, - 1.98071253299713, - 0.996223330497742 + 2.53018069267273, + 1.9807186126709, + 0.996264576911926 ], "b": [ - 3.98018479347229, - 1.45279169082642, - 1.00047171115875 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "entered": 0, + "entered": 1, "time": 3.89999999999999 }, { "a": [ - 2.59585905075073, - 1.98038125038147, - 0.999176979064941 + 2.59267067909241, + 1.98042237758636, + 0.999034821987152 ], "b": [ - 3.98018312454224, - 1.31406331062317, - 1.00036942958832 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "entered": 0, + "entered": 1, "time": 3.94999999999999 }, { "a": [ - 2.65814852714539, - 1.98049986362457, - 1.0025247335434 + 2.65489530563354, + 1.98048079013824, + 1.0021755695343 ], "b": [ - 3.98018169403076, - 1.15081202983856, - 1.00026714801788 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "entered": 0, + "entered": 1, "time": 3.99999999999999 }, { "a": [ - 2.71982669830322, - 1.98067998886108, - 1.00364792346954 + 2.71660923957825, + 1.98065996170044, + 1.00318741798401 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.04999999999999 }, { "a": [ - 2.78137302398682, - 1.98043549060822, - 1.00195813179016 + 2.77816486358643, + 1.98043751716614, + 1.00151765346527 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.09999999999999 }, { "a": [ - 2.84290719032288, - 1.98037362098694, - 0.999411761760712 + 2.83962345123291, + 1.98050928115845, + 0.998753428459167 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.15 }, { "a": [ - 2.90427041053772, - 1.98047804832458, - 0.997753143310547 + 2.90071582794189, + 1.98058080673218, + 0.99723881483078 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.2 }, { "a": [ - 2.96538901329041, - 1.98052656650543, - 0.997994661331177 + 2.96143531799316, + 1.98043704032898, + 0.998011887073517 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.25 }, { "a": [ - 3.02624320983887, - 1.98041379451752, - 0.999372184276581 + 3.0219419002533, + 1.98039352893829, + 1.00021922588348 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.3 }, { "a": [ - 3.08667635917664, - 1.98039352893829, - 1.00107729434967 + 3.08198571205139, + 1.98044157028198, + 1.00208401679993 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.35000000000001 }, { "a": [ - 3.14673113822937, - 1.98049116134644, - 1.00187313556671 + 3.14169383049011, + 1.98042976856232, + 1.00183737277985 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.40000000000001 }, { "a": [ - 3.20649862289429, - 1.98041892051697, - 1.00160944461823 + 3.2012951374054, + 1.98036086559296, + 1.00039565563202 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.45000000000001 }, { "a": [ - 3.26604008674622, - 1.98036336898804, - 1.00044441223145 + 3.260666847229, + 1.98040509223938, + 0.998678505420685 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.50000000000001 }, { "a": [ - 3.32544636726379, - 1.98039197921753, - 0.998954474925995 + 3.31985545158386, + 1.98043894767761, + 0.997970879077911 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.55000000000002 }, { "a": [ - 3.38473343849182, - 1.98042464256287, - 0.9981689453125 + 3.37878441810608, + 1.98042809963226, + 0.998199105262756 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.60000000000002 }, { "a": [ - 3.44380402565002, - 1.98041164875031, - 0.998540222644806 + 3.43743658065796, + 1.9803740978241, + 0.999328911304474 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.65000000000002 }, { "a": [ - 3.50255656242371, - 1.98034965991974, - 0.999839723110199 + 3.49571681022644, + 1.98038339614868, + 1.00086402893066 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.70000000000002 }, { "a": [ - 3.56083154678345, - 1.97432351112366, - 1.00112867355347 + 3.55379009246826, + 1.97571551799774, + 1.0016131401062 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.75000000000003 }, { "a": [ - 3.61491751670837, - 1.9790723323822, - 1.0028373003006 + 3.60822319984436, + 1.97843265533447, + 1.00269520282745 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.80000000000003 }, { "a": [ - 3.66712522506714, + 3.65985584259033, 1.9799998998642, - 1.0043877363205 + 1.00368344783783 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.85000000000003 }, { "a": [ - 3.71895360946655, - 1.97761499881744, - 1.0057338476181 + 3.7110333442688, + 1.97853028774261, + 1.00450325012207 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.90000000000003 }, { "a": [ - 3.77136373519897, - 1.96598386764526, - 1.00655746459961 + 3.76263332366943, + 1.96859514713287, + 1.00490534305573 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 4.95000000000004 }, { "a": [ - 3.82527732849121, - 1.94285011291504, - 1.00677716732025 + 3.81567668914795, + 1.94787120819092, + 1.00478208065033 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 5.00000000000004 }, { "a": [ - 3.88113045692444, - 1.90323460102081, - 1.00657248497009 + 3.8707435131073, + 1.91205942630768, + 1.00422883033752 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 5.05000000000004 }, { "a": [ - 3.93750405311584, - 1.84044349193573, - 1.00629210472107 + 3.92668557167053, + 1.85411560535431, + 1.00355792045593 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 5.10000000000004 }, { "a": [ - 3.99387717247009, - 1.7531281709671, - 1.00601172447205 + 3.98262715339661, + 1.77164745330811, + 1.00288701057434 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 1, "time": 5.15000000000005 }, { "a": [ - 4.00161123275757, - 1.66116964817047, - 1.00379490852356 + 4.01568841934204, + 1.67285668849945, + 1.00203847885132 ], "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 - ], - "entered": 1, - "time": 5.20000000000005 - }, - { - "a": [ - 3.98502588272095, - 1.55462765693665, - 1.00061011314392 - ], - "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 - ], - "entered": 1, - "time": 5.25000000000005 - }, - { - "a": [ - 3.98032402992249, - 1.42653548717499, - 0.997368514537811 - ], - "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 - ], - "entered": 1, - "time": 5.30000000000005 - }, - { - "a": [ - 3.98104000091553, - 1.2752788066864, - 0.994208455085754 - ], - "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 - ], - "entered": 1, - "time": 5.35000000000006 - }, - { - "a": [ - 3.98223185539246, - 1.09962642192841, - 0.991219997406006 - ], - "b": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "entered": 2, - "time": 5.40000000000006 + "time": 5.20000000000005 } ], "passed": 16, @@ -1544,38 +1488,38 @@ { "detail": { "a_position": [ - 3.98223185539246, - 1.09962642192841, - 0.991219997406006 + 4.01568841934204, + 1.67285668849945, + 1.00203847885132 ], "b_position": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], "ball_collision_frames": 0, "hole_events": [ { "ballId": "iron_B", "position": [ - 3.98018145561218, - 1.12121939659119, - 1.00025010108948 + 3.99325037002563, + 1.67677927017212, + 1.00138509273529 ], - "time": 4.00833333333332 + "time": 3.78333333333332 }, { "ballId": "iron_A", "position": [ - 3.98223185539246, - 1.09962642192841, - 0.991219997406006 + 4.01568841934204, + 1.67285668849945, + 1.00203847885132 ], - "time": 5.40000000000006 + "time": 5.20000000000005 } ], - "status": "成功入洞 2/2 · 5.40 秒", - "time": 5.40000000000006 + "status": "成功入洞 2/2 · 5.20 秒", + "time": 5.20000000000005 }, "name": "both_balls_enter_common_hole", "passed": true @@ -1617,7 +1561,7 @@ }, { "detail": { - "time": 5.38333333333339 + "time": 5.19166666666671 }, "name": "repeat_run_completes", "passed": true diff --git a/playtest/artifacts/baseline/playtest_report.json b/playtest/artifacts/baseline/playtest_report.json index 18db839..d1bad3e 100644 --- a/playtest/artifacts/baseline/playtest_report.json +++ b/playtest/artifacts/baseline/playtest_report.json @@ -1,6 +1,6 @@ { "failed": 0, - "passed": 30, + "passed": 28, "results": [ { "detail": { @@ -17,14 +17,14 @@ }, { "detail": { - "max_speed": 3.55942463874817, + "max_speed": 2.58126783370972, "position": [ - 1.98111593723297, - 0.624034285545349, - 0.00604082643985748 + 1.9847160577774, + 1.17056846618652, + 0.0125022642314434 ], - "status": "成功入洞 · 2.90 秒", - "time": 2.89999999999999 + "status": "成功入洞 · 2.69 秒", + "time": 2.69166666666666 }, "name": "default_course_reaches_hole", "passed": true @@ -61,22 +61,12 @@ }, { "detail": {}, - "name": "library_turn_cw", + "name": "library_turn_90", "passed": true }, { "detail": {}, - "name": "rotation_cycle_turn_cw", - "passed": true - }, - { - "detail": {}, - "name": "library_turn_ccw", - "passed": true - }, - { - "detail": {}, - "name": "rotation_cycle_turn_ccw", + "name": "rotation_cycle_turn_90", "passed": true }, { diff --git a/playtest/artifacts/environment/roundtrip.json b/playtest/artifacts/environment/roundtrip.json new file mode 100644 index 0000000..a963fd1 --- /dev/null +++ b/playtest/artifacts/environment/roundtrip.json @@ -0,0 +1,19 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [], + "entities": [ + { + "id": "water", + "kind": "water", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "quarter": 0 + } + ], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/environment/workshop_ice.json b/playtest/artifacts/environment/workshop_ice.json new file mode 100644 index 0000000..7c855a5 --- /dev/null +++ b/playtest/artifacts/environment/workshop_ice.json @@ -0,0 +1,19 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [], + "entities": [ + { + "id": "piece_4309426_3", + "kind": "ice", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "quarter": 1 + } + ], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/environment/workshop_wall.json b/playtest/artifacts/environment/workshop_wall.json new file mode 100644 index 0000000..6306c23 --- /dev/null +++ b/playtest/artifacts/environment/workshop_wall.json @@ -0,0 +1,19 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [], + "entities": [ + { + "id": "piece_4288175_1", + "kind": "wall", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "quarter": 1 + } + ], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/environment/workshop_water.json b/playtest/artifacts/environment/workshop_water.json new file mode 100644 index 0000000..23cfb34 --- /dev/null +++ b/playtest/artifacts/environment/workshop_water.json @@ -0,0 +1,19 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [], + "entities": [ + { + "id": "piece_4297824_2", + "kind": "water", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "quarter": 1 + } + ], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/reorganization/finder/root.DS_Store b/playtest/artifacts/reorganization/finder/root.DS_Store new file mode 100644 index 0000000..e098ba2 Binary files /dev/null and b/playtest/artifacts/reorganization/finder/root.DS_Store differ diff --git a/playtest/artifacts/styled/asset_directional_boost.json b/playtest/artifacts/styled/asset_directional_boost.json new file mode 100644 index 0000000..05fb1e7 --- /dev/null +++ b/playtest/artifacts/styled/asset_directional_boost.json @@ -0,0 +1,24 @@ +{ + "sourceManifest": { + "files": { + "assets/collections/baseline/source/collection.blend": "2d948b29f8332fa0b8faaa60ce7e92d5bf3b75c05e2dbd17795e63ea35b3d197", + "assets/collections/baseline/catalog.json": "3bbe2a939f3d4542c6c733548ff0e0549db332a30e5c2f09d51fe0aba0faa7a0", + "assets/collections/baseline/physics.json": "b0f2e8fa1637de0ee55c38471be808ccf3e018eaf1c3003e5e16c8b1a8c8de22" + }, + "copiedAtUnix": 1794799536.467038, + "readOnlyBaseline": true, + "geometryRevision": "solid_base_v1", + "physicsUpdatedAtUnix": 1794810704.149133 + }, + "models": [ + { + "id": "directional_boost", + "collisionGeometryUnchanged": false, + "vertices": 925, + "separateBlend": "assets/blocks/directional_boost/source/model.blend" + } + ], + "radius": 0.3, + "physicalMaterialUnchanged": true, + "outlineGeometry": "visual only" +} \ No newline at end of file diff --git a/playtest/artifacts/styled/assets.json b/playtest/artifacts/styled/assets.json index 66d2216..c709260 100644 --- a/playtest/artifacts/styled/assets.json +++ b/playtest/artifacts/styled/assets.json @@ -3,11 +3,12 @@ "files": { "assets/collections/baseline/source/collection.blend": "2d948b29f8332fa0b8faaa60ce7e92d5bf3b75c05e2dbd17795e63ea35b3d197", "assets/collections/baseline/catalog.json": "3bbe2a939f3d4542c6c733548ff0e0549db332a30e5c2f09d51fe0aba0faa7a0", - "assets/collections/baseline/physics.json": "b12802f7763c162d037b0795e79272955031162790424831e88c939288f5526e" + "assets/collections/baseline/physics.json": "b0f2e8fa1637de0ee55c38471be808ccf3e018eaf1c3003e5e16c8b1a8c8de22" }, "copiedAtUnix": 1794799536.467038, "readOnlyBaseline": true, - "geometryRevision": "solid_base_v1" + "geometryRevision": "solid_base_v1", + "physicsUpdatedAtUnix": 1794810704.149133 }, "models": [ { @@ -17,16 +18,10 @@ "separateBlend": "assets/chutes/straight/source/model.blend" }, { - "id": "turn_cw", + "id": "turn_90", "collisionGeometryUnchanged": true, "vertices": 1657, - "separateBlend": "assets/chutes/turn_cw/source/model.blend" - }, - { - "id": "turn_ccw", - "collisionGeometryUnchanged": true, - "vertices": 1657, - "separateBlend": "assets/chutes/turn_ccw/source/model.blend" + "separateBlend": "assets/chutes/turn_90/source/model.blend" }, { "id": "gentle", @@ -67,8 +62,20 @@ { "id": "directional_boost", "collisionGeometryUnchanged": false, - "vertices": 8, + "vertices": 925, "separateBlend": "assets/blocks/directional_boost/source/model.blend" + }, + { + "id": "water", + "collisionGeometryUnchanged": false, + "vertices": 8, + "separateBlend": "assets/blocks/water/source/model.blend" + }, + { + "id": "ice", + "collisionGeometryUnchanged": false, + "vertices": 8, + "separateBlend": "assets/blocks/ice/source/model.blend" } ], "radius": 0.3, diff --git a/playtest/artifacts/styled/ball_materials_roundtrip.json b/playtest/artifacts/styled/ball_materials_roundtrip.json new file mode 100644 index 0000000..69a9aa1 --- /dev/null +++ b/playtest/artifacts/styled/ball_materials_roundtrip.json @@ -0,0 +1,51 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [ + { + "ballTypeId": "wood_ball", + "id": "wood_ball_210846_1", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + 0.0, + 3.5, + 0.0 + ] + }, + { + "ballTypeId": "ceramic_ball", + "id": "ceramic_ball_214670_2", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + 2.0, + 3.5, + 0.0 + ] + }, + { + "ballTypeId": "iron_ball", + "id": "iron_ball_216944_3", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + 4.0, + 3.5, + 0.0 + ] + } + ], + "entities": [], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/styled/ball_placement_report.json b/playtest/artifacts/styled/ball_placement_report.json index 478856c..5687002 100644 --- a/playtest/artifacts/styled/ball_placement_report.json +++ b/playtest/artifacts/styled/ball_placement_report.json @@ -1,6 +1,6 @@ { "failed": 0, - "passed": 36, + "passed": 68, "results": [ { "detail": { @@ -26,9 +26,9 @@ { "detail": { "position": [ - 0.0999999940395355, + 0.0, 3.3199999332428, - 0.0999999940395355 + 0.0 ] }, "name": "mouse_picks_wall_top", @@ -82,123 +82,178 @@ }, { "detail": { - "position": [ - -0.0499999970197678, - 2.0, - 0.0 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_straight_0", + "name": "chute_midpoint_straight_0_0_0.12", "passed": true }, { "detail": { - "position": [ - 0.0, - 2.0, - -0.0499999970197678 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_straight_1", + "name": "chute_midpoint_straight_0_0_0.35", "passed": true }, { "detail": { - "position": [ - 0.0499999970197678, - 2.0, - 0.0 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_straight_2", + "name": "chute_midpoint_straight_1_0_0.12", "passed": true }, { "detail": { - "position": [ - 0.0, - 2.0, - 0.0499999970197678 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_straight_3", + "name": "chute_midpoint_straight_1_0_0.35", "passed": true }, { "detail": { - "position": [ - -0.179999992251396, - 2.0, - 0.119999997317791 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_turn_90_0", + "name": "chute_midpoint_straight_2_0_0.12", "passed": true }, { "detail": { - "position": [ - -0.119999997317791, - 2.0, - -0.179999992251396 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_turn_90_1", + "name": "chute_midpoint_straight_2_0_0.35", "passed": true }, { "detail": { - "position": [ - 0.179999992251396, - 2.0, - -0.119999997317791 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_turn_90_2", + "name": "chute_midpoint_straight_3_0_0.12", "passed": true }, { "detail": { - "position": [ - 0.119999997317791, - 2.0, - 0.179999992251396 - ] + "actual": "(0.0, 2.0, 0.0)", + "expected": "(0.0, 2.0, 0.0)" }, - "name": "chute_pick_turn_90_3", + "name": "chute_midpoint_straight_3_0_0.35", "passed": true }, { "detail": { - "position": [ - -0.179999992251396, - 1.68999993801117, - 0.0 - ] + "actual": "(-0.15, 2.0, 0.15)", + "expected": "(-0.15, 2.0, 0.15)" }, - "name": "chute_pick_gentle_0", + "name": "chute_midpoint_turn_90_0_0_0.12", "passed": true }, { "detail": { - "position": [ - 0.0, - 1.68999993801117, - -0.179999992251396 - ] + "actual": "(-0.15, 2.0, 0.15)", + "expected": "(-0.15, 2.0, 0.15)" }, - "name": "chute_pick_gentle_1", + "name": "chute_midpoint_turn_90_0_0_0.35", "passed": true }, { "detail": { - "position": [ - 0.179999992251396, - 1.68999993801117, - 0.0 - ] + "actual": "(-0.15, 2.0, -0.15)", + "expected": "(-0.15, 2.0, -0.15)" }, - "name": "chute_pick_gentle_2", + "name": "chute_midpoint_turn_90_1_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(-0.15, 2.0, -0.15)", + "expected": "(-0.15, 2.0, -0.15)" + }, + "name": "chute_midpoint_turn_90_1_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.15, 2.0, -0.15)", + "expected": "(0.15, 2.0, -0.15)" + }, + "name": "chute_midpoint_turn_90_2_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.15, 2.0, -0.15)", + "expected": "(0.15, 2.0, -0.15)" + }, + "name": "chute_midpoint_turn_90_2_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.15, 2.0, 0.15)", + "expected": "(0.15, 2.0, 0.15)" + }, + "name": "chute_midpoint_turn_90_3_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.15, 2.0, 0.15)", + "expected": "(0.15, 2.0, 0.15)" + }, + "name": "chute_midpoint_turn_90_3_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(-0.13, 1.72, 0.0)", + "expected": "(-0.13, 1.72, 0.0)" + }, + "name": "chute_midpoint_gentle_0_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(-0.13, 1.72, 0.0)", + "expected": "(-0.13, 1.72, 0.0)" + }, + "name": "chute_midpoint_gentle_0_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.72, -0.13)", + "expected": "(0.0, 1.72, -0.13)" + }, + "name": "chute_midpoint_gentle_1_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.72, -0.13)", + "expected": "(0.0, 1.72, -0.13)" + }, + "name": "chute_midpoint_gentle_1_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.13, 1.72, 0.0)", + "expected": "(0.13, 1.72, 0.0)" + }, + "name": "chute_midpoint_gentle_2_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.13, 1.72, 0.0)", + "expected": "(0.13, 1.72, 0.0)" + }, + "name": "chute_midpoint_gentle_2_0_0.35", "passed": true }, { @@ -213,108 +268,245 @@ }, { "detail": { - "position": [ - 0.0, - 1.68999993801117, - 0.179999992251396 - ] + "actual": "(0.0, 1.72, 0.13)", + "expected": "(0.0, 1.72, 0.13)" }, - "name": "chute_pick_gentle_3", + "name": "chute_midpoint_gentle_3_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.72, 0.13)", + "expected": "(0.0, 1.72, 0.13)" + }, + "name": "chute_midpoint_gentle_3_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(-0.21, 1.91, 0.0)", + "expected": "(-0.21, 1.91, 0.0)" + }, + "name": "chute_midpoint_steep_0_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(-0.21, 1.91, 0.0)", + "expected": "(-0.21, 1.91, 0.0)" + }, + "name": "chute_midpoint_steep_0_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.91, -0.21)", + "expected": "(0.0, 1.91, -0.21)" + }, + "name": "chute_midpoint_steep_1_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.91, -0.21)", + "expected": "(0.0, 1.91, -0.21)" + }, + "name": "chute_midpoint_steep_1_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.21, 1.91, 0.0)", + "expected": "(0.21, 1.91, 0.0)" + }, + "name": "chute_midpoint_steep_2_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.21, 1.91, 0.0)", + "expected": "(0.21, 1.91, 0.0)" + }, + "name": "chute_midpoint_steep_2_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.91, 0.21)", + "expected": "(0.0, 1.91, 0.21)" + }, + "name": "chute_midpoint_steep_3_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.91, 0.21)", + "expected": "(0.0, 1.91, 0.21)" + }, + "name": "chute_midpoint_steep_3_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 1.0)", + "expected": "(0.5, 2.0, 1.0)" + }, + "name": "chute_midpoint_y_merge_0_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 1.0)", + "expected": "(0.5, 2.0, 1.0)" + }, + "name": "chute_midpoint_y_merge_0_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_0_1_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_0_1_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 2.0, 0.5)", + "expected": "(0.0, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_1_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 2.0, 0.5)", + "expected": "(0.0, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_1_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_1_1_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_1_1_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.0)", + "expected": "(0.5, 2.0, 0.0)" + }, + "name": "chute_midpoint_y_merge_2_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.0)", + "expected": "(0.5, 2.0, 0.0)" + }, + "name": "chute_midpoint_y_merge_2_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_2_1_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_2_1_0.35", + "passed": true + }, + { + "detail": { + "actual": "(1.0, 2.0, 0.5)", + "expected": "(1.0, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_3_0_0.12", + "passed": true + }, + { + "detail": { + "actual": "(1.0, 2.0, 0.5)", + "expected": "(1.0, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_3_0_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_3_1_0.12", + "passed": true + }, + { + "detail": { + "actual": "(0.5, 2.0, 0.5)", + "expected": "(0.5, 2.0, 0.5)" + }, + "name": "chute_midpoint_y_merge_3_1_0.35", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 2.32, 0.0)" + }, + "name": "entity_top_center_directional_boost", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 2.32, 0.0)" + }, + "name": "entity_top_center_water", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 2.32, 0.0)" + }, + "name": "entity_top_center_ice", + "passed": true + }, + { + "detail": { + "actual": "(0.0, 1.32, 0.0)" + }, + "name": "entity_top_center_goal_hole", "passed": true }, { "detail": { "position": [ - 0.109999999403954, - 2.23000001907349, - 0.0 - ] - }, - "name": "chute_pick_steep_0", - "passed": true - }, - { - "detail": { - "position": [ - 0.0, - 2.23000001907349, - 0.109999999403954 - ] - }, - "name": "chute_pick_steep_1", - "passed": true - }, - { - "detail": { - "position": [ - -0.109999999403954, - 2.23000001907349, - 0.0 - ] - }, - "name": "chute_pick_steep_2", - "passed": true - }, - { - "detail": { - "position": [ - 0.0, - 2.23000001907349, - -0.109999999403954 - ] - }, - "name": "chute_pick_steep_3", - "passed": true - }, - { - "detail": { - "position": [ - 0.399999976158142, - 2.0, - 1.0 - ] - }, - "name": "chute_pick_y_merge_0", - "passed": true - }, - { - "detail": { - "position": [ - 0.0, - 2.0, - 0.399999976158142 - ] - }, - "name": "chute_pick_y_merge_1", - "passed": true - }, - { - "detail": { - "position": [ - 0.599999964237213, - 2.0, - 0.0 - ] - }, - "name": "chute_pick_y_merge_2", - "passed": true - }, - { - "detail": { - "position": [ - 1.0, - 2.0, - 0.599999964237213 - ] - }, - "name": "chute_pick_y_merge_3", - "passed": true - }, - { - "detail": { - "position": [ - 0.159999996423721, - 2.28999996185303, + -0.209999993443489, + 1.9099999666214, 0.0 ] }, diff --git a/playtest/artifacts/styled/boost_3mps_comparison.json b/playtest/artifacts/styled/boost_3mps_comparison.json new file mode 100644 index 0000000..7ab59a8 --- /dev/null +++ b/playtest/artifacts/styled/boost_3mps_comparison.json @@ -0,0 +1,85 @@ +{ + "engine": "Godot 4.7.2 / Jolt", + "physics_hz": 120, + "gravity_mps2": 9.81, + "ball_type": "iron_ball", + "fixture": "Reconstructed workshop: launcher (-3,2,1), straight (-2,2.32,1), gentle (-1,2.32,1), gentle (0,1.82,1), goal rim (1,2,1), wall under goal. Ball starts at (-3,3.32,1+offset).", + "comparison": { + "gain_5_mps": [ + { + "lateral_offset_m": 0.0, + "slope_entry_vx_mps": 3.729923, + "track_exit_vx_mps": 4.223332, + "scored": false + }, + { + "lateral_offset_m": -0.05, + "slope_entry_vx_mps": 2.656222, + "track_exit_vx_mps": 3.919585, + "scored": false + }, + { + "lateral_offset_m": 0.05, + "slope_entry_vx_mps": 2.645796, + "track_exit_vx_mps": 3.910903, + "scored": false + } + ], + "gain_3_mps": [ + { + "lateral_offset_m": 0.0, + "slope_entry_vx_mps": 2.042475, + "track_exit_vx_mps": 3.650388, + "scored": false + }, + { + "lateral_offset_m": -0.05, + "slope_entry_vx_mps": 1.650456, + "track_exit_vx_mps": 3.509175, + "scored": true + }, + { + "lateral_offset_m": 0.05, + "slope_entry_vx_mps": 1.640918, + "track_exit_vx_mps": 3.48999, + "scored": true + } + ] + }, + "gain_3_mps_repeats": { + "settling_physics_frames": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "results": [ + { + "lateral_offset_m": 0, + "scored": 2, + "runs": 10 + }, + { + "lateral_offset_m": -0.05, + "scored": 8, + "runs": 10 + }, + { + "lateral_offset_m": 0.05, + "scored": 8, + "runs": 10 + } + ] + }, + "existing_answers": { + "basic_tutorial": "5/5", + "ice": "5/5", + "water": "3/5 acceptance checks passed. Water 4 scored both balls; wood southward travel was 0.996 m (required >1 m). Water 5 scored only iron; wood touched the third low-bridge tile." + } +} diff --git a/playtest/artifacts/styled/boost_report.json b/playtest/artifacts/styled/boost_report.json index 422cafd..2499ea4 100644 --- a/playtest/artifacts/styled/boost_report.json +++ b/playtest/artifacts/styled/boost_report.json @@ -1,6 +1,6 @@ { "failed": 0, - "passed": 67, + "passed": 68, "results": [ { "detail": {}, @@ -12,6 +12,11 @@ "name": "editor_has_fixed_gain_label_and_no_speed_input", "passed": true }, + { + "detail": {}, + "name": "standalone_preview_has_guide_and_arrow", + "passed": true + }, { "detail": {}, "name": "gui_places_boost_without_gain_override", @@ -19,7 +24,7 @@ }, { "detail": {}, - "name": "boost_retains_solid_wall_bounds", + "name": "boost_includes_permanent_guide_bounds", "passed": true }, { @@ -121,7 +126,7 @@ "detail": { "after": "(-0.0, -0.08175, 5.0)", "before": "(0.0, -0.08175, 0.0)", - "blockId": "piece_247642_2", + "blockId": "piece_351506_2", "tick": 45 }, "name": "authored_start_ball_receives_rotated_boost", @@ -370,7 +375,7 @@ { "detail": { "events": 1, - "position": "(-0.098283, 1.30001, 0.0)" + "position": "(0.189901, 1.300151, 0.00048)" }, "name": "continuous_contact_does_not_repeat", "passed": true @@ -440,10 +445,10 @@ "tick": 796 }, { - "after": "(9.528823, -0.0, 0.0)", - "before": "(4.528823, -0.0, 0.0)", + "after": "(9.440056, 0.072312, 0.0)", + "before": "(4.440056, 0.072312, -0.001111)", "blockId": "second", - "tick": 813 + "tick": 814 } ] }, diff --git a/playtest/artifacts/styled/chute_friction_1_comparison.json b/playtest/artifacts/styled/chute_friction_1_comparison.json new file mode 100644 index 0000000..e927066 --- /dev/null +++ b/playtest/artifacts/styled/chute_friction_1_comparison.json @@ -0,0 +1,533 @@ +{ + "engine": "Godot 4.7.2 Jolt", + "physics_hz": 120, + "gravity_mps2": 9.81, + "boost_gain_mps": 5, + "route": "Workshop reconstruction, launch -> straight -> gentle -> gentle -> supported goal. Positions are model origins in metres.", + "pieces": [ + [ + -3, + 2, + 1 + ], + [ + -2, + 2.32, + 1 + ], + [ + -1, + 2.32, + 1 + ], + [ + 0, + 1.82, + 1 + ], + [ + 1, + 2, + 1 + ] + ], + "ball": "iron_ball", + "spawn_xyz": [ + -3, + 3.32, + 1 + ], + "lateral_offsets_m": [ + 0, + -0.05, + 0.05 + ], + "settle_frames_each": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "measurements": "Horizontal velocity along +X on the first tick crossing x=-1.5 and x=0.5. One ball released from rest per run.", + "method": "Only chute contact pairs were assigned in memory before each scene entered the tree. All 15 standard layouts were built by simulated player input. The tutorial outcome was checked for up to 3600 physics frames; element series additionally ran their existing mechanic, contrast and repeat checks.", + "conditions": [ + { + "name": "current", + "static_friction": 0.52, + "dynamic_friction": 0.4, + "rolling_resistance": 0.035, + "slope": [ + { + "offset_m": 0, + "scored": 0, + "trials": 10, + "mean_exit_vx_mps": 4.2858 + }, + { + "offset_m": -0.05, + "scored": 5, + "trials": 10, + "mean_exit_vx_mps": 3.8811 + }, + { + "offset_m": 0.05, + "scored": 5, + "trials": 10, + "mean_exit_vx_mps": 3.8846 + } + ], + "tutorial": [ + { + "all_tiles_contacted": true, + "final_position": "(2.991658, 3.314173, -0.007785)", + "final_speed": 2.95547866821289, + "goals": 1, + "number": 1, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.011518, 3.322182, 2.984367)", + "final_speed": 2.30634355545044, + "goals": 1, + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(1.997693, 3.322639, -1.997168)", + "final_speed": 1.82185578346252, + "goals": 1, + "number": 3, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(4.980642, 3.326633, 0.000458)", + "final_speed": 2.23038792610168, + "goals": 1, + "number": 4, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(5.008936, 2.824461, 0.017642)", + "final_speed": 1.0439840555191, + "goals": 1, + "number": 5, + "won": true + } + ], + "element_levels": [ + { + "scene": "res://playtest/water/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/02.tscn", + "won": true, + "scored": [ + "iron" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/03.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/04.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/05.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/02.tscn", + "won": true, + "scored": [ + "iron" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/03.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/04.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/05.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + } + ], + "standard_solutions_won": 15, + "element_acceptance_passed": 10 + }, + { + "name": "slide", + "static_friction": 1.0, + "dynamic_friction": 1.0, + "rolling_resistance": 0.035, + "slope": [ + { + "offset_m": 0, + "scored": 0, + "trials": 10, + "mean_exit_vx_mps": 4.2999 + }, + { + "offset_m": -0.05, + "scored": 0, + "trials": 10, + "mean_exit_vx_mps": 3.8859 + }, + { + "offset_m": 0.05, + "scored": 0, + "trials": 10, + "mean_exit_vx_mps": 3.8725 + } + ], + "tutorial": [ + { + "all_tiles_contacted": true, + "final_position": "(3.007763, 3.328145, 0.018029)", + "final_speed": 1.45721960067749, + "goals": 1, + "number": 1, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.015006, 3.31916, 2.992017)", + "final_speed": 2.59988713264465, + "goals": 1, + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(1.987617, 3.324002, -1.984607)", + "final_speed": 1.47034776210785, + "goals": 1, + "number": 3, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(4.995434, 3.321675, 0.011485)", + "final_speed": 2.78647184371948, + "goals": 1, + "number": 4, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(4.980324, 2.822735, -0.00203)", + "final_speed": 1.30365455150604, + "goals": 1, + "number": 5, + "won": true + } + ], + "element_levels": [ + { + "scene": "res://playtest/water/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/02.tscn", + "won": true, + "scored": [ + "iron" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/03.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/04.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [ + "Upper route should save wood alone and leave iron submerged" + ] + }, + { + "scene": "res://playtest/water/scenes/05.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/02.tscn", + "won": true, + "scored": [ + "iron" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/03.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/04.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/05.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + } + ], + "standard_solutions_won": 15, + "element_acceptance_passed": 9 + }, + { + "name": "roll", + "static_friction": 0.52, + "dynamic_friction": 0.4, + "rolling_resistance": 1.0, + "slope": [ + { + "offset_m": 0, + "scored": 10, + "trials": 10, + "mean_exit_vx_mps": 3.7925 + }, + { + "offset_m": -0.05, + "scored": 10, + "trials": 10, + "mean_exit_vx_mps": 2.429 + }, + { + "offset_m": 0.05, + "scored": 10, + "trials": 10, + "mean_exit_vx_mps": 2.4296 + } + ], + "tutorial": [ + { + "all_tiles_contacted": true, + "final_position": "(1.503046, 3.980306, -0.000324)", + "final_speed": 0.000364574079867452, + "goals": 0, + "number": 1, + "won": false + }, + { + "all_tiles_contacted": true, + "final_position": "(0.000217, 3.980318, 0.509666)", + "final_speed": 0.000156402209540829, + "goals": 0, + "number": 2, + "won": false + }, + { + "all_tiles_contacted": false, + "final_position": "(-0.000292, 3.980304, -0.571028)", + "final_speed": 0.000303185224765912, + "goals": 0, + "number": 3, + "won": false + }, + { + "all_tiles_contacted": true, + "final_position": "(3.488595, 3.980289, -0.000611)", + "final_speed": 0.00023356603924185, + "goals": 0, + "number": 4, + "won": false + }, + { + "all_tiles_contacted": false, + "final_position": "(0.000326, 4.980325, -0.51075)", + "final_speed": 2.70238833763869e-05, + "goals": 0, + "number": 5, + "won": false + } + ], + "element_levels": [ + { + "scene": "res://playtest/water/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/02.tscn", + "won": true, + "scored": [ + "iron" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/03.tscn", + "won": true, + "scored": [ + "iron", + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/water/scenes/04.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole" + ] + }, + { + "scene": "res://playtest/water/scenes/05.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole" + ] + }, + { + "scene": "res://playtest/ice/scenes/01.tscn", + "won": true, + "scored": [ + "wood" + ], + "validation_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/02.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole", + "Missing iron break or later passage of wood through that gate" + ] + }, + { + "scene": "res://playtest/ice/scenes/03.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole" + ] + }, + { + "scene": "res://playtest/ice/scenes/04.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole", + "Missing iron break or later passage of wood through that gate" + ] + }, + { + "scene": "res://playtest/ice/scenes/05.tscn", + "won": false, + "scored": [], + "validation_errors": [ + "Answer did not get every ball into a hole", + "Missing iron break or later passage of wood through that gate" + ] + } + ], + "standard_solutions_won": 4, + "element_acceptance_passed": 4 + } + ] +} diff --git a/playtest/artifacts/styled/chute_friction_comparison.json b/playtest/artifacts/styled/chute_friction_comparison.json new file mode 100644 index 0000000..31d5efd --- /dev/null +++ b/playtest/artifacts/styled/chute_friction_comparison.json @@ -0,0 +1,155 @@ +{ + "engine": "Godot 4.7.2 Jolt", + "physics_hz": 120, + "gravity_mps2": 9.81, + "boost_gain_mps": 5, + "route": "Workshop reconstruction, launch -> straight -> gentle -> gentle -> supported goal. Positions are model origins in metres.", + "pieces": [ + [ + -3, + 2, + 1 + ], + [ + -2, + 2.32, + 1 + ], + [ + -1, + 2.32, + 1 + ], + [ + 0, + 1.82, + 1 + ], + [ + 1, + 2, + 1 + ] + ], + "ball": "iron_ball", + "spawn_xyz": [ + -3, + 3.32, + 1 + ], + "lateral_offsets_m": [ + 0, + -0.05, + 0.05 + ], + "settle_frames_each": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "measurements": "Horizontal velocity along +X on the first tick crossing x=-1.5 and x=0.5. One ball released from rest per run.", + "conditions": [ + { + "name": "original", + "static_friction": 0.42, + "dynamic_friction": 0.32, + "rolling_resistance": 0.025, + "restitution": 0.08, + "positions": [ + { + "offset_m": 0, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 3.7292, + "mean_exit_vx_mps": 4.2318 + }, + { + "offset_m": -0.05, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6574, + "mean_exit_vx_mps": 3.9196 + }, + { + "offset_m": 0.05, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6598, + "mean_exit_vx_mps": 3.9196 + } + ] + }, + { + "name": "sliding_friction_only", + "static_friction": 0.52, + "dynamic_friction": 0.4, + "rolling_resistance": 0.025, + "restitution": 0.08, + "positions": [ + { + "offset_m": 0, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 3.5249, + "mean_exit_vx_mps": 4.3092 + }, + { + "offset_m": -0.05, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6539, + "mean_exit_vx_mps": 3.9193 + }, + { + "offset_m": 0.05, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6624, + "mean_exit_vx_mps": 3.9187 + } + ] + }, + { + "name": "installed", + "static_friction": 0.52, + "dynamic_friction": 0.4, + "rolling_resistance": 0.035, + "restitution": 0.08, + "positions": [ + { + "offset_m": 0, + "scores": 0, + "runs": 10, + "mean_slope_entry_vx_mps": 3.5249, + "mean_exit_vx_mps": 4.2868 + }, + { + "offset_m": -0.05, + "scores": 3, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6403, + "mean_exit_vx_mps": 3.8827 + }, + { + "offset_m": 0.05, + "scores": 3, + "runs": 10, + "mean_slope_entry_vx_mps": 2.6473, + "mean_exit_vx_mps": 3.8843 + } + ] + } + ], + "installed_checks": { + "tutorial_lessons": 5, + "element_puzzles": "10/10", + "water05_shared_bridge_runs": 20 + } +} diff --git a/playtest/artifacts/styled/directional_boost.png b/playtest/artifacts/styled/directional_boost.png index 9f0acbd..5377c7d 100644 Binary files a/playtest/artifacts/styled/directional_boost.png and b/playtest/artifacts/styled/directional_boost.png differ diff --git a/playtest/artifacts/styled/editor_tools_saved.json b/playtest/artifacts/styled/editor_tools_saved.json new file mode 100644 index 0000000..93ebaf4 --- /dev/null +++ b/playtest/artifacts/styled/editor_tools_saved.json @@ -0,0 +1,64 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [ + { + "ballTypeId": "wood_ball", + "id": "keep_ball", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + 4.0, + 3.0, + 0.0 + ] + } + ], + "entities": [ + { + "id": "wall", + "kind": "wall", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "goal", + "kind": "goal_hole", + "position": [ + 2.0, + 1.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "water", + "kind": "water", + "position": [ + -2.0, + 0.0, + 0.0 + ], + "quarter": 0 + }, + { + "id": "ice", + "kind": "ice", + "position": [ + 0.0, + 0.0, + 2.0 + ], + "quarter": 0 + } + ], + "pieces": [], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/styled/goal_block/before_0_model.glb b/playtest/artifacts/styled/goal_block/before_0_model.glb new file mode 100644 index 0000000..ba6a9b0 Binary files /dev/null and b/playtest/artifacts/styled/goal_block/before_0_model.glb differ diff --git a/playtest/artifacts/styled/goal_block/before_1_model.blend b/playtest/artifacts/styled/goal_block/before_1_model.blend new file mode 100644 index 0000000..5f44a39 Binary files /dev/null and b/playtest/artifacts/styled/goal_block/before_1_model.blend differ diff --git a/playtest/artifacts/styled/goal_block/before_2_collection.blend b/playtest/artifacts/styled/goal_block/before_2_collection.blend new file mode 100644 index 0000000..d6e2c7b Binary files /dev/null and b/playtest/artifacts/styled/goal_block/before_2_collection.blend differ diff --git a/playtest/artifacts/styled/goal_block/before_3_build.py b/playtest/artifacts/styled/goal_block/before_3_build.py new file mode 100644 index 0000000..b3ea7f8 --- /dev/null +++ b/playtest/artifacts/styled/goal_block/before_3_build.py @@ -0,0 +1,266 @@ +"""Blender-only authoring of a separate Railbound-inspired asset family. + +Copies a stable source once; never writes to the baseline assets. To adopt a +later baseline, remove only this family's source_snapshot files explicitly. +""" +import bpy +import bmesh +import hashlib +import json +import math +import shutil +import time +import runpy +from pathlib import Path +from mathutils import Vector + +ROOT = Path(__file__).resolve().parents[4] +SOURCE = Path(__file__).resolve().parent +SNAPSHOT = SOURCE / 'snapshot' +SNAPSHOT.mkdir(parents=True, exist_ok=True) +ONLY_ASSET = globals().get('ONLY_ASSET') +REPORTS = ROOT / 'playtest/artifacts/styled' +REPORTS.mkdir(parents=True, exist_ok=True) +OUT = SOURCE.parent +SOURCE.mkdir(parents=True, exist_ok=True) +snapshot = SNAPSHOT / 'source_snapshot.blend' +inputs = [ROOT/'assets/collections/baseline/source/collection.blend', + ROOT/'assets/collections/baseline/catalog.json', ROOT/'assets/collections/baseline/physics.json'] +def digest(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + +if not snapshot.exists(): + before = [digest(p) for p in inputs] + time.sleep(3) + if before != [digest(p) for p in inputs]: + raise RuntimeError('Baseline is changing. Wait for its current build, then retry.') + copies = [snapshot, SNAPSHOT/'source_catalog.json', SNAPSHOT/'source_physics.json'] + for src, dst in zip(inputs, copies): + shutil.copy2(src, dst) + if before != [digest(p) for p in inputs] or before != [digest(p) for p in copies]: + for p in copies: p.unlink(missing_ok=True) + raise RuntimeError('Baseline changed during copy. No snapshot was retained.') + (SNAPSHOT/'source_manifest.json').write_text(json.dumps({ + 'files': {str(p.relative_to(ROOT)): h for p,h in zip(inputs,before)}, + 'copiedAtUnix': time.time(), 'readOnlyBaseline': True}, indent=2)) + +bpy.ops.wm.open_mainfile(filepath=str(snapshot)) +bpy.context.preferences.filepaths.save_version=0 +catalog = json.loads((SNAPSHOT/'source_catalog.json').read_text()) +physics = json.loads((SNAPSHOT/'source_physics.json').read_text()) +palette = {'body':'B98A56', 'top':'E9C88B', 'groove':'FFF0C5', + 'ink':'342E38', 'iron':'788A9E', 'iron_light':'C6DFE5', + 'red':'CB6652', 'green':'799361'} +def mat(name, color, metallic=0.0, roughness=.85): + m = bpy.data.materials.new('Storybook / '+name) + rgba = tuple(int(color[i:i+2],16)/255 for i in (0,2,4))+(1,) + # Hex palette is sRGB; Blender's material values are linear. + rgba = tuple(((v+.055)/1.055)**2.4 if v>.04045 else v/12.92 for v in rgba[:3])+(1,) + m.diffuse_color = rgba + m.use_nodes = True + bsdf = m.node_tree.nodes.get('Principled BSDF') + bsdf.inputs['Base Color'].default_value = rgba + bsdf.inputs['Metallic'].default_value = metallic + bsdf.inputs['Roughness'].default_value = roughness + return m +mats={k:mat(k,v) for k,v in palette.items()} +mats['iron']=mat('iron satin','788A9E',.35,.5) +mats['wall']=mat('wall stone','A29E8B') +mats['wall_top']=mat('wall stone top','D8D3B4') + +def mesh_object(name,vertices,faces): + mesh=bpy.data.meshes.new(name) + mesh.from_pydata(vertices,[],faces);mesh.update() + bm=bmesh.new();bm.from_mesh(mesh) + bmesh.ops.recalc_face_normals(bm,faces=bm.faces);bm.to_mesh(mesh);bm.free() + obj=bpy.data.objects.new(name,mesh);bpy.context.collection.objects.link(obj) + return obj + +def build_funnel(): + bpy.data.objects.remove(bpy.data.objects['goal_hole'],do_unlink=True) + # A closed shell with a wide conical entrance and a true narrow outlet. + profile=[(.46,0),(.32,-.35),(.32,-1),(.36,-1),(.50,0)] + sides=96 + vertices=[(radius*math.cos(i*math.tau/sides),radius*math.sin(i*math.tau/sides),z) + for radius,z in profile for i in range(sides)] + faces=[] + for ring in range(len(profile)): + next_ring=(ring+1)%len(profile) + for i in range(sides): + j=(i+1)%sides + faces.append((ring*sides+i,ring*sides+j,next_ring*sides+j,next_ring*sides+i)) + return mesh_object('goal_hole',vertices,faces) + +def build_wall(name='wall'): + vertices=[(x,y,z) for z in (0,1) for y in (-.5,.5) for x in (-.5,.5)] + faces=[(0,2,3,1),(4,5,7,6),(0,1,5,4),(2,6,7,3),(0,4,6,2),(1,3,7,5)] + return mesh_object(name,vertices,faces) + +build_funnel();build_wall();build_wall('directional_boost') +catalog['models']['wall']={'role':'solid','category':'nonInteractive','collisionShape':'box', + 'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]}, + 'declaredSize':[1,1,1],'geometryOrigin':'authored'} +catalog['models']['directional_boost']={'role':'boost','category':'interactive','collisionShape':'box', + 'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]}, + 'declaredSize':[1,1,1],'geometryOrigin':'authored','arrowDirectionGodot':[1,0,0]} +catalog['models']['goal_hole']={'role':'goal','category':'nonInteractive','openingRadius':.32, + 'entranceRadius':.46,'funnelDepth':.35,'depth':1.0,'cellFootprint':[1,1], + 'boundsBlender':{'min':[-.5,-.5,-1],'max':[.5,.5,0],'size':[1,1,1]}, + 'declaredSize':[1,1,1],'geometryOrigin':'authored'} + +def export(objects, path): + if globals().get('EXPORT_KINDS') is not None and objects[0].name not in EXPORT_KINDS: + return + bpy.ops.object.select_all(action='DESELECT') + for obj in objects: obj.select_set(True) + bpy.context.view_layer.objects.active=objects[0] + path.parent.mkdir(parents=True,exist_ok=True) + bpy.ops.export_scene.gltf(filepath=str(path),export_format='GLB', + use_selection=True,export_yup=True,export_extras=True,export_apply=True) + +def lines(name, segments, radius=.012): + curve=bpy.data.curves.new('ink_'+name,'CURVE') + curve.dimensions='3D'; curve.bevel_depth=radius; curve.bevel_resolution=0 + curve.resolution_u=1 + for points in segments: + spline=curve.splines.new('POLY'); spline.points.add(len(points)-1) + for point, value in zip(spline.points,points):point.co=(*value,1) + obj=bpy.data.objects.new('ink_'+name,curve) + bpy.context.collection.objects.link(obj); obj.data.materials.append(mats['ink']) + obj['visual_only']=True + return obj + +def outline(obj): + bm=bmesh.new();bm.from_mesh(obj.data);bm.normal_update() + segments=[] + for edge in bm.edges: + if len(edge.link_faces)!=2 or edge.calc_face_angle(0)>math.radians(36): + segments.append([tuple(v.co) for v in edge.verts]) + bm.free() + return lines(obj.name,segments) + +def boost_arrow(): + # Flat authored graphic above the top face; excluded from collision like ink outlines. + points=[(-.34,-.12),(.04,-.12),(.04,-.28),(.36,0),(.04,.28),(.04,.12),(-.34,.12)] + result=[] + for suffix,scale,z,color in [('border',1,1.002,'ink'),('fill',.82,1.003,'red')]: + arrow=mesh_object('ink_boost_arrow_'+suffix,[(x*scale,y*scale,z) for x,y in points],[tuple(range(7))]) + arrow.data.materials.append(mats[color]);arrow['visual_only']=True + result.append(arrow) + return result + + +def asset_dir(kind): + category = 'balls' if kind == 'iron_ball' else 'goals' if kind == 'goal_hole' else 'blocks' if kind in ('wall','directional_boost') else 'chutes' + return ROOT / 'assets' / category / kind + +snapshot_turn='turn_90' if 'turn_90' in bpy.data.objects else 'turn_cw' +catalog['models']['turn_90']=dict(catalog['models'][snapshot_turn], geometrySource=snapshot_turn) +# Retire duplicate objects only in this working scene; never rewrite the snapshot. +for legacy in ('turn_cw','turn_ccw'): + if legacy!=snapshot_turn and legacy in bpy.data.objects: + bpy.data.objects.remove(bpy.data.objects[legacy],do_unlink=True) +kinds=['straight','turn_90','gentle','steep','y_merge'] +groups=[];report=[] +all_kinds=kinds+['iron_ball','goal_hole','wall','directional_boost'] +if ONLY_ASSET is not None and ONLY_ASSET not in all_kinds:raise ValueError(ONLY_ASSET) +for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds): + obj=bpy.data.objects[snapshot_turn if kind=='turn_90' else kind] + if kind=='turn_90': + obj.name=kind + obj['asset_id']=kind + obj.location=(0,0,0) + obj.data=obj.data.copy() + before_coords=[tuple(v.co) for v in obj.data.vertices] + old_indices=[p.material_index for p in obj.data.polygons] + obj.data.materials.clear() + if kind in kinds: + for key in ['body','groove','top']:obj.data.materials.append(mats[key]) + for face,old in zip(obj.data.polygons,old_indices): + face.material_index=1 if old==1 else (2 if face.normal.z>.55 else 0) + group=[obj,outline(obj)] + category='chutes' + elif kind=='iron_ball': + # A continuous satin sphere: the snapshot's orientation stripe and the + # former face-painted highlight read as cracks/patches during rotation. + # Let the scene lighting produce the highlight on smooth normals instead. + obj.data.materials.append(mats['iron']) + for face in obj.data.polygons: + face.material_index=0 + face.use_smooth=True + group=[obj] + category='balls' + elif kind=='goal_hole': + obj.data.materials.append(mats['red']) + obj.data.materials.append(mats['top']) + obj.data.materials.append(mats['ink']) + for face in obj.data.polygons: + face.material_index=1 if face.index<96 else (2 if face.index<192 else 0) + face.use_smooth=face.index<192 + group=[obj,outline(obj)] + category='environment' + else: + obj.data.materials.append(mats['wall']);obj.data.materials.append(mats['wall_top']) + for face in obj.data.polygons:face.material_index=1 if face.normal.z>.5 else 0 + group=[obj,outline(obj)] + if kind=='directional_boost':group+=boost_arrow() + category='entities' + obj['style_family']='railbound_inspired' + obj['collision_source']='authored mesh' if kind in ('wall','goal_hole','directional_boost') else 'unchanged source mesh' + export(group,asset_dir(kind)/'model.glb') + catalog['models'][kind]['path']='res://'+str((asset_dir(kind)/'model.glb').relative_to(ROOT)) + catalog['models'][kind]['sourceBlend']=str((asset_dir(kind)/'source/model.blend').relative_to(ROOT)) + for member in group: + if member.type=='CURVE': + bpy.ops.object.select_all(action='DESELECT');member.select_set(True) + bpy.context.view_layer.objects.active=member + bpy.ops.object.convert(target='MESH') + source_path=asset_dir(kind)/'source/model.blend' + source_path.parent.mkdir(parents=True,exist_ok=True) + # A separate editable source file contains only one asset family member. + report.append({'id':kind,'collisionGeometryUnchanged':kind not in ('wall','goal_hole','directional_boost') and before_coords==[tuple(v.co) for v in obj.data.vertices], + 'vertices':len(obj.data.vertices),'separateBlend':str(source_path.relative_to(ROOT))}) + groups.append(group) + +if ONLY_ASSET: + existing=json.loads((OUT/'catalog.json').read_text()) + for legacy in ('turn_cw','turn_ccw'):existing['models'].pop(legacy,None) + existing['models'][ONLY_ASSET]=catalog['models'][ONLY_ASSET] + catalog=existing +else: + catalog['models']={k:catalog['models'][k] for k in all_kinds} +catalog['styleFamily']='railbound_inspired' +catalog['palette']=palette +(OUT/'catalog.json').write_text(json.dumps(catalog,ensure_ascii=False,indent=2)) +if not ONLY_ASSET: + # Geometry rebuilds must not overwrite curated ball types or physics tuning. + if not (OUT/'physics.json').exists(): + (OUT/'physics.json').write_text(json.dumps(physics,ensure_ascii=False,indent=2)) + (OUT/'entities.json').write_text(json.dumps({'interactive':[{'id':'directional_boost','name':'定向加速','assetId':'directional_boost'}], + 'nonInteractive':[{'id':'wall','name':'标准墙壁','assetId':'wall'}, + {'id':'goal_hole','name':'锥口球洞','assetId':'goal_hole'}]},ensure_ascii=False,indent=2)) +if ONLY_ASSET: + names={member.name for member in groups[0]} + for obj in list(bpy.data.objects): + if obj.name not in names:bpy.data.objects.remove(obj,do_unlink=True) + bpy.ops.wm.save_as_mainfile(filepath=str(ROOT/report[0]['separateBlend'])) +else: + for i,group in enumerate(groups): + for member in group:member.location=(i%4*2.6,i//4*3,0) + bpy.ops.wm.save_as_mainfile(filepath=str(SOURCE/'collection.blend')) + group_names=[[member.name for member in group] for group in groups] + for entry, names in zip(report,group_names): + if globals().get('EXPORT_KINDS') is not None and entry['id'] not in EXPORT_KINDS: + continue + bpy.ops.wm.open_mainfile(filepath=str(SOURCE/'collection.blend')) + for obj in list(bpy.data.objects): + if obj.name not in names:bpy.data.objects.remove(obj,do_unlink=True) + else:obj.location=(0,0,0) + bpy.ops.wm.save_as_mainfile(filepath=str(ROOT/entry['separateBlend'])) +(REPORTS/(('asset_'+ONLY_ASSET+'.json') if ONLY_ASSET else 'assets.json')).write_text(json.dumps({ + 'sourceManifest':json.loads((SNAPSHOT/'source_manifest.json').read_text()), + 'models':report,'radius':catalog['models']['iron_ball']['radius'], + 'physicalMaterialUnchanged':True,'outlineGeometry':'visual only'},indent=2)) +print('STYLE_ASSETS_READY') +if not ONLY_ASSET: + runpy.run_path(str(ROOT/'assets/balls/shared/source/build_materials.py')) diff --git a/playtest/artifacts/styled/goal_block/before_4_catalog.json b/playtest/artifacts/styled/goal_block/before_4_catalog.json new file mode 100644 index 0000000..d84dfe1 --- /dev/null +++ b/playtest/artifacts/styled/goal_block/before_4_catalog.json @@ -0,0 +1,2114 @@ +{ + "schemaVersion": 1, + "geometryRevision": "solid_base_v1", + "unitsPerMeter": 1, + "authoringUp": "Z", + "runtimeUp": "Y", + "models": { + "straight": { + "path": "res://assets/chutes/straight/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 1, + 0 + ], + [ + -0.458333, + 1, + 0 + ], + [ + -0.416667, + 1, + 0 + ], + [ + -0.375, + 1, + 0 + ], + [ + -0.333333, + 1, + 0 + ], + [ + -0.291667, + 1, + 0 + ], + [ + -0.25, + 1, + 0 + ], + [ + -0.208333, + 1, + 0 + ], + [ + -0.166667, + 1, + 0 + ], + [ + -0.125, + 1, + 0 + ], + [ + -0.083333, + 1, + 0 + ], + [ + -0.041667, + 1, + 0 + ], + [ + 0.0, + 1, + 0 + ], + [ + 0.041667, + 1, + 0 + ], + [ + 0.083333, + 1, + 0 + ], + [ + 0.125, + 1, + 0 + ], + [ + 0.166667, + 1, + 0 + ], + [ + 0.208333, + 1, + 0 + ], + [ + 0.25, + 1, + 0 + ], + [ + 0.291667, + 1, + 0 + ], + [ + 0.333333, + 1, + 0 + ], + [ + 0.375, + 1, + 0 + ], + [ + 0.416667, + 1, + 0 + ], + [ + 0.458333, + 1, + 0 + ], + [ + 0.5, + 1, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.68, + -0.0 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 0.68, + -0.0 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/straight/source/model.blend" + }, + "turn_90": { + "path": "res://assets/chutes/turn_90/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 1, + 0.0 + ], + [ + -0.48364, + 1, + 0.000268 + ], + [ + -0.467298, + 1, + 0.001071 + ], + [ + -0.450991, + 1, + 0.002408 + ], + [ + -0.434737, + 1, + 0.004278 + ], + [ + -0.418552, + 1, + 0.006678 + ], + [ + -0.402455, + 1, + 0.009607 + ], + [ + -0.386462, + 1, + 0.013062 + ], + [ + -0.37059, + 1, + 0.017037 + ], + [ + -0.354858, + 1, + 0.02153 + ], + [ + -0.33928, + 1, + 0.026535 + ], + [ + -0.323875, + 1, + 0.032047 + ], + [ + -0.308658, + 1, + 0.03806 + ], + [ + -0.293646, + 1, + 0.044568 + ], + [ + -0.278856, + 1, + 0.051564 + ], + [ + -0.264302, + 1, + 0.059039 + ], + [ + -0.25, + 1, + 0.066987 + ], + [ + -0.235966, + 1, + 0.075399 + ], + [ + -0.222215, + 1, + 0.084265 + ], + [ + -0.208761, + 1, + 0.093577 + ], + [ + -0.195619, + 1, + 0.103323 + ], + [ + -0.182803, + 1, + 0.113495 + ], + [ + -0.170327, + 1, + 0.12408 + ], + [ + -0.158204, + 1, + 0.135068 + ], + [ + -0.146447, + 1, + 0.146447 + ], + [ + -0.135068, + 1, + 0.158204 + ], + [ + -0.12408, + 1, + 0.170327 + ], + [ + -0.113495, + 1, + 0.182803 + ], + [ + -0.103323, + 1, + 0.195619 + ], + [ + -0.093577, + 1, + 0.208761 + ], + [ + -0.084265, + 1, + 0.222215 + ], + [ + -0.075399, + 1, + 0.235966 + ], + [ + -0.066987, + 1, + 0.25 + ], + [ + -0.059039, + 1, + 0.264302 + ], + [ + -0.051564, + 1, + 0.278856 + ], + [ + -0.044568, + 1, + 0.293646 + ], + [ + -0.03806, + 1, + 0.308658 + ], + [ + -0.032047, + 1, + 0.323875 + ], + [ + -0.026535, + 1, + 0.33928 + ], + [ + -0.02153, + 1, + 0.354858 + ], + [ + -0.017037, + 1, + 0.37059 + ], + [ + -0.013062, + 1, + 0.386462 + ], + [ + -0.009607, + 1, + 0.402455 + ], + [ + -0.006678, + 1, + 0.418552 + ], + [ + -0.004278, + 1, + 0.434737 + ], + [ + -0.002408, + 1, + 0.450991 + ], + [ + -0.001071, + 1, + 0.467298 + ], + [ + -0.000268, + 1, + 0.48364 + ], + [ + 0.0, + 1, + 0.5 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.68, + 0.0 + ], + "travel": [ + 0.999866, + 0.0, + 0.016362 + ] + }, + { + "surface": [ + 0.0, + 0.68, + 0.5 + ], + "travel": [ + 0.016362, + 0.0, + 0.999866 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "geometrySource": "turn_cw", + "sourceBlend": "assets/chutes/turn_90/source/model.blend" + }, + "gentle": { + "path": "res://assets/chutes/gentle/model.glb", + "radius": null, + "rise": 0.5, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 0.5, + 0 + ], + [ + -0.458333, + 0.520833, + 0 + ], + [ + -0.416667, + 0.541667, + 0 + ], + [ + -0.375, + 0.5625, + 0 + ], + [ + -0.333333, + 0.583333, + 0 + ], + [ + -0.291667, + 0.604167, + 0 + ], + [ + -0.25, + 0.625, + 0 + ], + [ + -0.208333, + 0.645833, + 0 + ], + [ + -0.166667, + 0.666667, + 0 + ], + [ + -0.125, + 0.6875, + 0 + ], + [ + -0.083333, + 0.708333, + 0 + ], + [ + -0.041667, + 0.729167, + 0 + ], + [ + 0.0, + 0.75, + 0 + ], + [ + 0.041667, + 0.770833, + 0 + ], + [ + 0.083333, + 0.791667, + 0 + ], + [ + 0.125, + 0.8125, + 0 + ], + [ + 0.166667, + 0.833333, + 0 + ], + [ + 0.208333, + 0.854167, + 0 + ], + [ + 0.25, + 0.875, + 0 + ], + [ + 0.291667, + 0.895833, + 0 + ], + [ + 0.333333, + 0.916667, + 0 + ], + [ + 0.375, + 0.9375, + 0 + ], + [ + 0.416667, + 0.958333, + 0 + ], + [ + 0.458333, + 0.979167, + 0 + ], + [ + 0.5, + 1.0, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.18, + -0.0 + ], + "travel": [ + 0.894427, + 0.447213, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 0.68, + -0.0 + ], + "travel": [ + 0.894427, + 0.447213, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/gentle/source/model.blend" + }, + "steep": { + "path": "res://assets/chutes/steep/model.glb", + "radius": null, + "rise": 1, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 0.5, + 0 + ], + [ + -0.458333, + 0.541667, + 0 + ], + [ + -0.416667, + 0.583333, + 0 + ], + [ + -0.375, + 0.625, + 0 + ], + [ + -0.333333, + 0.666667, + 0 + ], + [ + -0.291667, + 0.708333, + 0 + ], + [ + -0.25, + 0.75, + 0 + ], + [ + -0.208333, + 0.791667, + 0 + ], + [ + -0.166667, + 0.833333, + 0 + ], + [ + -0.125, + 0.875, + 0 + ], + [ + -0.083333, + 0.916667, + 0 + ], + [ + -0.041667, + 0.958333, + 0 + ], + [ + 0.0, + 1.0, + 0 + ], + [ + 0.041667, + 1.041667, + 0 + ], + [ + 0.083333, + 1.083333, + 0 + ], + [ + 0.125, + 1.125, + 0 + ], + [ + 0.166667, + 1.166667, + 0 + ], + [ + 0.208333, + 1.208333, + 0 + ], + [ + 0.25, + 1.25, + 0 + ], + [ + 0.291667, + 1.291667, + 0 + ], + [ + 0.333333, + 1.333333, + 0 + ], + [ + 0.375, + 1.375, + 0 + ], + [ + 0.416667, + 1.416667, + 0 + ], + [ + 0.458333, + 1.458333, + 0 + ], + [ + 0.5, + 1.5, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.18, + -0.0 + ], + "travel": [ + 0.707107, + 0.707107, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 1.18, + -0.0 + ], + "travel": [ + 0.707107, + 0.707106, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.5 + ], + "size": [ + 1.0, + 1.0, + 1.5 + ] + }, + "nominalCellFits": false, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": false, + "prototypeNotes": [ + "Full semicircle plus 1m rise exceeds the nominal 1m cell height." + ], + "sourceBlend": "assets/chutes/steep/source/model.blend" + }, + "y_merge": { + "path": "res://assets/chutes/y_merge/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -1.0, + 1, + 0.5 + ], + [ + -0.96875, + 1, + 0.5 + ], + [ + -0.9375, + 1, + 0.5 + ], + [ + -0.90625, + 1, + 0.5 + ], + [ + -0.875, + 1, + 0.5 + ], + [ + -0.84375, + 1, + 0.5 + ], + [ + -0.8125, + 1, + 0.5 + ], + [ + -0.78125, + 1, + 0.5 + ], + [ + -0.75, + 1, + 0.5 + ], + [ + -0.71875, + 1, + 0.5 + ], + [ + -0.6875, + 1, + 0.5 + ], + [ + -0.65625, + 1, + 0.5 + ], + [ + -0.625, + 1, + 0.5 + ], + [ + -0.59375, + 1, + 0.5 + ], + [ + -0.5625, + 1, + 0.5 + ], + [ + -0.53125, + 1, + 0.5 + ], + [ + -0.5, + 1, + 0.5 + ], + [ + -0.46875, + 1, + 0.5 + ], + [ + -0.4375, + 1, + 0.5 + ], + [ + -0.40625, + 1, + 0.5 + ], + [ + -0.375, + 1, + 0.5 + ], + [ + -0.34375, + 1, + 0.5 + ], + [ + -0.3125, + 1, + 0.5 + ], + [ + -0.28125, + 1, + 0.5 + ], + [ + -0.25, + 1, + 0.5 + ], + [ + -0.21875, + 1, + 0.5 + ], + [ + -0.1875, + 1, + 0.5 + ], + [ + -0.15625, + 1, + 0.5 + ], + [ + -0.125, + 1, + 0.5 + ], + [ + -0.09375, + 1, + 0.5 + ], + [ + -0.0625, + 1, + 0.5 + ], + [ + -0.03125, + 1, + 0.5 + ], + [ + 0.0, + 1, + 0.5 + ], + [ + 0.03125, + 1, + 0.5 + ], + [ + 0.0625, + 1, + 0.5 + ], + [ + 0.09375, + 1, + 0.5 + ], + [ + 0.125, + 1, + 0.5 + ], + [ + 0.15625, + 1, + 0.5 + ], + [ + 0.1875, + 1, + 0.5 + ], + [ + 0.21875, + 1, + 0.5 + ], + [ + 0.25, + 1, + 0.5 + ], + [ + 0.28125, + 1, + 0.5 + ], + [ + 0.3125, + 1, + 0.5 + ], + [ + 0.34375, + 1, + 0.5 + ], + [ + 0.375, + 1, + 0.5 + ], + [ + 0.40625, + 1, + 0.5 + ], + [ + 0.4375, + 1, + 0.5 + ], + [ + 0.46875, + 1, + 0.5 + ], + [ + 0.5, + 1, + 0.5 + ], + [ + 0.53125, + 1, + 0.5 + ], + [ + 0.5625, + 1, + 0.5 + ], + [ + 0.59375, + 1, + 0.5 + ], + [ + 0.625, + 1, + 0.5 + ], + [ + 0.65625, + 1, + 0.5 + ], + [ + 0.6875, + 1, + 0.5 + ], + [ + 0.71875, + 1, + 0.5 + ], + [ + 0.75, + 1, + 0.5 + ], + [ + 0.78125, + 1, + 0.5 + ], + [ + 0.8125, + 1, + 0.5 + ], + [ + 0.84375, + 1, + 0.5 + ], + [ + 0.875, + 1, + 0.5 + ], + [ + 0.90625, + 1, + 0.5 + ], + [ + 0.9375, + 1, + 0.5 + ], + [ + 0.96875, + 1, + 0.5 + ], + [ + 1.0, + 1, + 0.5 + ] + ], + [ + [ + -1.0, + 1, + -0.5 + ], + [ + -0.984375, + 1, + -0.499818 + ], + [ + -0.96875, + 1, + -0.499275 + ], + [ + -0.953125, + 1, + -0.498378 + ], + [ + -0.9375, + 1, + -0.497131 + ], + [ + -0.921875, + 1, + -0.495542 + ], + [ + -0.90625, + 1, + -0.493614 + ], + [ + -0.890625, + 1, + -0.491355 + ], + [ + -0.875, + 1, + -0.48877 + ], + [ + -0.859375, + 1, + -0.485864 + ], + [ + -0.84375, + 1, + -0.482643 + ], + [ + -0.828125, + 1, + -0.479114 + ], + [ + -0.8125, + 1, + -0.475281 + ], + [ + -0.796875, + 1, + -0.47115 + ], + [ + -0.78125, + 1, + -0.466728 + ], + [ + -0.765625, + 1, + -0.46202 + ], + [ + -0.75, + 1, + -0.457031 + ], + [ + -0.734375, + 1, + -0.451768 + ], + [ + -0.71875, + 1, + -0.446236 + ], + [ + -0.703125, + 1, + -0.44044 + ], + [ + -0.6875, + 1, + -0.434387 + ], + [ + -0.671875, + 1, + -0.428082 + ], + [ + -0.65625, + 1, + -0.421532 + ], + [ + -0.640625, + 1, + -0.414741 + ], + [ + -0.625, + 1, + -0.407715 + ], + [ + -0.609375, + 1, + -0.40046 + ], + [ + -0.59375, + 1, + -0.392982 + ], + [ + -0.578125, + 1, + -0.385287 + ], + [ + -0.5625, + 1, + -0.37738 + ], + [ + -0.546875, + 1, + -0.369267 + ], + [ + -0.53125, + 1, + -0.360954 + ], + [ + -0.515625, + 1, + -0.352447 + ], + [ + -0.5, + 1, + -0.34375 + ], + [ + -0.484375, + 1, + -0.33487 + ], + [ + -0.46875, + 1, + -0.325813 + ], + [ + -0.453125, + 1, + -0.316585 + ], + [ + -0.4375, + 1, + -0.30719 + ], + [ + -0.421875, + 1, + -0.297635 + ], + [ + -0.40625, + 1, + -0.287926 + ], + [ + -0.390625, + 1, + -0.278068 + ], + [ + -0.375, + 1, + -0.268066 + ], + [ + -0.359375, + 1, + -0.257928 + ], + [ + -0.34375, + 1, + -0.247658 + ], + [ + -0.328125, + 1, + -0.237262 + ], + [ + -0.3125, + 1, + -0.226746 + ], + [ + -0.296875, + 1, + -0.216115 + ], + [ + -0.28125, + 1, + -0.205376 + ], + [ + -0.265625, + 1, + -0.194533 + ], + [ + -0.25, + 1, + -0.183594 + ], + [ + -0.234375, + 1, + -0.172563 + ], + [ + -0.21875, + 1, + -0.161446 + ], + [ + -0.203125, + 1, + -0.150249 + ], + [ + -0.1875, + 1, + -0.138977 + ], + [ + -0.171875, + 1, + -0.127637 + ], + [ + -0.15625, + 1, + -0.116234 + ], + [ + -0.140625, + 1, + -0.104774 + ], + [ + -0.125, + 1, + -0.093262 + ], + [ + -0.109375, + 1, + -0.081704 + ], + [ + -0.09375, + 1, + -0.070107 + ], + [ + -0.078125, + 1, + -0.058475 + ], + [ + -0.0625, + 1, + -0.046814 + ], + [ + -0.046875, + 1, + -0.035131 + ], + [ + -0.03125, + 1, + -0.02343 + ], + [ + -0.015625, + 1, + -0.011718 + ], + [ + 0.0, + 1, + -0.0 + ], + [ + 0.015625, + 1, + 0.011718 + ], + [ + 0.03125, + 1, + 0.02343 + ], + [ + 0.046875, + 1, + 0.035131 + ], + [ + 0.0625, + 1, + 0.046814 + ], + [ + 0.078125, + 1, + 0.058475 + ], + [ + 0.09375, + 1, + 0.070107 + ], + [ + 0.109375, + 1, + 0.081704 + ], + [ + 0.125, + 1, + 0.093262 + ], + [ + 0.140625, + 1, + 0.104774 + ], + [ + 0.15625, + 1, + 0.116234 + ], + [ + 0.171875, + 1, + 0.127637 + ], + [ + 0.1875, + 1, + 0.138977 + ], + [ + 0.203125, + 1, + 0.150249 + ], + [ + 0.21875, + 1, + 0.161446 + ], + [ + 0.234375, + 1, + 0.172563 + ], + [ + 0.25, + 1, + 0.183594 + ], + [ + 0.265625, + 1, + 0.194533 + ], + [ + 0.28125, + 1, + 0.205376 + ], + [ + 0.296875, + 1, + 0.216115 + ], + [ + 0.3125, + 1, + 0.226746 + ], + [ + 0.328125, + 1, + 0.237262 + ], + [ + 0.34375, + 1, + 0.247658 + ], + [ + 0.359375, + 1, + 0.257928 + ], + [ + 0.375, + 1, + 0.268066 + ], + [ + 0.390625, + 1, + 0.278068 + ], + [ + 0.40625, + 1, + 0.287926 + ], + [ + 0.421875, + 1, + 0.297635 + ], + [ + 0.4375, + 1, + 0.30719 + ], + [ + 0.453125, + 1, + 0.316585 + ], + [ + 0.46875, + 1, + 0.325813 + ], + [ + 0.484375, + 1, + 0.33487 + ], + [ + 0.5, + 1, + 0.34375 + ], + [ + 0.515625, + 1, + 0.352447 + ], + [ + 0.53125, + 1, + 0.360954 + ], + [ + 0.546875, + 1, + 0.369267 + ], + [ + 0.5625, + 1, + 0.37738 + ], + [ + 0.578125, + 1, + 0.385287 + ], + [ + 0.59375, + 1, + 0.392982 + ], + [ + 0.609375, + 1, + 0.40046 + ], + [ + 0.625, + 1, + 0.407715 + ], + [ + 0.640625, + 1, + 0.414741 + ], + [ + 0.65625, + 1, + 0.421532 + ], + [ + 0.671875, + 1, + 0.428082 + ], + [ + 0.6875, + 1, + 0.434387 + ], + [ + 0.703125, + 1, + 0.44044 + ], + [ + 0.71875, + 1, + 0.446236 + ], + [ + 0.734375, + 1, + 0.451768 + ], + [ + 0.75, + 1, + 0.457031 + ], + [ + 0.765625, + 1, + 0.46202 + ], + [ + 0.78125, + 1, + 0.466728 + ], + [ + 0.796875, + 1, + 0.47115 + ], + [ + 0.8125, + 1, + 0.475281 + ], + [ + 0.828125, + 1, + 0.479114 + ], + [ + 0.84375, + 1, + 0.482643 + ], + [ + 0.859375, + 1, + 0.485864 + ], + [ + 0.875, + 1, + 0.48877 + ], + [ + 0.890625, + 1, + 0.491355 + ], + [ + 0.90625, + 1, + 0.493614 + ], + [ + 0.921875, + 1, + 0.495542 + ], + [ + 0.9375, + 1, + 0.497131 + ], + [ + 0.953125, + 1, + 0.498378 + ], + [ + 0.96875, + 1, + 0.499275 + ], + [ + 0.984375, + 1, + 0.499818 + ], + [ + 1.0, + 1, + 0.5 + ] + ] + ], + "ports": [ + { + "surface": [ + -1.0, + 0.68, + 0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + 1.0, + 0.68, + 0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + -1.0, + 0.68, + -0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -1.0, + -1.0, + 0.0 + ], + "max": [ + 1.0, + 1.0, + 1.0 + ], + "size": [ + 2.0, + 2.0, + 1.0 + ] + }, + "nominalCellFits": false, + "cellFootprint": [ + 2, + 2 + ], + "declaredSize": [ + 2.0, + 2.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/y_merge/source/model.blend" + }, + "iron_ball": { + "path": "res://assets/balls/iron_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/iron_ball/source/model.blend" + }, + "goal_hole": { + "role": "goal", + "category": "nonInteractive", + "openingRadius": 0.32, + "entranceRadius": 0.46, + "funnelDepth": 0.35, + "depth": 1.0, + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + -1 + ], + "max": [ + 0.5, + 0.5, + 0 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "path": "res://assets/goals/goal_hole/model.glb", + "sourceBlend": "assets/goals/goal_hole/source/model.blend" + }, + "wall": { + "role": "solid", + "category": "nonInteractive", + "collisionShape": "box", + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0 + ], + "max": [ + 0.5, + 0.5, + 1 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "path": "res://assets/blocks/wall/model.glb", + "sourceBlend": "assets/blocks/wall/source/model.blend" + }, + "directional_boost": { + "role": "boost", + "category": "interactive", + "collisionShape": "box", + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0 + ], + "max": [ + 0.5, + 0.5, + 1 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "arrowDirectionGodot": [ + 1, + 0, + 0 + ], + "path": "res://assets/blocks/directional_boost/model.glb", + "sourceBlend": "assets/blocks/directional_boost/source/model.blend" + }, + "wood_ball": { + "path": "res://assets/balls/wood_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/wood_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball", + "albedoTexture": "res://assets/balls/wood_ball/textures/albedo.png" + }, + "ceramic_ball": { + "path": "res://assets/balls/ceramic_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/ceramic_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball", + "albedoTexture": "res://assets/balls/ceramic_ball/textures/albedo.png" + } + }, + "styleFamily": "railbound_inspired", + "palette": { + "body": "B98A56", + "top": "E9C88B", + "groove": "FFF0C5", + "ink": "342E38", + "iron": "788A9E", + "iron_light": "C6DFE5", + "red": "CB6652", + "green": "799361" + } +} \ No newline at end of file diff --git a/playtest/artifacts/styled/goal_block/before_5_physics.json b/playtest/artifacts/styled/goal_block/before_5_physics.json new file mode 100644 index 0000000..967614a --- /dev/null +++ b/playtest/artifacts/styled/goal_block/before_5_physics.json @@ -0,0 +1,124 @@ +{ + "schemaVersion": 1, + "ballTypes": [ + { + "ballTypeId": "wood_ball", + "displayName": "原木球", + "assetId": "wood_ball", + "physicsProfileId": "wood_game" + }, + { + "ballTypeId": "ceramic_ball", + "displayName": "陶瓷球", + "assetId": "ceramic_ball", + "physicsProfileId": "ceramic_game" + }, + { + "ballTypeId": "iron_ball", + "displayName": "铁球", + "assetId": "iron_ball", + "physicsProfileId": "solid_iron_test" + } + ], + "physicsProfiles": { + "solid_iron_test": { + "massKg": 890.0760306150601, + "inertiaModel": "solidSphere", + "dragCoefficient": 0.47, + "contactMaterialId": "iron" + }, + "wood_game": { + "massKg": 60, + "inertiaModel": "solidSphere", + "dragCoefficient": 0.47, + "contactMaterialId": "wood" + }, + "ceramic_game": { + "massKg": 75, + "inertiaModel": "solidSphere", + "dragCoefficient": 0.04, + "contactMaterialId": "ceramic" + } + }, + "contactMaterialPairs": [ + { + "materialAId": "iron", + "materialBId": "painted_wood", + "staticFriction": 0.42, + "dynamicFriction": 0.32, + "rollingResistance": 0.025, + "restitution": 0.08 + }, + { + "materialAId": "iron", + "materialBId": "iron", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + }, + { + "materialAId": "wood", + "materialBId": "painted_wood", + "staticFriction": 0.42, + "dynamicFriction": 0.32, + "rollingResistance": 0.025, + "restitution": 0.08 + }, + { + "materialAId": "ceramic", + "materialBId": "painted_wood", + "staticFriction": 0.42, + "dynamicFriction": 0.32, + "rollingResistance": 0.025, + "restitution": 0.08 + }, + { + "materialAId": "wood", + "materialBId": "wood", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + }, + { + "materialAId": "ceramic", + "materialBId": "ceramic", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + }, + { + "materialAId": "wood", + "materialBId": "ceramic", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + }, + { + "materialAId": "wood", + "materialBId": "iron", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + }, + { + "materialAId": "ceramic", + "materialBId": "iron", + "staticFriction": 0.35, + "dynamicFriction": 0.25, + "rollingResistance": 0.01, + "restitution": 0.15 + } + ], + "notes": [ + "Game tuning: all balls have the same authored radius and shape. Wood mass 60 kg; ceramic 75 kg (+25%); iron keeps its original 890.076 kg.", + "Air drag coefficients are gameplay parameters, not measured material constants: wood 0.47, ceramic 0.04, iron 0.47. Iron receives aerodynamic force through the same equation as other balls; its mass and ordinary contact resistance limit motion in the reference wind.", + "No extra fan multiplier or direct wind velocity override. All types use the established contact coefficients to isolate mass and aerodynamic differences.", + "The current native per-body friction/restitution approximation is retained; simultaneous mixed contact-pair solving is not introduced by this asset change." + ], + "airDensity": 1.225 +} diff --git a/playtest/artifacts/styled/goal_block/before_hashes.json b/playtest/artifacts/styled/goal_block/before_hashes.json new file mode 100644 index 0000000..7df3500 --- /dev/null +++ b/playtest/artifacts/styled/goal_block/before_hashes.json @@ -0,0 +1,8 @@ +{ + "assets/goals/goal_hole/model.glb": "10c848ddb488c230fa957fe247c2407ce656bf1ed57d3c7b5b3dfcd982470951", + "assets/goals/goal_hole/source/model.blend": "3fe002311c2f2e3b5bab4308112c66f64b7d074995734bfdd2600a8587358102", + "assets/collections/storybook/source/collection.blend": "4611a0e8c48f282b4d72835579aa15805051de292b34c15be70881c4db9bed3a", + "assets/collections/storybook/source/build.py": "0d02bd42c841c8bedaf7f613ee7321216cd7bde6527a531eeb3a2f9296e9552e", + "assets/collections/storybook/catalog.json": "c302cfcf8d2068d172519bca7f83e210d556716a82ce0f5afe4ba2965091f447", + "assets/collections/storybook/physics.json": "24161d2574282825b3d0611505c855f5a72b100a892f746f0a236a72ce8798d8" +} \ No newline at end of file diff --git a/playtest/artifacts/styled/goal_block/collection_sync.json b/playtest/artifacts/styled/goal_block/collection_sync.json new file mode 100644 index 0000000..e27d387 --- /dev/null +++ b/playtest/artifacts/styled/goal_block/collection_sync.json @@ -0,0 +1,7 @@ +{ + "otherMeshesUnchanged": true, + "replaced": [ + "goal_hole", + "ink_goal_hole" + ] +} \ No newline at end of file diff --git a/playtest/artifacts/styled/goal_block/physics.json b/playtest/artifacts/styled/goal_block/physics.json index 6f09ebd..0bead87 100644 --- a/playtest/artifacts/styled/goal_block/physics.json +++ b/playtest/artifacts/styled/goal_block/physics.json @@ -2,8 +2,43 @@ "checks": [ { "detail": { - "contactFrames": 1133, - "end": "(0.0, -1.005104, 0.0)" + "centerY": 1.63104367256165, + "events": [ + { + "ballId": "iron", + "goalId": "hole", + "position": [ + 2.01806831359863, + 1.63104367256165, + -0.999547719955444 + ], + "time": 0.741666666666666 + } + ], + "status": "全部入洞! 0.74 秒" + }, + "name": "workshop_scores_inside_supported_goal", + "passed": true + }, + { + "detail": {}, + "name": "skimming_above_mouth_does_not_score", + "passed": true + }, + { + "detail": {}, + "name": "grazing_throat_edge_does_not_score", + "passed": true + }, + { + "detail": {}, + "name": "rising_from_below_does_not_score", + "passed": true + }, + { + "detail": { + "contactFrames": 0, + "end": "(0.0, -0.350831, 0.0)" }, "name": "drop_wood_ball_(0.0, 0.0)", "passed": true @@ -11,7 +46,7 @@ { "detail": { "contactFrames": 1141, - "end": "(0.004692, -1.027503, -0.004689)" + "end": "(0.006718, -0.367044, 0.000499)" }, "name": "drop_wood_ball_(0.12, 0.0)", "passed": true @@ -19,7 +54,7 @@ { "detail": { "contactFrames": 1122, - "end": "(-0.007495, -1.020418, -0.018401)" + "end": "(-0.001257, -0.363957, 0.002227)" }, "name": "drop_wood_ball_(0.26, 0.0)", "passed": true @@ -27,7 +62,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.01457, -1.021921, -0.01245)" + "end": "(-0.00433, -0.373872, 0.004414)" }, "name": "drop_wood_ball_(0.36, 0.0)", "passed": true @@ -35,7 +70,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.009895, -1.023855, -0.017172)" + "end": "(0.00349, -0.373755, 0.006115)" }, "name": "drop_wood_ball_(-0.36, 0.0)", "passed": true @@ -43,7 +78,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.013517, -1.023277, 0.00926)" + "end": "(-0.005369, -0.373896, -0.004036)" }, "name": "drop_wood_ball_(0.0, 0.36)", "passed": true @@ -51,7 +86,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.016024, -1.023196, -0.011723)" + "end": "(0.005562, -0.373769, 0.003615)" }, "name": "drop_wood_ball_(0.0, -0.36)", "passed": true @@ -59,7 +94,7 @@ { "detail": { "contactFrames": 1127, - "end": "(-0.008337, -1.003462, -0.018005)" + "end": "(0.003099, -0.350407, 0.007578)" }, "name": "drop_wood_ball_(0.24, 0.24)", "passed": true @@ -67,15 +102,15 @@ { "detail": { "contactFrames": 1126, - "end": "(0.019785, -1.012402, -0.001412)" + "end": "(-0.006216, -0.35423, -0.001589)" }, "name": "drop_wood_ball_(-0.24, -0.24)", "passed": true }, { "detail": { - "contactFrames": 1133, - "end": "(0.0, -1.007103, 0.0)" + "contactFrames": 0, + "end": "(0.0, -0.351871, 0.0)" }, "name": "drop_ceramic_ball_(0.0, 0.0)", "passed": true @@ -83,7 +118,7 @@ { "detail": { "contactFrames": 1140, - "end": "(0.011337, -1.029251, 0.012666)" + "end": "(0.006113, -0.365548, -0.001206)" }, "name": "drop_ceramic_ball_(0.12, 0.0)", "passed": true @@ -91,7 +126,7 @@ { "detail": { "contactFrames": 1122, - "end": "(0.004795, -1.011782, -0.017516)" + "end": "(0.017727, -0.366344, 0.006552)" }, "name": "drop_ceramic_ball_(0.26, 0.0)", "passed": true @@ -99,7 +134,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.012047, -1.025424, -0.01322)" + "end": "(-0.003429, -0.374514, 0.008168)" }, "name": "drop_ceramic_ball_(0.36, 0.0)", "passed": true @@ -107,7 +142,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.015903, -1.027495, -0.011892)" + "end": "(0.003284, -0.374516, 0.00973)" }, "name": "drop_ceramic_ball_(-0.36, 0.0)", "passed": true @@ -115,7 +150,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.012943, -1.025432, 0.013735)" + "end": "(0.007751, -0.374488, -0.003466)" }, "name": "drop_ceramic_ball_(0.0, 0.36)", "passed": true @@ -123,7 +158,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.016815, -1.02467, -0.010521)" + "end": "(0.007233, -0.374468, 0.003517)" }, "name": "drop_ceramic_ball_(0.0, -0.36)", "passed": true @@ -131,7 +166,7 @@ { "detail": { "contactFrames": 1127, - "end": "(0.017929, -1.007286, 0.003665)" + "end": "(0.007584, -0.355175, 0.017886)" }, "name": "drop_ceramic_ball_(0.24, 0.24)", "passed": true @@ -139,15 +174,15 @@ { "detail": { "contactFrames": 1126, - "end": "(0.014751, -1.005026, 0.011379)" + "end": "(-0.005455, -0.360435, -0.003424)" }, "name": "drop_ceramic_ball_(-0.24, -0.24)", "passed": true }, { "detail": { - "contactFrames": 1133, - "end": "(0.0, -1.007105, 0.0)" + "contactFrames": 0, + "end": "(0.0, -0.351816, 0.0)" }, "name": "drop_iron_ball_(0.0, 0.0)", "passed": true @@ -155,7 +190,7 @@ { "detail": { "contactFrames": 1141, - "end": "(0.013721, -1.032078, 0.005726)" + "end": "(0.006115, -0.365689, -0.00166)" }, "name": "drop_iron_ball_(0.12, 0.0)", "passed": true @@ -163,7 +198,7 @@ { "detail": { "contactFrames": 1122, - "end": "(-0.015804, -1.010242, 0.009249)" + "end": "(0.007877, -0.361279, -0.006082)" }, "name": "drop_iron_ball_(0.26, 0.0)", "passed": true @@ -171,7 +206,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.01255, -1.025249, 0.013082)" + "end": "(-0.003445, -0.374441, -0.007895)" }, "name": "drop_iron_ball_(0.36, 0.0)", "passed": true @@ -179,7 +214,7 @@ { "detail": { "contactFrames": 1120, - "end": "(-0.012894, -1.02611, -0.015093)" + "end": "(0.003304, -0.37449, 0.007669)" }, "name": "drop_iron_ball_(-0.36, 0.0)", "passed": true @@ -187,7 +222,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.009499, -1.025884, 0.012995)" + "end": "(-0.009605, -0.374456, -0.003244)" }, "name": "drop_iron_ball_(0.0, 0.36)", "passed": true @@ -195,7 +230,7 @@ { "detail": { "contactFrames": 1120, - "end": "(0.009933, -1.0254, -0.012974)" + "end": "(-0.008965, -0.374423, 0.003309)" }, "name": "drop_iron_ball_(0.0, -0.36)", "passed": true @@ -203,7 +238,7 @@ { "detail": { "contactFrames": 1127, - "end": "(-0.018326, -1.012097, -0.007675)" + "end": "(0.007256, -0.352717, 0.003666)" }, "name": "drop_iron_ball_(0.24, 0.24)", "passed": true @@ -211,7 +246,7 @@ { "detail": { "contactFrames": 1126, - "end": "(0.009102, -1.015484, 0.015162)" + "end": "(-0.002968, -0.362735, -0.00636)" }, "name": "drop_iron_ball_(-0.24, -0.24)", "passed": true @@ -255,14 +290,14 @@ "ballId": "student_ball", "goalId": "goal", "position": [ - 2.9973669052124, - 0.645162343978882, - 0.0196551065891981 + 2.99644899368286, + 3.32077193260193, + 0.00355775188654661 ], - "time": 2.39999999999999 + "time": 2.08333333333333 } ], - "time": 2.39999999999999 + "time": 2.08333333333333 }, "name": "tutorial_1_enters_once", "passed": true @@ -274,14 +309,14 @@ "ballId": "student_ball", "goalId": "goal", "position": [ - 0.00339265912771225, - 0.678770303726196, - 3.01822996139526 + -0.0113675752654672, + 3.32657384872437, + 2.98454475402832 ], - "time": 3.71666666666666 + "time": 2.41666666666666 } ], - "time": 3.71666666666666 + "time": 2.41666666666666 }, "name": "tutorial_2_enters_once", "passed": true @@ -293,14 +328,14 @@ "ballId": "student_ball", "goalId": "goal", "position": [ - 1.98784899711609, - 0.662082076072693, - -2.01570081710815 + 1.99756240844727, + 3.32501268386841, + -1.9871119260788 ], - "time": 4.40833333333334 + "time": 2.97499999999999 } ], - "time": 4.40833333333334 + "time": 2.97499999999999 }, "name": "tutorial_3_enters_once", "passed": true @@ -312,14 +347,14 @@ "ballId": "student_ball", "goalId": "goal", "position": [ - 5.01481342315674, - 0.65211695432663, - 0.0101500349119306 + 4.99413537979126, + 3.31404900550842, + -0.00234287418425083 ], - "time": 3.83333333333332 + "time": 2.69166666666666 } ], - "time": 3.83333333333332 + "time": 2.69166666666666 }, "name": "tutorial_4_enters_once", "passed": true @@ -331,19 +366,19 @@ "ballId": "student_ball", "goalId": "goal", "position": [ - 4.9877724647522, - 0.159147873520851, - -0.0156376082450151 + 4.98896408081055, + 2.81397747993469, + -0.0158765353262424 ], - "time": 7.01666666666681 + "time": 5.45000000000006 } ], - "time": 7.01666666666681 + "time": 5.45000000000006 }, "name": "tutorial_5_enters_once", "passed": true } ], "failed": 0, - "passed": 36 + "passed": 40 } \ No newline at end of file diff --git a/playtest/artifacts/styled/iron_ball_surface/before_catalog.json b/playtest/artifacts/styled/iron_ball_surface/before_catalog.json new file mode 100644 index 0000000..d84dfe1 --- /dev/null +++ b/playtest/artifacts/styled/iron_ball_surface/before_catalog.json @@ -0,0 +1,2114 @@ +{ + "schemaVersion": 1, + "geometryRevision": "solid_base_v1", + "unitsPerMeter": 1, + "authoringUp": "Z", + "runtimeUp": "Y", + "models": { + "straight": { + "path": "res://assets/chutes/straight/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 1, + 0 + ], + [ + -0.458333, + 1, + 0 + ], + [ + -0.416667, + 1, + 0 + ], + [ + -0.375, + 1, + 0 + ], + [ + -0.333333, + 1, + 0 + ], + [ + -0.291667, + 1, + 0 + ], + [ + -0.25, + 1, + 0 + ], + [ + -0.208333, + 1, + 0 + ], + [ + -0.166667, + 1, + 0 + ], + [ + -0.125, + 1, + 0 + ], + [ + -0.083333, + 1, + 0 + ], + [ + -0.041667, + 1, + 0 + ], + [ + 0.0, + 1, + 0 + ], + [ + 0.041667, + 1, + 0 + ], + [ + 0.083333, + 1, + 0 + ], + [ + 0.125, + 1, + 0 + ], + [ + 0.166667, + 1, + 0 + ], + [ + 0.208333, + 1, + 0 + ], + [ + 0.25, + 1, + 0 + ], + [ + 0.291667, + 1, + 0 + ], + [ + 0.333333, + 1, + 0 + ], + [ + 0.375, + 1, + 0 + ], + [ + 0.416667, + 1, + 0 + ], + [ + 0.458333, + 1, + 0 + ], + [ + 0.5, + 1, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.68, + -0.0 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 0.68, + -0.0 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/straight/source/model.blend" + }, + "turn_90": { + "path": "res://assets/chutes/turn_90/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 1, + 0.0 + ], + [ + -0.48364, + 1, + 0.000268 + ], + [ + -0.467298, + 1, + 0.001071 + ], + [ + -0.450991, + 1, + 0.002408 + ], + [ + -0.434737, + 1, + 0.004278 + ], + [ + -0.418552, + 1, + 0.006678 + ], + [ + -0.402455, + 1, + 0.009607 + ], + [ + -0.386462, + 1, + 0.013062 + ], + [ + -0.37059, + 1, + 0.017037 + ], + [ + -0.354858, + 1, + 0.02153 + ], + [ + -0.33928, + 1, + 0.026535 + ], + [ + -0.323875, + 1, + 0.032047 + ], + [ + -0.308658, + 1, + 0.03806 + ], + [ + -0.293646, + 1, + 0.044568 + ], + [ + -0.278856, + 1, + 0.051564 + ], + [ + -0.264302, + 1, + 0.059039 + ], + [ + -0.25, + 1, + 0.066987 + ], + [ + -0.235966, + 1, + 0.075399 + ], + [ + -0.222215, + 1, + 0.084265 + ], + [ + -0.208761, + 1, + 0.093577 + ], + [ + -0.195619, + 1, + 0.103323 + ], + [ + -0.182803, + 1, + 0.113495 + ], + [ + -0.170327, + 1, + 0.12408 + ], + [ + -0.158204, + 1, + 0.135068 + ], + [ + -0.146447, + 1, + 0.146447 + ], + [ + -0.135068, + 1, + 0.158204 + ], + [ + -0.12408, + 1, + 0.170327 + ], + [ + -0.113495, + 1, + 0.182803 + ], + [ + -0.103323, + 1, + 0.195619 + ], + [ + -0.093577, + 1, + 0.208761 + ], + [ + -0.084265, + 1, + 0.222215 + ], + [ + -0.075399, + 1, + 0.235966 + ], + [ + -0.066987, + 1, + 0.25 + ], + [ + -0.059039, + 1, + 0.264302 + ], + [ + -0.051564, + 1, + 0.278856 + ], + [ + -0.044568, + 1, + 0.293646 + ], + [ + -0.03806, + 1, + 0.308658 + ], + [ + -0.032047, + 1, + 0.323875 + ], + [ + -0.026535, + 1, + 0.33928 + ], + [ + -0.02153, + 1, + 0.354858 + ], + [ + -0.017037, + 1, + 0.37059 + ], + [ + -0.013062, + 1, + 0.386462 + ], + [ + -0.009607, + 1, + 0.402455 + ], + [ + -0.006678, + 1, + 0.418552 + ], + [ + -0.004278, + 1, + 0.434737 + ], + [ + -0.002408, + 1, + 0.450991 + ], + [ + -0.001071, + 1, + 0.467298 + ], + [ + -0.000268, + 1, + 0.48364 + ], + [ + 0.0, + 1, + 0.5 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.68, + 0.0 + ], + "travel": [ + 0.999866, + 0.0, + 0.016362 + ] + }, + { + "surface": [ + 0.0, + 0.68, + 0.5 + ], + "travel": [ + 0.016362, + 0.0, + 0.999866 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "geometrySource": "turn_cw", + "sourceBlend": "assets/chutes/turn_90/source/model.blend" + }, + "gentle": { + "path": "res://assets/chutes/gentle/model.glb", + "radius": null, + "rise": 0.5, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 0.5, + 0 + ], + [ + -0.458333, + 0.520833, + 0 + ], + [ + -0.416667, + 0.541667, + 0 + ], + [ + -0.375, + 0.5625, + 0 + ], + [ + -0.333333, + 0.583333, + 0 + ], + [ + -0.291667, + 0.604167, + 0 + ], + [ + -0.25, + 0.625, + 0 + ], + [ + -0.208333, + 0.645833, + 0 + ], + [ + -0.166667, + 0.666667, + 0 + ], + [ + -0.125, + 0.6875, + 0 + ], + [ + -0.083333, + 0.708333, + 0 + ], + [ + -0.041667, + 0.729167, + 0 + ], + [ + 0.0, + 0.75, + 0 + ], + [ + 0.041667, + 0.770833, + 0 + ], + [ + 0.083333, + 0.791667, + 0 + ], + [ + 0.125, + 0.8125, + 0 + ], + [ + 0.166667, + 0.833333, + 0 + ], + [ + 0.208333, + 0.854167, + 0 + ], + [ + 0.25, + 0.875, + 0 + ], + [ + 0.291667, + 0.895833, + 0 + ], + [ + 0.333333, + 0.916667, + 0 + ], + [ + 0.375, + 0.9375, + 0 + ], + [ + 0.416667, + 0.958333, + 0 + ], + [ + 0.458333, + 0.979167, + 0 + ], + [ + 0.5, + 1.0, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.18, + -0.0 + ], + "travel": [ + 0.894427, + 0.447213, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 0.68, + -0.0 + ], + "travel": [ + 0.894427, + 0.447213, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.0 + ], + "size": [ + 1.0, + 1.0, + 1.0 + ] + }, + "nominalCellFits": true, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/gentle/source/model.blend" + }, + "steep": { + "path": "res://assets/chutes/steep/model.glb", + "radius": null, + "rise": 1, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -0.5, + 0.5, + 0 + ], + [ + -0.458333, + 0.541667, + 0 + ], + [ + -0.416667, + 0.583333, + 0 + ], + [ + -0.375, + 0.625, + 0 + ], + [ + -0.333333, + 0.666667, + 0 + ], + [ + -0.291667, + 0.708333, + 0 + ], + [ + -0.25, + 0.75, + 0 + ], + [ + -0.208333, + 0.791667, + 0 + ], + [ + -0.166667, + 0.833333, + 0 + ], + [ + -0.125, + 0.875, + 0 + ], + [ + -0.083333, + 0.916667, + 0 + ], + [ + -0.041667, + 0.958333, + 0 + ], + [ + 0.0, + 1.0, + 0 + ], + [ + 0.041667, + 1.041667, + 0 + ], + [ + 0.083333, + 1.083333, + 0 + ], + [ + 0.125, + 1.125, + 0 + ], + [ + 0.166667, + 1.166667, + 0 + ], + [ + 0.208333, + 1.208333, + 0 + ], + [ + 0.25, + 1.25, + 0 + ], + [ + 0.291667, + 1.291667, + 0 + ], + [ + 0.333333, + 1.333333, + 0 + ], + [ + 0.375, + 1.375, + 0 + ], + [ + 0.416667, + 1.416667, + 0 + ], + [ + 0.458333, + 1.458333, + 0 + ], + [ + 0.5, + 1.5, + 0 + ] + ] + ], + "ports": [ + { + "surface": [ + -0.5, + 0.18, + -0.0 + ], + "travel": [ + 0.707107, + 0.707107, + -0.0 + ] + }, + { + "surface": [ + 0.5, + 1.18, + -0.0 + ], + "travel": [ + 0.707107, + 0.707106, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0.0 + ], + "max": [ + 0.5, + 0.5, + 1.5 + ], + "size": [ + 1.0, + 1.0, + 1.5 + ] + }, + "nominalCellFits": false, + "cellFootprint": [ + 1, + 1 + ], + "declaredSize": [ + 1.0, + 1.0, + 1.0 + ], + "declaredBoundsFits": false, + "prototypeNotes": [ + "Full semicircle plus 1m rise exceeds the nominal 1m cell height." + ], + "sourceBlend": "assets/chutes/steep/source/model.blend" + }, + "y_merge": { + "path": "res://assets/chutes/y_merge/model.glb", + "radius": null, + "rise": 0, + "grooveRadius": 0.32, + "solidBase": true, + "upperPaths": [ + [ + [ + -1.0, + 1, + 0.5 + ], + [ + -0.96875, + 1, + 0.5 + ], + [ + -0.9375, + 1, + 0.5 + ], + [ + -0.90625, + 1, + 0.5 + ], + [ + -0.875, + 1, + 0.5 + ], + [ + -0.84375, + 1, + 0.5 + ], + [ + -0.8125, + 1, + 0.5 + ], + [ + -0.78125, + 1, + 0.5 + ], + [ + -0.75, + 1, + 0.5 + ], + [ + -0.71875, + 1, + 0.5 + ], + [ + -0.6875, + 1, + 0.5 + ], + [ + -0.65625, + 1, + 0.5 + ], + [ + -0.625, + 1, + 0.5 + ], + [ + -0.59375, + 1, + 0.5 + ], + [ + -0.5625, + 1, + 0.5 + ], + [ + -0.53125, + 1, + 0.5 + ], + [ + -0.5, + 1, + 0.5 + ], + [ + -0.46875, + 1, + 0.5 + ], + [ + -0.4375, + 1, + 0.5 + ], + [ + -0.40625, + 1, + 0.5 + ], + [ + -0.375, + 1, + 0.5 + ], + [ + -0.34375, + 1, + 0.5 + ], + [ + -0.3125, + 1, + 0.5 + ], + [ + -0.28125, + 1, + 0.5 + ], + [ + -0.25, + 1, + 0.5 + ], + [ + -0.21875, + 1, + 0.5 + ], + [ + -0.1875, + 1, + 0.5 + ], + [ + -0.15625, + 1, + 0.5 + ], + [ + -0.125, + 1, + 0.5 + ], + [ + -0.09375, + 1, + 0.5 + ], + [ + -0.0625, + 1, + 0.5 + ], + [ + -0.03125, + 1, + 0.5 + ], + [ + 0.0, + 1, + 0.5 + ], + [ + 0.03125, + 1, + 0.5 + ], + [ + 0.0625, + 1, + 0.5 + ], + [ + 0.09375, + 1, + 0.5 + ], + [ + 0.125, + 1, + 0.5 + ], + [ + 0.15625, + 1, + 0.5 + ], + [ + 0.1875, + 1, + 0.5 + ], + [ + 0.21875, + 1, + 0.5 + ], + [ + 0.25, + 1, + 0.5 + ], + [ + 0.28125, + 1, + 0.5 + ], + [ + 0.3125, + 1, + 0.5 + ], + [ + 0.34375, + 1, + 0.5 + ], + [ + 0.375, + 1, + 0.5 + ], + [ + 0.40625, + 1, + 0.5 + ], + [ + 0.4375, + 1, + 0.5 + ], + [ + 0.46875, + 1, + 0.5 + ], + [ + 0.5, + 1, + 0.5 + ], + [ + 0.53125, + 1, + 0.5 + ], + [ + 0.5625, + 1, + 0.5 + ], + [ + 0.59375, + 1, + 0.5 + ], + [ + 0.625, + 1, + 0.5 + ], + [ + 0.65625, + 1, + 0.5 + ], + [ + 0.6875, + 1, + 0.5 + ], + [ + 0.71875, + 1, + 0.5 + ], + [ + 0.75, + 1, + 0.5 + ], + [ + 0.78125, + 1, + 0.5 + ], + [ + 0.8125, + 1, + 0.5 + ], + [ + 0.84375, + 1, + 0.5 + ], + [ + 0.875, + 1, + 0.5 + ], + [ + 0.90625, + 1, + 0.5 + ], + [ + 0.9375, + 1, + 0.5 + ], + [ + 0.96875, + 1, + 0.5 + ], + [ + 1.0, + 1, + 0.5 + ] + ], + [ + [ + -1.0, + 1, + -0.5 + ], + [ + -0.984375, + 1, + -0.499818 + ], + [ + -0.96875, + 1, + -0.499275 + ], + [ + -0.953125, + 1, + -0.498378 + ], + [ + -0.9375, + 1, + -0.497131 + ], + [ + -0.921875, + 1, + -0.495542 + ], + [ + -0.90625, + 1, + -0.493614 + ], + [ + -0.890625, + 1, + -0.491355 + ], + [ + -0.875, + 1, + -0.48877 + ], + [ + -0.859375, + 1, + -0.485864 + ], + [ + -0.84375, + 1, + -0.482643 + ], + [ + -0.828125, + 1, + -0.479114 + ], + [ + -0.8125, + 1, + -0.475281 + ], + [ + -0.796875, + 1, + -0.47115 + ], + [ + -0.78125, + 1, + -0.466728 + ], + [ + -0.765625, + 1, + -0.46202 + ], + [ + -0.75, + 1, + -0.457031 + ], + [ + -0.734375, + 1, + -0.451768 + ], + [ + -0.71875, + 1, + -0.446236 + ], + [ + -0.703125, + 1, + -0.44044 + ], + [ + -0.6875, + 1, + -0.434387 + ], + [ + -0.671875, + 1, + -0.428082 + ], + [ + -0.65625, + 1, + -0.421532 + ], + [ + -0.640625, + 1, + -0.414741 + ], + [ + -0.625, + 1, + -0.407715 + ], + [ + -0.609375, + 1, + -0.40046 + ], + [ + -0.59375, + 1, + -0.392982 + ], + [ + -0.578125, + 1, + -0.385287 + ], + [ + -0.5625, + 1, + -0.37738 + ], + [ + -0.546875, + 1, + -0.369267 + ], + [ + -0.53125, + 1, + -0.360954 + ], + [ + -0.515625, + 1, + -0.352447 + ], + [ + -0.5, + 1, + -0.34375 + ], + [ + -0.484375, + 1, + -0.33487 + ], + [ + -0.46875, + 1, + -0.325813 + ], + [ + -0.453125, + 1, + -0.316585 + ], + [ + -0.4375, + 1, + -0.30719 + ], + [ + -0.421875, + 1, + -0.297635 + ], + [ + -0.40625, + 1, + -0.287926 + ], + [ + -0.390625, + 1, + -0.278068 + ], + [ + -0.375, + 1, + -0.268066 + ], + [ + -0.359375, + 1, + -0.257928 + ], + [ + -0.34375, + 1, + -0.247658 + ], + [ + -0.328125, + 1, + -0.237262 + ], + [ + -0.3125, + 1, + -0.226746 + ], + [ + -0.296875, + 1, + -0.216115 + ], + [ + -0.28125, + 1, + -0.205376 + ], + [ + -0.265625, + 1, + -0.194533 + ], + [ + -0.25, + 1, + -0.183594 + ], + [ + -0.234375, + 1, + -0.172563 + ], + [ + -0.21875, + 1, + -0.161446 + ], + [ + -0.203125, + 1, + -0.150249 + ], + [ + -0.1875, + 1, + -0.138977 + ], + [ + -0.171875, + 1, + -0.127637 + ], + [ + -0.15625, + 1, + -0.116234 + ], + [ + -0.140625, + 1, + -0.104774 + ], + [ + -0.125, + 1, + -0.093262 + ], + [ + -0.109375, + 1, + -0.081704 + ], + [ + -0.09375, + 1, + -0.070107 + ], + [ + -0.078125, + 1, + -0.058475 + ], + [ + -0.0625, + 1, + -0.046814 + ], + [ + -0.046875, + 1, + -0.035131 + ], + [ + -0.03125, + 1, + -0.02343 + ], + [ + -0.015625, + 1, + -0.011718 + ], + [ + 0.0, + 1, + -0.0 + ], + [ + 0.015625, + 1, + 0.011718 + ], + [ + 0.03125, + 1, + 0.02343 + ], + [ + 0.046875, + 1, + 0.035131 + ], + [ + 0.0625, + 1, + 0.046814 + ], + [ + 0.078125, + 1, + 0.058475 + ], + [ + 0.09375, + 1, + 0.070107 + ], + [ + 0.109375, + 1, + 0.081704 + ], + [ + 0.125, + 1, + 0.093262 + ], + [ + 0.140625, + 1, + 0.104774 + ], + [ + 0.15625, + 1, + 0.116234 + ], + [ + 0.171875, + 1, + 0.127637 + ], + [ + 0.1875, + 1, + 0.138977 + ], + [ + 0.203125, + 1, + 0.150249 + ], + [ + 0.21875, + 1, + 0.161446 + ], + [ + 0.234375, + 1, + 0.172563 + ], + [ + 0.25, + 1, + 0.183594 + ], + [ + 0.265625, + 1, + 0.194533 + ], + [ + 0.28125, + 1, + 0.205376 + ], + [ + 0.296875, + 1, + 0.216115 + ], + [ + 0.3125, + 1, + 0.226746 + ], + [ + 0.328125, + 1, + 0.237262 + ], + [ + 0.34375, + 1, + 0.247658 + ], + [ + 0.359375, + 1, + 0.257928 + ], + [ + 0.375, + 1, + 0.268066 + ], + [ + 0.390625, + 1, + 0.278068 + ], + [ + 0.40625, + 1, + 0.287926 + ], + [ + 0.421875, + 1, + 0.297635 + ], + [ + 0.4375, + 1, + 0.30719 + ], + [ + 0.453125, + 1, + 0.316585 + ], + [ + 0.46875, + 1, + 0.325813 + ], + [ + 0.484375, + 1, + 0.33487 + ], + [ + 0.5, + 1, + 0.34375 + ], + [ + 0.515625, + 1, + 0.352447 + ], + [ + 0.53125, + 1, + 0.360954 + ], + [ + 0.546875, + 1, + 0.369267 + ], + [ + 0.5625, + 1, + 0.37738 + ], + [ + 0.578125, + 1, + 0.385287 + ], + [ + 0.59375, + 1, + 0.392982 + ], + [ + 0.609375, + 1, + 0.40046 + ], + [ + 0.625, + 1, + 0.407715 + ], + [ + 0.640625, + 1, + 0.414741 + ], + [ + 0.65625, + 1, + 0.421532 + ], + [ + 0.671875, + 1, + 0.428082 + ], + [ + 0.6875, + 1, + 0.434387 + ], + [ + 0.703125, + 1, + 0.44044 + ], + [ + 0.71875, + 1, + 0.446236 + ], + [ + 0.734375, + 1, + 0.451768 + ], + [ + 0.75, + 1, + 0.457031 + ], + [ + 0.765625, + 1, + 0.46202 + ], + [ + 0.78125, + 1, + 0.466728 + ], + [ + 0.796875, + 1, + 0.47115 + ], + [ + 0.8125, + 1, + 0.475281 + ], + [ + 0.828125, + 1, + 0.479114 + ], + [ + 0.84375, + 1, + 0.482643 + ], + [ + 0.859375, + 1, + 0.485864 + ], + [ + 0.875, + 1, + 0.48877 + ], + [ + 0.890625, + 1, + 0.491355 + ], + [ + 0.90625, + 1, + 0.493614 + ], + [ + 0.921875, + 1, + 0.495542 + ], + [ + 0.9375, + 1, + 0.497131 + ], + [ + 0.953125, + 1, + 0.498378 + ], + [ + 0.96875, + 1, + 0.499275 + ], + [ + 0.984375, + 1, + 0.499818 + ], + [ + 1.0, + 1, + 0.5 + ] + ] + ], + "ports": [ + { + "surface": [ + -1.0, + 0.68, + 0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + 1.0, + 0.68, + 0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + }, + { + "surface": [ + -1.0, + 0.68, + -0.5 + ], + "travel": [ + 1.0, + 0.0, + -0.0 + ] + } + ], + "boundsBlender": { + "min": [ + -1.0, + -1.0, + 0.0 + ], + "max": [ + 1.0, + 1.0, + 1.0 + ], + "size": [ + 2.0, + 2.0, + 1.0 + ] + }, + "nominalCellFits": false, + "cellFootprint": [ + 2, + 2 + ], + "declaredSize": [ + 2.0, + 2.0, + 1.0 + ], + "declaredBoundsFits": true, + "prototypeNotes": [], + "sourceBlend": "assets/chutes/y_merge/source/model.blend" + }, + "iron_ball": { + "path": "res://assets/balls/iron_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/iron_ball/source/model.blend" + }, + "goal_hole": { + "role": "goal", + "category": "nonInteractive", + "openingRadius": 0.32, + "entranceRadius": 0.46, + "funnelDepth": 0.35, + "depth": 1.0, + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + -1 + ], + "max": [ + 0.5, + 0.5, + 0 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "path": "res://assets/goals/goal_hole/model.glb", + "sourceBlend": "assets/goals/goal_hole/source/model.blend" + }, + "wall": { + "role": "solid", + "category": "nonInteractive", + "collisionShape": "box", + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0 + ], + "max": [ + 0.5, + 0.5, + 1 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "path": "res://assets/blocks/wall/model.glb", + "sourceBlend": "assets/blocks/wall/source/model.blend" + }, + "directional_boost": { + "role": "boost", + "category": "interactive", + "collisionShape": "box", + "cellFootprint": [ + 1, + 1 + ], + "boundsBlender": { + "min": [ + -0.5, + -0.5, + 0 + ], + "max": [ + 0.5, + 0.5, + 1 + ], + "size": [ + 1, + 1, + 1 + ] + }, + "declaredSize": [ + 1, + 1, + 1 + ], + "geometryOrigin": "authored", + "arrowDirectionGodot": [ + 1, + 0, + 0 + ], + "path": "res://assets/blocks/directional_boost/model.glb", + "sourceBlend": "assets/blocks/directional_boost/source/model.blend" + }, + "wood_ball": { + "path": "res://assets/balls/wood_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/wood_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball", + "albedoTexture": "res://assets/balls/wood_ball/textures/albedo.png" + }, + "ceramic_ball": { + "path": "res://assets/balls/ceramic_ball/model.glb", + "radius": 0.3, + "boundsBlender": { + "size": [ + 0.6, + 0.6, + 0.6 + ] + }, + "sourceBlend": "assets/balls/ceramic_ball/source/model.blend", + "role": "ball", + "geometrySource": "iron_ball", + "albedoTexture": "res://assets/balls/ceramic_ball/textures/albedo.png" + } + }, + "styleFamily": "railbound_inspired", + "palette": { + "body": "B98A56", + "top": "E9C88B", + "groove": "FFF0C5", + "ink": "342E38", + "iron": "788A9E", + "iron_light": "C6DFE5", + "red": "CB6652", + "green": "799361" + } +} \ No newline at end of file diff --git a/playtest/artifacts/styled/iron_ball_surface/before_collection.blend b/playtest/artifacts/styled/iron_ball_surface/before_collection.blend new file mode 100644 index 0000000..8c0f44f Binary files /dev/null and b/playtest/artifacts/styled/iron_ball_surface/before_collection.blend differ diff --git a/playtest/artifacts/styled/iron_ball_surface/before_hashes.json b/playtest/artifacts/styled/iron_ball_surface/before_hashes.json new file mode 100644 index 0000000..3591240 --- /dev/null +++ b/playtest/artifacts/styled/iron_ball_surface/before_hashes.json @@ -0,0 +1,7 @@ +{ + "assets/balls/iron_ball/model.glb": "d56c8a6e99744aa662b1f8e5ff106d1cbed15abf5044eecd4ffc9ae1eaa3c652", + "assets/balls/iron_ball/source/model.blend": "f663fd01a877a29a9e894d1c31494754458fb95b9abf8315e296711e4f6c005a", + "assets/collections/storybook/catalog.json": "c302cfcf8d2068d172519bca7f83e210d556716a82ce0f5afe4ba2965091f447", + "assets/collections/storybook/physics.json": "24161d2574282825b3d0611505c855f5a72b100a892f746f0a236a72ce8798d8", + "assets/collections/storybook/source/collection.blend": "6a6fd9bb5ffc256f7a98670bc63343b0e533dde93689dfd35ebebfe5bad8d8d7" +} \ No newline at end of file diff --git a/playtest/artifacts/styled/iron_ball_surface/before_model.blend b/playtest/artifacts/styled/iron_ball_surface/before_model.blend new file mode 100644 index 0000000..03b3464 Binary files /dev/null and b/playtest/artifacts/styled/iron_ball_surface/before_model.blend differ diff --git a/playtest/artifacts/styled/iron_ball_surface/before_model.glb b/playtest/artifacts/styled/iron_ball_surface/before_model.glb new file mode 100644 index 0000000..184fa97 Binary files /dev/null and b/playtest/artifacts/styled/iron_ball_surface/before_model.glb differ diff --git a/playtest/artifacts/styled/iron_ball_surface/before_source.json b/playtest/artifacts/styled/iron_ball_surface/before_source.json new file mode 100644 index 0000000..b11c7cf --- /dev/null +++ b/playtest/artifacts/styled/iron_ball_surface/before_source.json @@ -0,0 +1,28 @@ +{ + "snapshot": { + "vertices": 1986, + "faces": 2048, + "closedManifold": true, + "minRadius": 0.29999971336984166, + "maxRadius": 0.30000002458691494, + "smoothFaces": 2048, + "materials": { + "Iron - brushed": 1704, + "Iron ball - orientation stripe": 344 + } + }, + "before": { + "vertices": 1986, + "faces": 2048, + "closedManifold": true, + "minRadius": 0.29999971336984166, + "maxRadius": 0.30000002458691494, + "smoothFaces": 2048, + "materials": { + "Storybook / iron satin": 1552, + "Storybook / ink": 344, + "Storybook / iron_light": 152 + } + }, + "geometryMatchesSnapshot": true +} \ No newline at end of file diff --git a/playtest/artifacts/styled/iron_ball_surface/verification.json b/playtest/artifacts/styled/iron_ball_surface/verification.json new file mode 100644 index 0000000..b5fa69f --- /dev/null +++ b/playtest/artifacts/styled/iron_ball_surface/verification.json @@ -0,0 +1,23 @@ +{ + "geometryUnchanged": true, + "closedManifold": true, + "vertices": 1986, + "faces": 2048, + "radius": 0.30000002458691494, + "allFacesSmooth": true, + "singleMaterial": true, + "materials": [ + "Storybook / iron satin" + ], + "otherCollectionObjectsUnchanged": true, + "collectionIronGeometryUnchanged": true, + "collectionIronPlacementUnchanged": true, + "collectionIronSingleMaterial": true, + "physicsFileUnchanged": true, + "catalogUnchanged": true, + "glbPrimitiveCount": 1, + "glbMaterials": [ + "Storybook / iron satin" + ], + "passed": true +} \ No newline at end of file diff --git a/playtest/artifacts/styled/point_placed_balls.json b/playtest/artifacts/styled/point_placed_balls.json index ec6b3f6..11a6285 100644 --- a/playtest/artifacts/styled/point_placed_balls.json +++ b/playtest/artifacts/styled/point_placed_balls.json @@ -3,7 +3,7 @@ "balls": [ { "ballTypeId": "iron_ball", - "id": "iron_ball_207110_2", + "id": "iron_ball_417390_2", "launchDirection": [ 1.0, 0.0, @@ -17,7 +17,7 @@ }, { "ballTypeId": "iron_ball", - "id": "iron_ball_213365_3", + "id": "iron_ball_424950_3", "launchDirection": [ 1.0, 0.0, diff --git a/playtest/artifacts/styled/reopened_assets.json b/playtest/artifacts/styled/reopened_assets.json index b0367ba..26ccf3d 100644 --- a/playtest/artifacts/styled/reopened_assets.json +++ b/playtest/artifacts/styled/reopened_assets.json @@ -240,9 +240,10 @@ 0.6000000238418579 ], "materials": [ - "Storybook / iron satin" + "Satin iron" ], - "measuredRadius": 0.30000002458691494 + "measuredRadius": 0.30000002458691494, + "packedTextureCount": 2 }, { "id": "goal_hole", @@ -321,7 +322,7 @@ "dimensions": [ 1.0, 1.0, - 1.0 + 1.3200000524520874 ], "materials": [ "Storybook / wall stone", @@ -330,10 +331,10 @@ "arrowTipBlender": [ 0.295199990272522, 0.0, - 1.003000020980835 + 1.0049999952316284 ], "closedManifold": true, - "solidVolume": 0.9999999999999999 + "solidVolume": 1.069741313133497 }, { "id": "wood_ball", @@ -353,10 +354,10 @@ 0.6000000238418579 ], "materials": [ - "Raw wood grain" + "Honey wood with painted grain" ], "measuredRadius": 0.30000002458691494, - "packedTextureCount": 1 + "packedTextureCount": 2 }, { "id": "ceramic_ball", @@ -376,18 +377,16 @@ 0.6000000238418579 ], "materials": [ - "Ivory ceramic glaze with cobalt rings" + "Ivory porcelain glaze with cobalt scallops" ], "measuredRadius": 0.30000002458691494, - "packedTextureCount": 1 + "packedTextureCount": 2 }, { "id": "water", "passed": true, "objects": [ - "water", - "ink_water_arrow_border", - "ink_water_arrow_fill" + "water" ], "geometryMatchesSnapshot": null, "origin": [ @@ -402,7 +401,7 @@ ], "materials": [ "Storybook / water", - "Storybook / water" + "Storybook / water_surface" ], "closedManifold": true, "solidVolume": 0.9999999999999999 @@ -412,8 +411,7 @@ "passed": true, "objects": [ "ice", - "ink_ice", - "ink_ice_cracks" + "ink_ice" ], "geometryMatchesSnapshot": null, "origin": [ diff --git a/playtest/artifacts/styled/rolling_only_acceptance.json b/playtest/artifacts/styled/rolling_only_acceptance.json new file mode 100644 index 0000000..318a38c --- /dev/null +++ b/playtest/artifacts/styled/rolling_only_acceptance.json @@ -0,0 +1,1178 @@ +{ + "engine": "4.7.2-stable (official)", + "physics_hz": 120, + "gravity_mps2": 9.81, + "boost_gain_mps": 5, + "native_contact_friction": 0, + "air_force": false, + "rolling_coefficients": { + "painted_wood": 0.025, + "wall": 0.8, + "ice": 0.002 + }, + "water_speed_mps": 5, + "scope": "Unmodified existing standard solutions placed via GUI input; separate outcomes for first release, repeated trials and puzzle control checks.", + "slope": { + "case": "Reconstructed workshop: shared X direction, boost (-3,2,1), straight (-2,2.32,1), gentle (-1,2.32,1), gentle (0,1.82,1), supported goal rim (1,2,1), iron ball initially at rest (-3,3.32,1+offset). Start after 5 to 14 physics frames per offset.", + "results": [ + { + "offset_m": 0, + "scored": 0, + "trials": 10, + "mean_entry_vx_mps": 4.553788, + "mean_exit_vx_mps": 5.5240097 + }, + { + "offset_m": -0.05, + "scored": 5, + "trials": 10, + "mean_entry_vx_mps": 4.4527285, + "mean_exit_vx_mps": 4.7086759 + }, + { + "offset_m": 0.05, + "scored": 1, + "trials": 10, + "mean_entry_vx_mps": 4.4481731, + "mean_exit_vx_mps": 5.4015378 + } + ] + }, + "tutorial_first_release": [ + { + "all_tiles_contacted": true, + "final_position": "(2.989308, 3.325278, 0.012415)", + "final_speed": 3.5273768901825, + "goals": 1, + "number": 1, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(2.774754, -3.01697, 4.54389)", + "final_speed": 12.1482286453247, + "goals": 0, + "number": 2, + "won": false + }, + { + "all_tiles_contacted": true, + "final_position": "(2.018105, 3.326781, -2.002898)", + "final_speed": 1.82203078269958, + "goals": 1, + "number": 3, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(4.983223, 3.310324, 0.009422)", + "final_speed": 3.41819620132446, + "goals": 1, + "number": 4, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(5.011093, 2.807716, -0.00256)", + "final_speed": 3.04419851303101, + "goals": 1, + "number": 5, + "won": true + } + ], + "tutorial_2_repeats": [ + { + "all_tiles_contacted": true, + "final_position": "(0.00174, 3.308254, 2.992171)", + "final_speed": 3.08309292793274, + "goals": 1, + "last_at": "(0.00174, 3.308254, 2.992171)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(2.774754, -3.01697, 4.54389)", + "final_speed": 12.1482286453247, + "goals": 0, + "last_at": "(0.812292, 3.766861, 3.356932)", + "last_tile": "goal", + "number": 2, + "won": false + }, + { + "all_tiles_contacted": true, + "final_position": "(0.015385, 3.321447, 2.988728)", + "final_speed": 3.00848388671875, + "goals": 1, + "last_at": "(0.015385, 3.321447, 2.988728)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.011336, 3.315526, 2.991528)", + "final_speed": 2.62923836708069, + "goals": 1, + "last_at": "(-0.011336, 3.315526, 2.991528)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.002998, 3.315295, 3.011887)", + "final_speed": 1.94358789920807, + "goals": 1, + "last_at": "(-0.002998, 3.315295, 3.011887)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.0132, 3.321757, 2.996141)", + "final_speed": 2.29464650154114, + "goals": 1, + "last_at": "(-0.0132, 3.321757, 2.996141)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.009327, 3.328484, 3.01712)", + "final_speed": 1.91905403137207, + "goals": 1, + "last_at": "(-0.009327, 3.328484, 3.01712)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(0.00023, 3.327968, 2.999327)", + "final_speed": 3.01807308197021, + "goals": 1, + "last_at": "(0.00023, 3.327968, 2.999327)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.008635, 3.32427, 2.982841)", + "final_speed": 2.61937952041626, + "goals": 1, + "last_at": "(-0.008635, 3.32427, 2.982841)", + "last_tile": "goal", + "number": 2, + "won": true + }, + { + "all_tiles_contacted": true, + "final_position": "(-0.016084, 3.31993, 2.989123)", + "final_speed": 2.51079535484314, + "goals": 1, + "last_at": "(-0.016084, 3.31993, 2.989123)", + "last_tile": "goal", + "number": 2, + "won": true + } + ], + "element_first_release": [ + { + "scene": "res://playtest/water/scenes/01.tscn", + "title": "顺水接球", + "won": true, + "goals": [ + { + "ballId": "wood", + "goalId": "wood_goal", + "position": [ + 4.01902103424072, + 2.01551914215088, + -0.00552803836762905 + ], + "time": 2.54999999999999 + } + ], + "last_positions": [ + [ + 4.01902103424072, + 2.01551914215088, + -0.00552803836762905 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/water/scenes/02.tscn", + "title": "铁球遇水", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "iron_goal", + "position": [ + 3.0071747303009, + 3.14525461196899, + 0.00973390601575375 + ], + "time": 1.50833333333333 + } + ], + "last_positions": [ + [ + 3.0071747303009, + 3.14525461196899, + 0.00973390601575375 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/water/scenes/03.tscn", + "title": "桥上桥下", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "iron_goal", + "position": [ + 2.00563931465149, + 3.63055896759033, + 1.98668134212494 + ], + "time": 1.34166666666666 + }, + { + "ballId": "wood", + "goalId": "wood_goal", + "position": [ + 7.98417186737061, + 1.8169686794281, + 0.00762270204722881 + ], + "time": 2.31666666666666 + } + ], + "last_positions": [ + [ + 7.98417186737061, + 1.8169686794281, + 0.00762270204722881 + ], + [ + 2.00563931465149, + 3.63055896759033, + 1.98668134212494 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [ + "Missing contrast: iron should sink on the unbridged route" + ] + }, + { + "scene": "res://playtest/water/scenes/04.tscn", + "title": "少一个弯", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "iron_goal", + "position": [ + -2.98619651794434, + 3.14263653755188, + -5.01412534713745 + ], + "time": 1.39166666666666 + }, + { + "ballId": "wood", + "goalId": "wood_goal", + "position": [ + -0.0185130201280117, + 1.51470339298248, + 6.99344062805176 + ], + "time": 4.45833333333334 + } + ], + "last_positions": [ + [ + -0.0185130201280117, + 1.51470339298248, + 6.99344062805176 + ], + [ + -2.98619651794434, + 3.14263653755188, + -5.01412534713745 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [ + "Upper route should save wood alone and leave iron submerged" + ] + }, + { + "scene": "res://playtest/water/scenes/05.tscn", + "title": "桥下有路", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 4.98065614700317, + 2.62772488594055, + -0.00420154677703977 + ], + "time": 2.1 + }, + { + "ballId": "wood", + "goalId": "goal", + "position": [ + 4.98921823501587, + 2.62280011177063, + -0.00133995711803436 + ], + "time": 3.83333333333332 + } + ], + "last_positions": [ + [ + 4.98921823501587, + 2.62280011177063, + -0.00133995711803436 + ], + [ + 4.98065614700317, + 2.62772488594055, + -0.00420154677703977 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [ + "Upper route should save wood alone and leave iron submerged" + ] + }, + { + "scene": "res://playtest/ice/scenes/01.tscn", + "title": "第一课 · 木球过冰面", + "won": true, + "goals": [ + { + "ballId": "wood", + "goalId": "goal", + "position": [ + 1.99338495731354, + 2.63928580284119, + -0.00695795565843582 + ], + "time": 1.6 + } + ], + "last_positions": [ + [ + 1.99338495731354, + 2.63928580284119, + -0.00695795565843582 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/02.tscn", + "title": "第二课 · 撞开冰盖", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.0020724474452436, + 1.63138544559479, + -0.00251581193879247 + ], + "time": 2.49166666666666 + } + ], + "last_positions": [ + [ + 0.0020724474452436, + 1.63138544559479, + -0.00251581193879247 + ] + ], + "ice_breaks": { + "lid": { + "ball": "iron", + "impulse_Ns": 6788.8935546875, + "time": 1.79166666666666 + } + }, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/03.tscn", + "title": "折角冰桥", + "won": true, + "goals": [ + { + "ballId": "wood", + "goalId": "goal", + "position": [ + -0.0122591592371464, + 2.644198179245, + 3.98504304885864 + ], + "time": 2.61666666666666 + } + ], + "last_positions": [ + [ + -0.0122591592371464, + 2.644198179245, + 3.98504304885864 + ] + ], + "ice_breaks": {}, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/04.tscn", + "title": "同一扇冰门", + "won": true, + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.00461347587406635, + 1.63504207134247, + -0.00930510461330414 + ], + "time": 2.50833333333333 + }, + { + "ballId": "wood", + "goalId": "goal", + "position": [ + -0.00781890098005533, + 1.64647805690765, + 0.0140113700181246 + ], + "time": 3.70833333333332 + } + ], + "last_positions": [ + [ + 0.00461347587406635, + 1.63504207134247, + -0.00930510461330414 + ], + [ + -0.00781890098005533, + 1.64647805690765, + 0.0140113700181246 + ] + ], + "ice_breaks": { + "lid": { + "ball": "iron", + "impulse_Ns": 6782.96875, + "time": 1.79166666666666 + } + }, + "control_or_mechanic_errors": [] + }, + { + "scene": "res://playtest/ice/scenes/05.tscn", + "title": "双弯会合", + "won": false, + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.000304835382848978, + 1.63979434967041, + -0.00240921974182129 + ], + "time": 2.35833333333333 + } + ], + "last_positions": [ + [ + -0.000304835382848978, + 1.63979434967041, + -0.00240921974182129 + ], + [ + -2.26851177215576, + -3.03954386711121, + 0.922221124172211 + ] + ], + "ice_breaks": { + "lid": { + "ball": "iron", + "impulse_Ns": 6812.1572265625, + "time": 1.55833333333333 + } + }, + "control_or_mechanic_errors": [ + "Answer did not get every ball into a hole", + "Missing iron break or later passage of wood through that gate" + ] + } + ], + "ice_5_repeats": [ + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.0049751722253859, + 1.62705624103546, + -0.0125165190547705 + ], + "time": 2.19999999999999 + } + ], + "last_positions": [ + [ + 0.0049751722253859, + 1.62705624103546, + -0.0125165190547705 + ], + [ + -3.66633248329163, + 2.80000972747803, + 0.968742489814758 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.00712572922930121, + 1.63665926456451, + 0.0017867642454803 + ], + "time": 2.28333333333333 + } + ], + "last_positions": [ + [ + -0.00712572922930121, + 1.63665926456451, + 0.0017867642454803 + ], + [ + -2.26089692115784, + -3.04660749435425, + 0.907471120357513 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.0117121171206236, + 1.64620649814606, + -0.00526860356330872 + ], + "time": 2.44999999999999 + } + ], + "last_positions": [ + [ + -0.0117121171206236, + 1.64620649814606, + -0.00526860356330872 + ], + [ + -3.79813981056213, + 2.80000972747803, + 0.902189671993256 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.0109199862927198, + 1.64570879936218, + -0.0140795586630702 + ], + "time": 2.40833333333333 + } + ], + "last_positions": [ + [ + -0.0109199862927198, + 1.64570879936218, + -0.0140795586630702 + ], + [ + -3.65209627151489, + 2.80000972747803, + 0.935339748859406 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.00563149899244308, + 1.64715874195099, + 0.00185385160148144 + ], + "time": 2.33333333333333 + } + ], + "last_positions": [ + [ + -0.00563149899244308, + 1.64715874195099, + 0.00185385160148144 + ], + [ + -5.70536279678345, + -3.07705640792847, + 1.0229719877243 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.0128181744366884, + 1.64694488048553, + -0.0149663500487804 + ], + "time": 2.69999999999999 + } + ], + "last_positions": [ + [ + -0.0128181744366884, + 1.64694488048553, + -0.0149663500487804 + ], + [ + -2.25116276741028, + -3.05089116096497, + 0.916221141815186 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.00999267585575581, + 1.64805376529694, + 0.0169403124600649 + ], + "time": 2.70833333333333 + } + ], + "last_positions": [ + [ + 0.00999267585575581, + 1.64805376529694, + 0.0169403124600649 + ], + [ + -2.25192952156067, + -3.0870463848114, + 0.919421315193176 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + -0.010418557561934, + 1.64771258831024, + -0.00168324646074325 + ], + "time": 2.25833333333333 + } + ], + "last_positions": [ + [ + -0.010418557561934, + 1.64771258831024, + -0.00168324646074325 + ], + [ + -2.2493531703949, + -3.02005052566528, + 0.906279861927032 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.0115320105105639, + 1.64935064315796, + -0.0131654581055045 + ], + "time": 2.49999999999999 + } + ], + "last_positions": [ + [ + 0.0115320105105639, + 1.64935064315796, + -0.0131654581055045 + ], + [ + -2.25015664100647, + -3.02649593353271, + 0.906184017658234 + ] + ], + "won": false + }, + { + "goals": [ + { + "ballId": "iron", + "goalId": "goal", + "position": [ + 0.0109325684607029, + 1.62083506584167, + 0.00581136858090758 + ], + "time": 2.19999999999999 + } + ], + "last_positions": [ + [ + 0.0109325684607029, + 1.62083506584167, + 0.00581136858090758 + ], + [ + -2.24905014038086, + -3.04551362991333, + 0.901266634464264 + ] + ], + "won": false + } + ], + "original_answers_won_on_first_release": 13, + "water_5_bridge_runs": [ + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73415589332581, + 3.45122671127319, + -0.0499029904603958 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.35, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69919514656067, + 3.49421763420105, + -0.0482720509171486 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.35833333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.70000910758972, + 3.49418568611145, + -0.0484223403036594 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.44166666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69930958747864, + 3.49433040618896, + -0.0484610199928284 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.36666666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73357796669006, + 3.45104455947876, + -0.0497226268053055 + ], + "first": 2.88333333333333, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.45833333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73408818244934, + 3.45125722885132, + -0.0499307438731194 + ], + "first": 2.88333333333333, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.35, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73481893539429, + 3.45112180709839, + -0.0497525595128536 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.35, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69959568977356, + 3.49410438537598, + -0.0482918545603752 + ], + "first": 2.87499999999999, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.44166666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73568439483643, + 3.45115423202515, + -0.0499998852610588 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.35833333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69978427886963, + 3.49418926239014, + -0.0483069941401482 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.34166666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.70126962661743, + 3.49404382705688, + -0.0483891740441322 + ], + "first": 2.87499999999999, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.44166666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73486399650574, + 3.45107579231262, + -0.0498786717653275 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.35833333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73374485969543, + 3.45127367973328, + -0.0498904660344124 + ], + "first": 2.88333333333333, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.33333333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73492908477783, + 3.45114946365356, + -0.0497693344950676 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.44166666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.70125579833984, + 3.4940710067749, + -0.0483843460679054 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.41666666666666, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.70001363754272, + 3.49416851997375, + -0.0483161509037018 + ], + "first": 2.87499999999999, + "last": 3.07499999999999 + }, + "iron_last_on_landing_tile_s": 1.33333333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69908380508423, + 3.49424290657043, + -0.0482619479298592 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.45, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.73519825935364, + 3.45113468170166, + -0.0497792214155197 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.33333333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.69938158988953, + 3.49420261383057, + -0.0482868924736977 + ], + "first": 2.87499999999999, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.43333333333333, + "shared_tiles_in_order": 2, + "won": true + }, + { + "first_tile": "(3.0, 2.32, 0.0)", + "first_wood_contact": { + "at": [ + 2.7353355884552, + 3.45107245445251, + -0.0499031543731689 + ], + "first": 2.88333333333333, + "last": 3.06666666666666 + }, + "iron_last_on_landing_tile_s": 1.45833333333333, + "shared_tiles_in_order": 2, + "won": true + } + ], + "water_3_empty_iron_max_immersion": 0.921217632183752, + "water_upper_route_goals": { + "少一个弯": [], + "桥下有路": [] + }, + "water_ice_full_acceptance": 6, + "checks": { + "baseline/physics_report.json": { + "passed": 39, + "failed": 0 + }, + "baseline/merge_report.json": { + "passed": 16, + "failed": 0 + }, + "baseline/playtest_report.json": { + "passed": 28, + "failed": 0 + }, + "env/report.json": { + "passed": 105, + "failed": 0 + }, + "balls/ball_materials_report.json": { + "passed": 107, + "failed": 0 + }, + "showcase/report.json": { + "passed": 42, + "failed": 0 + } + }, + "water_measurements": { + "ceramic_ball": { + "buoyancyN": 1109.48486328125, + "flowSpeed": 5.00000143051147, + "immersion": 1.0, + "massKg": 330.0, + "maxDownstreamM": 0.950191736221313, + "speedMps": 0.0413802154362202, + "x": 0.950191736221313, + "y": 1.29968559741974 + }, + "iron_ball": { + "buoyancyN": 1109.48486328125, + "flowSpeed": 5.00000143051147, + "immersion": 1.0, + "massKg": 890.076049804688, + "maxDownstreamM": 0.19135707616806, + "speedMps": 0.0156707968562841, + "x": 0.19135707616806, + "y": 1.29984951019287 + }, + "wood_ball": { + "buoyancyN": 596.743408203125, + "flowSpeed": 4.99999904632568, + "immersion": 0.537856277454081, + "massKg": 60.0, + "maxDownstreamM": 8.20294380187988, + "speedMps": 0.00989113561809063, + "x": 8.20094013214111, + "y": 1.98463678359985 + } + } +} diff --git a/playtest/artifacts/styled/surface_alignment.png b/playtest/artifacts/styled/surface_alignment.png index 2854311..ef6ffab 100644 Binary files a/playtest/artifacts/styled/surface_alignment.png and b/playtest/artifacts/styled/surface_alignment.png differ diff --git a/playtest/artifacts/styled/surface_alignment_report.json b/playtest/artifacts/styled/surface_alignment_report.json index 438b1d3..f4322d3 100644 --- a/playtest/artifacts/styled/surface_alignment_report.json +++ b/playtest/artifacts/styled/surface_alignment_report.json @@ -1,7 +1,7 @@ { "engine": "4.7.2-stable (official)", "failed": 0, - "passed": 42, + "passed": 68, "results": [ { "detail": { @@ -149,6 +149,11 @@ "name": "screenshot_exact_y_182", "passed": true }, + { + "detail": {}, + "name": "placing_launcher_second_joins_same_surface", + "passed": true + }, { "detail": {}, "name": "top_click_still_stacks", @@ -174,6 +179,11 @@ "name": "neighbor_order_does_not_change_height", "passed": true }, + { + "detail": {}, + "name": "standalone_launcher_has_rims_and_arrow", + "passed": true + }, { "detail": { "cursor": "(0.0, 1.82, 0.0)" @@ -233,18 +243,9 @@ }, { "detail": { - "boosts": 1, - "contacts": [ - "launch", - "slope", - "tail" - ], - "final": "(-1.309487, 2.801187, -0.002228)", - "slope_y": 2.3199999332428, - "tail_y": 1.8199999332428, - "time": 0.533333333333333 + "max_step_m": 0.000498771667480469 }, - "name": "gentle_q0_real_ball_crosses_both_seams", + "name": "gentle_q0_full_mouth", "passed": true }, { @@ -255,12 +256,13 @@ "slope", "tail" ], - "final": "(0.002842, 2.800547, -1.321674)", + "entry_speed_mps": 4.50636196136475, + "final": "(-1.321899, 2.803678, 0.010922)", "slope_y": 2.3199999332428, "tail_y": 1.8199999332428, "time": 0.541666666666667 }, - "name": "gentle_q1_real_ball_crosses_both_seams", + "name": "gentle_q0_offset_0.00_real_ball", "passed": true }, { @@ -271,12 +273,13 @@ "slope", "tail" ], - "final": "(1.303655, 2.801161, 0.005427)", + "entry_speed_mps": 3.48604559898376, + "final": "(-1.300645, 2.80192, -0.007589)", "slope_y": 2.3199999332428, "tail_y": 1.8199999332428, - "time": 0.533333333333333 + "time": 0.683333333333333 }, - "name": "gentle_q2_real_ball_crosses_both_seams", + "name": "gentle_q0_offset_-0.05_real_ball", "passed": true }, { @@ -287,12 +290,20 @@ "slope", "tail" ], - "final": "(0.00585, 2.802268, 1.304691)", + "entry_speed_mps": 3.48651003837585, + "final": "(-1.306496, 2.802862, -0.009553)", "slope_y": 2.3199999332428, "tail_y": 1.8199999332428, - "time": 0.533333333333333 + "time": 0.691666666666667 }, - "name": "gentle_q3_real_ball_crosses_both_seams", + "name": "gentle_q0_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.000498771667480469 + }, + "name": "gentle_q1_full_mouth", "passed": true }, { @@ -303,12 +314,13 @@ "slope", "tail" ], - "final": "(-1.699048, 2.247441, 0.007275)", - "slope_y": 1.82000017166138, - "tail_y": 1.32000017166138, - "time": 0.6 + "entry_speed_mps": 4.50805997848511, + "final": "(0.010496, 2.803505, -1.323291)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.541666666666667 }, - "name": "steep_q0_real_ball_crosses_both_seams", + "name": "gentle_q1_offset_0.00_real_ball", "passed": true }, { @@ -319,12 +331,13 @@ "slope", "tail" ], - "final": "(-0.00041, 2.24705, -1.698913)", - "slope_y": 1.82000017166138, - "tail_y": 1.32000017166138, - "time": 0.6 + "entry_speed_mps": 3.48620176315308, + "final": "(0.006929, 2.801669, -1.304565)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.683333333333333 }, - "name": "steep_q1_real_ball_crosses_both_seams", + "name": "gentle_q1_offset_-0.05_real_ball", "passed": true }, { @@ -335,12 +348,20 @@ "slope", "tail" ], - "final": "(1.698807, 2.247102, -0.00226)", - "slope_y": 1.82000017166138, - "tail_y": 1.32000017166138, - "time": 0.6 + "entry_speed_mps": 3.48620343208313, + "final": "(-0.006155, 2.801658, -1.313274)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.691666666666667 }, - "name": "steep_q2_real_ball_crosses_both_seams", + "name": "gentle_q1_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.000498771667480469 + }, + "name": "gentle_q2_full_mouth", "passed": true }, { @@ -351,12 +372,337 @@ "slope", "tail" ], - "final": "(0.007345, 2.247429, 1.699053)", + "entry_speed_mps": 4.50577354431152, + "final": "(1.326657, 2.803352, -0.010376)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.541666666666667 + }, + "name": "gentle_q2_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48649907112122, + "final": "(1.317046, 2.801669, 0.006928)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.691666666666667 + }, + "name": "gentle_q2_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48633003234863, + "final": "(1.305969, 2.801574, 0.006665)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.683333333333333 + }, + "name": "gentle_q2_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.000498771667480469 + }, + "name": "gentle_q3_full_mouth", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 4.50539684295654, + "final": "(0.007971, 2.802351, 1.315242)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.541666666666667 + }, + "name": "gentle_q3_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48614597320557, + "final": "(0.009307, 2.802734, 1.320634)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.7 + }, + "name": "gentle_q3_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48637318611145, + "final": "(-0.009566, 2.802869, 1.308262)", + "slope_y": 2.3199999332428, + "tail_y": 1.8199999332428, + "time": 0.691666666666667 + }, + "name": "gentle_q3_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.00099945068359375 + }, + "name": "steep_q0_full_mouth", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 4.50545883178711, + "final": "(-1.549844, 2.359623, -0.011575)", "slope_y": 1.82000017166138, "tail_y": 1.32000017166138, - "time": 0.6 + "time": 0.566666666666667 }, - "name": "steep_q3_real_ball_crosses_both_seams", + "name": "steep_q0_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48655772209167, + "final": "(-1.315089, 2.305791, -0.013575)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.741666666666667 + }, + "name": "steep_q0_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48620939254761, + "final": "(-1.310743, 2.300434, 0.001933)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.733333333333333 + }, + "name": "steep_q0_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.00099945068359375 + }, + "name": "steep_q1_full_mouth", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 4.50606155395508, + "final": "(-0.005537, 2.272588, -1.663085)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.591666666666667 + }, + "name": "steep_q1_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48655772209167, + "final": "(0.012681, 2.304982, -1.310319)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.741666666666667 + }, + "name": "steep_q1_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48605728149414, + "final": "(0.004755, 2.301212, -1.30469)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.733333333333333 + }, + "name": "steep_q1_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.00099945068359375 + }, + "name": "steep_q2_full_mouth", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 4.50730752944946, + "final": "(1.663578, 2.271967, 0.001082)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.591666666666667 + }, + "name": "steep_q2_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48663663864136, + "final": "(1.314951, 2.300605, -0.003228)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.725 + }, + "name": "steep_q2_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48620438575745, + "final": "(1.308576, 2.300469, 0.001644)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.733333333333333 + }, + "name": "steep_q2_offset_0.05_real_ball", + "passed": true + }, + { + "detail": { + "max_step_m": 0.00099945068359375 + }, + "name": "steep_q3_full_mouth", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 4.50668144226074, + "final": "(0.001801, 2.271847, 1.663327)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.591666666666667 + }, + "name": "steep_q3_offset_0.00_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48678493499756, + "final": "(0.00193, 2.300435, 1.309911)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.733333333333333 + }, + "name": "steep_q3_offset_-0.05_real_ball", + "passed": true + }, + { + "detail": { + "boosts": 1, + "contacts": [ + "launch", + "slope", + "tail" + ], + "entry_speed_mps": 3.48651027679443, + "final": "(0.008731, 2.302601, 1.307388)", + "slope_y": 1.82000017166138, + "tail_y": 1.32000017166138, + "time": 0.733333333333333 + }, + "name": "steep_q3_offset_0.05_real_ball", "passed": true } ] diff --git a/playtest/artifacts/tutorial/canonical_turn_roundtrip.json b/playtest/artifacts/tutorial/canonical_turn_roundtrip.json new file mode 100644 index 0000000..1be06c5 --- /dev/null +++ b/playtest/artifacts/tutorial/canonical_turn_roundtrip.json @@ -0,0 +1,34 @@ +{ + "assetFamily": "railbound_inspired", + "balls": [ + { + "ballTypeId": "iron_ball", + "id": "ball", + "launchDirection": [ + 1.0, + 0.0, + 0.0 + ], + "position": [ + 1.89999997615814, + 2.0, + -2.0 + ] + } + ], + "entities": [], + "pieces": [ + { + "id": "bend", + "kind": "turn_90", + "position": [ + 2.0, + 1.0, + -2.0 + ], + "quarter": 0 + } + ], + "schemaVersion": 2, + "title": "my_level" +} \ No newline at end of file diff --git a/playtest/artifacts/tutorial/legacy_turn_fixture.json b/playtest/artifacts/tutorial/legacy_turn_fixture.json new file mode 100644 index 0000000..2275f52 --- /dev/null +++ b/playtest/artifacts/tutorial/legacy_turn_fixture.json @@ -0,0 +1 @@ +{"assetFamily":"railbound_inspired","balls":[{"ballTypeId":"iron_ball","id":"ball","position":[1.9,2,-2]}],"entities":[],"pieces":[{"id":"bend","kind":"turn_ccw","position":[2,1,-2],"quarter":3}],"schemaVersion":2} \ No newline at end of file diff --git a/playtest/artifacts/tutorial/probe.json b/playtest/artifacts/tutorial/probe.json new file mode 100644 index 0000000..86ff007 --- /dev/null +++ b/playtest/artifacts/tutorial/probe.json @@ -0,0 +1,3841 @@ +[ + { + "contacts": { + "directional_boost": true, + "gentle": true, + "goal_hole": true, + "steep": true, + "straight": true, + "turn_90": true + }, + "final": [ + 2.98783326148987, + 2.65331435203552, + 0.0143182165920734 + ], + "issue": "", + "lesson": 1, + "speed": 4.2959885597229, + "success": true, + "time": 2.38333333333333, + "trace": [ + { + "entered": 0, + "positions": [ + [ + -3.10833358764648, + 4.81795644760132, + 0.0 + ] + ], + "time": 0.025 + }, + { + "entered": 0, + "positions": [ + [ + -2.85978889465332, + 4.80000972747803, + 0.00000000000245484427056908 + ] + ], + "time": 0.075 + }, + { + "entered": 0, + "positions": [ + [ + -2.62484073638916, + 4.80000972747803, + 0.0000000000481192793944096 + ] + ], + "time": 0.125 + }, + { + "entered": 0, + "positions": [ + [ + -2.39643692970276, + 4.79592227935791, + 0.000000000152501372641112 + ] + ], + "time": 0.175 + }, + { + "entered": 0, + "positions": [ + [ + -2.16869211196899, + 4.76935386657715, + 0.000000000264847088704556 + ] + ], + "time": 0.225 + }, + { + "entered": 0, + "positions": [ + [ + -1.94095194339752, + 4.71826076507568, + 0.000000000377190417788498 + ] + ], + "time": 0.275 + }, + { + "entered": 0, + "positions": [ + [ + -1.71321678161621, + 4.64264440536499, + 0.000000000489531304381785 + ] + ], + "time": 0.325 + }, + { + "entered": 0, + "positions": [ + [ + -1.48548674583435, + 4.54250478744507, + 0.000000000601869720728843 + ] + ], + "time": 0.375 + }, + { + "entered": 0, + "positions": [ + [ + -1.29018414020538, + 4.48680210113525, + 0.000521000300068408 + ] + ], + "time": 0.425 + }, + { + "entered": 0, + "positions": [ + [ + -1.12716615200043, + 4.48064279556274, + 0.00132991373538971 + ] + ], + "time": 0.475000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -0.964129209518433, + 4.48039245605469, + 0.00106177886482328 + ] + ], + "time": 0.525000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -0.80135190486908, + 4.48034811019897, + 0.000134371788590215 + ] + ], + "time": 0.575 + }, + { + "entered": 0, + "positions": [ + [ + -0.638794004917145, + 4.48038244247437, + -0.000841148721519858 + ] + ], + "time": 0.625 + }, + { + "entered": 0, + "positions": [ + [ + -0.476743400096893, + 4.48207330703735, + -0.00105500139761716 + ] + ], + "time": 0.675 + }, + { + "entered": 0, + "positions": [ + [ + -0.315356194972992, + 4.47074937820435, + -0.000694721005856991 + ] + ], + "time": 0.725 + }, + { + "entered": 0, + "positions": [ + [ + -0.153971374034882, + 4.43490076065063, + -0.000334446056513116 + ] + ], + "time": 0.775 + }, + { + "entered": 0, + "positions": [ + [ + 0.00741094537079334, + 4.37452793121338, + 0.0000258233740169089 + ] + ], + "time": 0.825 + }, + { + "entered": 0, + "positions": [ + [ + 0.16879066824913, + 4.28963088989258, + 0.0003860869910568 + ] + ], + "time": 0.874999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.33016762137413, + 4.18021059036255, + 0.000746344507206231 + ] + ], + "time": 0.924999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.491541624069214, + 4.04626750946045, + 0.001106595271267 + ] + ], + "time": 0.974999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.653299450874329, + 4.00052642822266, + 0.0014962418936193 + ] + ], + "time": 1.025 + }, + { + "entered": 0, + "positions": [ + [ + 0.815248191356659, + 3.98662281036377, + 0.00190058373846114 + ] + ], + "time": 1.075 + }, + { + "entered": 0, + "positions": [ + [ + 0.976189315319061, + 3.9803466796875, + -0.0000941361649893224 + ] + ], + "time": 1.125 + }, + { + "entered": 0, + "positions": [ + [ + 1.13663828372955, + 3.98052740097046, + -0.00270921760238707 + ] + ], + "time": 1.175 + }, + { + "entered": 0, + "positions": [ + [ + 1.29635393619537, + 3.98057270050049, + -0.00275545404292643 + ] + ], + "time": 1.225 + }, + { + "entered": 0, + "positions": [ + [ + 1.45632207393646, + 3.98061299324036, + -0.00104781589470804 + ] + ], + "time": 1.275 + }, + { + "entered": 0, + "positions": [ + [ + 1.61541414260864, + 3.98039722442627, + 0.00115893525071442 + ] + ], + "time": 1.325 + }, + { + "entered": 0, + "positions": [ + [ + 1.77380871772766, + 3.98068451881409, + 0.00229593692347407 + ] + ], + "time": 1.375 + }, + { + "entered": 0, + "positions": [ + [ + 1.93186926841736, + 3.98042964935303, + 0.00183777126949281 + ] + ], + "time": 1.425 + }, + { + "entered": 0, + "positions": [ + [ + 2.08975958824158, + 3.98035740852356, + 0.000112430745502934 + ] + ], + "time": 1.475 + }, + { + "entered": 0, + "positions": [ + [ + 2.24752712249756, + 3.98063635826111, + -0.00172256969381124 + ] + ], + "time": 1.525 + }, + { + "entered": 0, + "positions": [ + [ + 2.40485239028931, + 3.98046970367432, + -0.00232088449411094 + ] + ], + "time": 1.575 + }, + { + "entered": 0, + "positions": [ + [ + 2.56192493438721, + 3.98007893562317, + -0.00129920919425786 + ] + ], + "time": 1.625 + }, + { + "entered": 0, + "positions": [ + [ + 2.71856665611267, + 3.96264338493347, + -0.000287808070424944 + ] + ], + "time": 1.675 + }, + { + "entered": 0, + "positions": [ + [ + 2.87520575523376, + 3.92068338394165, + 0.000723578268662095 + ] + ], + "time": 1.725 + }, + { + "entered": 0, + "positions": [ + [ + 3.03184270858765, + 3.85419893264771, + 0.00173494929913431 + ] + ], + "time": 1.775 + }, + { + "entered": 0, + "positions": [ + [ + 3.16093373298645, + 3.78307127952576, + 0.00224206713028252 + ] + ], + "time": 1.825 + }, + { + "entered": 0, + "positions": [ + [ + 3.15230631828308, + 3.78682112693787, + 0.000227993761654943 + ] + ], + "time": 1.875 + }, + { + "entered": 0, + "positions": [ + [ + 3.14367890357971, + 3.76604580879211, + -0.00178607716225088 + ] + ], + "time": 1.925 + }, + { + "entered": 0, + "positions": [ + [ + 3.13505148887634, + 3.72074556350708, + -0.00380014162510633 + ] + ], + "time": 1.975 + }, + { + "entered": 0, + "positions": [ + [ + 3.12525010108948, + 3.65176868438721, + -0.00576893845573068 + ] + ], + "time": 2.025 + }, + { + "entered": 0, + "positions": [ + [ + 3.09402441978455, + 3.57376503944397, + -0.00646476773545146 + ] + ], + "time": 2.075 + }, + { + "entered": 0, + "positions": [ + [ + 3.05508613586426, + 3.47682809829712, + -0.00649610767140985 + ] + ], + "time": 2.125 + }, + { + "entered": 0, + "positions": [ + [ + 3.00987577438354, + 3.35994434356689, + -0.00559699768200517 + ] + ], + "time": 2.17499999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.98031878471375, + 3.22299432754517, + -0.00259478506632149 + ] + ], + "time": 2.22499999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.98045086860657, + 3.06898665428162, + 0.00357193127274513 + ] + ], + "time": 2.27499999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.98249197006226, + 2.89095139503479, + 0.00926689337939024 + ] + ], + "time": 2.32499999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.98657608032227, + 2.68908905982971, + 0.0138433016836643 + ] + ], + "time": 2.37499999999999 + } + ] + }, + { + "contacts": { + "directional_boost": true, + "gentle": true, + "goal_hole": true, + "steep": true, + "straight": true, + "turn_90": true + }, + "final": [ + -0.0158945228904486, + 2.65275812149048, + 3.00849509239197 + ], + "issue": "", + "lesson": 2, + "speed": 3.40942645072937, + "success": true, + "time": 2.84166666666666, + "trace": [ + { + "entered": 0, + "positions": [ + [ + -3.15000009536743, + 4.3193187713623, + 0.0 + ] + ], + "time": 0.0166666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -2.90000343322754, + 4.30092525482178, + 0.0 + ] + ], + "time": 0.0666666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -2.66345381736755, + 4.30001020431519, + 0.0000000000278498855921239 + ] + ], + "time": 0.116666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -2.43439507484436, + 4.29796648025513, + 0.0000000000801226238134056 + ] + ], + "time": 0.166666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -2.20664954185486, + 4.27548551559448, + 0.000000000135841310422435 + ] + ], + "time": 0.216666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -1.97890853881836, + 4.22847986221313, + 0.000000000191558838236183 + ] + ], + "time": 0.266666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -1.75117254257202, + 4.1569504737854, + 0.00000000024727517256018 + ] + ], + "time": 0.316666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -1.52344167232513, + 4.0608983039856, + 0.000000000302990271761061 + ] + ], + "time": 0.366666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -1.31219398975372, + 3.98635292053223, + 0.000389384978916496 + ] + ], + "time": 0.416666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -1.13424623012543, + 3.98041582107544, + 0.00155002949759364 + ] + ], + "time": 0.466666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.9603590965271, + 3.98047018051147, + 0.00146382604725659 + ] + ], + "time": 0.516666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.786719381809235, + 3.98049521446228, + 0.000514365150593221 + ] + ], + "time": 0.566666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.613284707069397, + 3.9804892539978, + -0.00102544960100204 + ] + ], + "time": 0.616666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.440637171268463, + 3.98211646080017, + -0.00192247692029923 + ] + ], + "time": 0.666666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.290953785181046, + 3.99980330467224, + 0.024247232824564 + ] + ], + "time": 0.716666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.176584273576736, + 4.01184368133545, + 0.0920531824231148 + ] + ], + "time": 0.766666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0883183404803276, + 4.01031112670898, + 0.182221785187721 + ] + ], + "time": 0.816666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0262585543096066, + 3.9953920841217, + 0.28783443570137 + ] + ], + "time": 0.866666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00468307780101895, + 3.98543071746826, + 0.406931579113007 + ] + ], + "time": 0.916666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0162491202354431, + 3.98916816711426, + 0.529497087001801 + ] + ], + "time": 0.966666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0147403404116631, + 3.98701167106628, + 0.651162087917328 + ] + ], + "time": 1.01666666666667 + }, + { + "entered": 0, + "positions": [ + [ + 0.00521507300436497, + 3.98107552528381, + 0.772206723690033 + ] + ], + "time": 1.06666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.00202928530052304, + 3.98069405555725, + 0.889594435691833 + ] + ], + "time": 1.11666666666667 + }, + { + "entered": 0, + "positions": [ + [ + -0.00159915443509817, + 3.98041868209839, + 1.00115692615509 + ] + ], + "time": 1.16666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00288836332038045, + 3.98055362701416, + 1.11100995540619 + ] + ], + "time": 1.21666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00411951448768377, + 3.98093891143799, + 1.22504162788391 + ] + ], + "time": 1.26666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00159472413361073, + 3.98041820526123, + 1.33789312839508 + ] + ], + "time": 1.31666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00181134219747037, + 3.98042869567871, + 1.4466198682785 + ] + ], + "time": 1.36666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0035602415446192, + 3.98065781593323, + 1.55177462100983 + ] + ], + "time": 1.41666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00202478957362473, + 3.98055195808411, + 1.65533876419067 + ] + ], + "time": 1.46666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.000794191844761372, + 3.98038005828857, + 1.76167643070221 + ] + ], + "time": 1.51666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00255793705582619, + 3.98053193092346, + 1.87061297893524 + ] + ], + "time": 1.56666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00201047654263675, + 3.9804379940033, + 1.97997319698334 + ] + ], + "time": 1.61666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0000314238423015922, + 3.98034358024597, + 2.087810754776 + ] + ], + "time": 1.66666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00192645564675331, + 3.98043417930603, + 2.19315052032471 + ] + ], + "time": 1.71666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00248778983950615, + 3.98049449920654, + 2.29722762107849 + ] + ], + "time": 1.76666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00126909383106977, + 3.98040294647217, + 2.40004062652588 + ] + ], + "time": 1.81666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.000619663100223988, + 3.98047184944153, + 2.50490355491638 + ] + ], + "time": 1.86666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00260091316886246, + 3.97590398788452, + 2.61024641990662 + ] + ], + "time": 1.91666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00465742126107216, + 3.94932270050049, + 2.71549916267395 + ] + ], + "time": 1.96666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00671390816569328, + 3.89821672439575, + 2.82075071334839 + ] + ], + "time": 2.01666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00877037178725004, + 3.82258653640747, + 2.92600107192993 + ] + ], + "time": 2.06666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0108268102630973, + 3.72243237495422, + 3.03125023841858 + ] + ], + "time": 2.11666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00259219016879797, + 3.62966370582581, + 3.09218645095825 + ] + ], + "time": 2.16666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0262243896722794, + 3.57618832588196, + 3.06449890136719 + ] + ], + "time": 2.21666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0536190271377563, + 3.49944043159485, + 3.03582096099854 + ] + ], + "time": 2.26666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0391134545207024, + 3.44584250450134, + 2.98704195022583 + ] + ], + "time": 2.31666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.00770481675863266, + 3.4015531539917, + 2.97263073921204 + ] + ], + "time": 2.36666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0205278918147087, + 3.37593507766724, + 3.01107931137085 + ] + ], + "time": 2.41666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00975720584392548, + 3.35448551177979, + 3.01835179328918 + ] + ], + "time": 2.46666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0189527347683907, + 3.32360196113586, + 2.99398612976074 + ] + ], + "time": 2.51666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00173472007736564, + 3.27635836601257, + 2.98023653030396 + ] + ], + "time": 2.56666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0155864637345076, + 3.21036505699158, + 2.98771023750305 + ] + ], + "time": 2.61666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0194170977920294, + 3.12414622306824, + 3.00390696525574 + ] + ], + "time": 2.66666666666666 + }, + { + "entered": 0, + "positions": [ + [ + 0.0111672226339579, + 3.01673460006714, + 3.01639485359192 + ] + ], + "time": 2.71666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.00223375856876373, + 2.8875367641449, + 3.01971578598022 + ] + ], + "time": 2.76666666666666 + }, + { + "entered": 0, + "positions": [ + [ + -0.0138784889131784, + 2.73615145683289, + 3.01420450210571 + ] + ], + "time": 2.81666666666666 + } + ] + }, + { + "contacts": { + "directional_boost": true, + "gentle": true, + "goal_hole": true, + "steep": true, + "straight": true, + "turn_90": true + }, + "final": [ + 1.98567974567413, + 2.65954971313477, + -1.99052429199219 + ], + "issue": "", + "lesson": 3, + "speed": 4.03950977325439, + "success": true, + "time": 3.22499999999999, + "trace": [ + { + "entered": 0, + "positions": [ + [ + -2.98333501815796, + 4.30978155136108, + 0.0 + ] + ], + "time": 0.05 + }, + { + "entered": 0, + "positions": [ + [ + -2.74133348464966, + 4.30001020431519, + 0.0000000000150103263152346 + ] + ], + "time": 0.1 + }, + { + "entered": 0, + "positions": [ + [ + -2.51031136512756, + 4.30001020431519, + 0.0000000000615494669120586 + ] + ], + "time": 0.15 + }, + { + "entered": 0, + "positions": [ + [ + -2.28256416320801, + 4.28570413589478, + 0.000000000117268542099147 + ] + ], + "time": 0.2 + }, + { + "entered": 0, + "positions": [ + [ + -2.05482172966003, + 4.24687337875366, + 0.000000000172986458490954 + ] + ], + "time": 0.25 + }, + { + "entered": 0, + "positions": [ + [ + -1.82708394527435, + 4.183518409729, + 0.000000000228703195270796 + ] + ], + "time": 0.3 + }, + { + "entered": 0, + "positions": [ + [ + -1.59935140609741, + 4.09564065933228, + 0.000000000284418710805312 + ] + ], + "time": 0.35 + }, + { + "entered": 0, + "positions": [ + [ + -1.37162399291992, + 3.98323965072632, + 0.000000000340132977338925 + ] + ], + "time": 0.4 + }, + { + "entered": 0, + "positions": [ + [ + -1.19133615493774, + 3.98444533348083, + 0.00104329234454781 + ] + ], + "time": 0.450000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -1.01467263698578, + 3.98060727119446, + 0.00126909941900522 + ] + ], + "time": 0.500000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -0.839593172073364, + 3.98037219047546, + 0.000630404043477029 + ] + ], + "time": 0.55 + }, + { + "entered": 0, + "positions": [ + [ + -0.66473513841629, + 3.98057293891907, + -0.000518873624969274 + ] + ], + "time": 0.6 + }, + { + "entered": 0, + "positions": [ + [ + -0.490355014801025, + 3.98164057731628, + -0.00132852757815272 + ] + ], + "time": 0.65 + }, + { + "entered": 0, + "positions": [ + [ + -0.326477706432343, + 3.99203824996948, + -0.0118421362712979 + ] + ], + "time": 0.7 + }, + { + "entered": 0, + "positions": [ + [ + -0.204683989286423, + 4.01273059844971, + -0.071490153670311 + ] + ], + "time": 0.75 + }, + { + "entered": 0, + "positions": [ + [ + -0.109283827245235, + 4.01882934570312, + -0.155275464057922 + ] + ], + "time": 0.8 + }, + { + "entered": 0, + "positions": [ + [ + -0.040099561214447, + 4.01172590255737, + -0.25628986954689 + ] + ], + "time": 0.849999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.00101948529481888, + 3.99249505996704, + -0.368639349937439 + ] + ], + "time": 0.899999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.0121026998385787, + 3.98507332801819, + -0.488707035779953 + ] + ], + "time": 0.949999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.0112001467496157, + 3.98384857177734, + -0.608413934707642 + ] + ], + "time": 0.999999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.00514321448281407, + 3.98109436035156, + -0.727505028247833 + ] + ], + "time": 1.05 + }, + { + "entered": 0, + "positions": [ + [ + 0.000436207425082102, + 3.98036313056946, + -0.844269812107086 + ] + ], + "time": 1.1 + }, + { + "entered": 0, + "positions": [ + [ + 0.00181019771844149, + 3.98042845726013, + -0.95690792798996 + ] + ], + "time": 1.15 + }, + { + "entered": 0, + "positions": [ + [ + 0.00574991758912802, + 3.98124694824219, + -1.06995964050293 + ] + ], + "time": 1.2 + }, + { + "entered": 0, + "positions": [ + [ + 0.00480739353224635, + 3.98104190826416, + -1.18453896045685 + ] + ], + "time": 1.25 + }, + { + "entered": 0, + "positions": [ + [ + -0.000216914457269013, + 3.9803524017334, + -1.29572010040283 + ] + ], + "time": 1.3 + }, + { + "entered": 0, + "positions": [ + [ + -0.00418521044775844, + 3.98081994056702, + -1.40071725845337 + ] + ], + "time": 1.35 + }, + { + "entered": 0, + "positions": [ + [ + -0.00431567430496216, + 3.98131966590881, + -1.50080692768097 + ] + ], + "time": 1.4 + }, + { + "entered": 0, + "positions": [ + [ + 0.000169265666045249, + 3.98256349563599, + -1.59583115577698 + ] + ], + "time": 1.45 + }, + { + "entered": 0, + "positions": [ + [ + 0.0166528448462486, + 3.98824000358582, + -1.67953538894653 + ] + ], + "time": 1.5 + }, + { + "entered": 0, + "positions": [ + [ + 0.0483081340789795, + 3.98887300491333, + -1.749427318573 + ] + ], + "time": 1.55 + }, + { + "entered": 0, + "positions": [ + [ + 0.0910147503018379, + 3.9849956035614, + -1.80899894237518 + ] + ], + "time": 1.6 + }, + { + "entered": 0, + "positions": [ + [ + 0.142940059304237, + 3.98314619064331, + -1.86361801624298 + ] + ], + "time": 1.65 + }, + { + "entered": 0, + "positions": [ + [ + 0.200956732034683, + 3.9843111038208, + -1.9150505065918 + ] + ], + "time": 1.7 + }, + { + "entered": 0, + "positions": [ + [ + 0.262667715549469, + 3.9868323802948, + -1.956294298172 + ] + ], + "time": 1.75 + }, + { + "entered": 0, + "positions": [ + [ + 0.32683664560318, + 3.98606443405151, + -1.98366415500641 + ] + ], + "time": 1.8 + }, + { + "entered": 0, + "positions": [ + [ + 0.393389523029327, + 3.98406481742859, + -2.00017929077148 + ] + ], + "time": 1.85 + }, + { + "entered": 0, + "positions": [ + [ + 0.462497055530548, + 3.98357081413269, + -2.00928068161011 + ] + ], + "time": 1.9 + }, + { + "entered": 0, + "positions": [ + [ + 0.531921803951263, + 3.98408961296082, + -2.01151704788208 + ] + ], + "time": 1.95 + }, + { + "entered": 0, + "positions": [ + [ + 0.601448893547058, + 3.98185443878174, + -2.00744724273682 + ] + ], + "time": 2.0 + }, + { + "entered": 0, + "positions": [ + [ + 0.677043557167053, + 3.98045802116394, + -1.99992406368256 + ] + ], + "time": 2.05 + }, + { + "entered": 0, + "positions": [ + [ + 0.759476482868195, + 3.9814019203186, + -1.9943265914917 + ] + ], + "time": 2.1 + }, + { + "entered": 0, + "positions": [ + [ + 0.842585325241089, + 3.981449842453, + -1.99420142173767 + ] + ], + "time": 2.15 + }, + { + "entered": 0, + "positions": [ + [ + 0.924271464347839, + 3.98040318489075, + -1.99871790409088 + ] + ], + "time": 2.19999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.00276923179626, + 3.98073267936707, + -2.00385713577271 + ] + ], + "time": 2.24999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.07788372039795, + 3.98113608360291, + -2.0054407119751 + ] + ], + "time": 2.29999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.1533979177475, + 3.98062133789062, + -2.00281810760498 + ] + ], + "time": 2.34999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.23138689994812, + 3.98041820526123, + -1.99840724468231 + ] + ], + "time": 2.39999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.31109547615051, + 3.98077511787415, + -1.99597501754761 + ] + ], + "time": 2.44999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.39071047306061, + 3.98054695129395, + -1.99715971946716 + ] + ], + "time": 2.49999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.46909666061401, + 3.9804527759552, + -2.00050497055054 + ] + ], + "time": 2.54999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.54573881626129, + 3.98005414009094, + -2.00344395637512 + ] + ], + "time": 2.59999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.62288916110992, + 3.96869540214539, + -2.00572466850281 + ] + ], + "time": 2.64999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.70021593570709, + 3.93471956253052, + -2.00757813453674 + ] + ], + "time": 2.69999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.77754926681519, + 3.87625741958618, + -2.00942349433899 + ] + ], + "time": 2.74999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.85488176345825, + 3.79327082633972, + -2.01126885414124 + ] + ], + "time": 2.79999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.93221342563629, + 3.68576049804688, + -2.01311421394348 + ] + ], + "time": 2.84999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.00954413414001, + 3.55372667312622, + -2.01495957374573 + ] + ], + "time": 2.89999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 2.02821040153503, + 3.44015312194824, + -2.01011085510254 + ] + ], + "time": 2.94999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.98821330070496, + 3.34503889083862, + -1.99856865406036 + ] + ], + "time": 2.99999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.98080611228943, + 3.23375654220581, + -1.9949803352356 + ] + ], + "time": 3.04999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.9813357591629, + 3.09998464584351, + -1.9933363199234 + ] + ], + "time": 3.09999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.98199164867401, + 2.94172334671021, + -1.9917403459549 + ] + ], + "time": 3.14999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 1.98277473449707, + 2.7589750289917, + -1.99020493030548 + ] + ], + "time": 3.19999999999999 + } + ] + }, + { + "contacts": { + "directional_boost": true, + "gentle": true, + "goal_hole": true, + "steep": true, + "straight": true, + "turn_90": true + }, + "final": [ + 4.98323774337769, + 2.67091464996338, + 0.00788321904838085 + ], + "issue": "", + "lesson": 4, + "speed": 3.56048250198364, + "success": true, + "time": 3.04166666666666, + "trace": [ + { + "entered": 0, + "positions": [ + [ + -2.98333501815796, + 5.80978155136108, + 0.0 + ] + ], + "time": 0.05 + }, + { + "entered": 0, + "positions": [ + [ + -2.74133324623108, + 5.80000972747803, + 0.0000000000188307164999957 + ] + ], + "time": 0.1 + }, + { + "entered": 0, + "positions": [ + [ + -2.51031112670898, + 5.80000972747803, + 0.0000000000963276541865454 + ] + ], + "time": 0.15 + }, + { + "entered": 0, + "positions": [ + [ + -2.28256392478943, + 5.78570365905762, + 0.00000000020867450822859 + ] + ], + "time": 0.2 + }, + { + "entered": 0, + "positions": [ + [ + -2.05482149124146, + 5.7468729019165, + 0.000000000321019044680071 + ] + ], + "time": 0.25 + }, + { + "entered": 0, + "positions": [ + [ + -1.82708370685577, + 5.68351793289185, + 0.000000000433361180274261 + ] + ], + "time": 0.3 + }, + { + "entered": 0, + "positions": [ + [ + -1.59935116767883, + 5.59564018249512, + 0.000000000545700817866646 + ] + ], + "time": 0.35 + }, + { + "entered": 0, + "positions": [ + [ + -1.37162375450134, + 5.48323917388916, + 0.000000000658037957457225 + ] + ], + "time": 0.4 + }, + { + "entered": 0, + "positions": [ + [ + -1.20009112358093, + 5.48437595367432, + 0.000991251901723444 + ] + ], + "time": 0.450000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -1.0301308631897, + 5.48039436340332, + 0.00109306210651994 + ] + ], + "time": 0.500000000000001 + }, + { + "entered": 0, + "positions": [ + [ + -0.860832214355469, + 5.48037815093994, + 0.00075185636524111 + ] + ], + "time": 0.55 + }, + { + "entered": 0, + "positions": [ + [ + -0.691807627677917, + 5.48035955429077, + -0.000370302965166047 + ] + ], + "time": 0.6 + }, + { + "entered": 0, + "positions": [ + [ + -0.522997260093689, + 5.48081398010254, + -0.00136575696524233 + ] + ], + "time": 0.65 + }, + { + "entered": 0, + "positions": [ + [ + -0.355420500040054, + 5.47571325302124, + -0.0017083587590605 + ] + ], + "time": 0.7 + }, + { + "entered": 0, + "positions": [ + [ + -0.187846302986145, + 5.44608783721924, + -0.00205095508135855 + ] + ], + "time": 0.75 + }, + { + "entered": 0, + "positions": [ + [ + -0.0202747266739607, + 5.39193820953369, + -0.00239354628138244 + ] + ], + "time": 0.8 + }, + { + "entered": 0, + "positions": [ + [ + 0.147294089198112, + 5.3132643699646, + -0.00273613166064024 + ] + ], + "time": 0.849999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.314859986305237, + 5.21006727218628, + -0.00307871121913195 + ] + ], + "time": 0.899999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.482422858476639, + 5.08234691619873, + -0.00342128425836563 + ] + ], + "time": 0.949999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.648952007293701, + 4.98743677139282, + -0.00332381343469024 + ] + ], + "time": 0.999999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 0.813417434692383, + 4.98266649246216, + -0.00234627537429333 + ] + ], + "time": 1.05 + }, + { + "entered": 0, + "positions": [ + [ + 0.978132009506226, + 4.98037052154541, + -0.000595157849602401 + ] + ], + "time": 1.1 + }, + { + "entered": 0, + "positions": [ + [ + 1.14293038845062, + 4.98040151596069, + 0.00124030490405858 + ] + ], + "time": 1.15 + }, + { + "entered": 0, + "positions": [ + [ + 1.30742537975311, + 4.98044395446777, + 0.00213346350938082 + ] + ], + "time": 1.2 + }, + { + "entered": 0, + "positions": [ + [ + 1.47152376174927, + 4.98039722442627, + 0.00115578481927514 + ] + ], + "time": 1.25 + }, + { + "entered": 0, + "positions": [ + [ + 1.63485431671143, + 4.97748184204102, + -0.000620587554294616 + ] + ], + "time": 1.3 + }, + { + "entered": 0, + "positions": [ + [ + 1.79818248748779, + 4.95004177093506, + -0.00239693326875567 + ] + ], + "time": 1.35 + }, + { + "entered": 0, + "positions": [ + [ + 1.96150815486908, + 4.8980770111084, + -0.0041732513345778 + ] + ], + "time": 1.4 + }, + { + "entered": 0, + "positions": [ + [ + 2.124831199646, + 4.82158851623535, + -0.0059495409950614 + ] + ], + "time": 1.45 + }, + { + "entered": 0, + "positions": [ + [ + 2.28815150260925, + 4.72057580947876, + -0.00772580038756132 + ] + ], + "time": 1.5 + }, + { + "entered": 0, + "positions": [ + [ + 2.45146894454956, + 4.5950403213501, + -0.00950202904641628 + ] + ], + "time": 1.55 + }, + { + "entered": 0, + "positions": [ + [ + 2.61478304862976, + 4.44498252868652, + -0.011278223246336 + ] + ], + "time": 1.6 + }, + { + "entered": 0, + "positions": [ + [ + 2.77809381484985, + 4.2704029083252, + -0.0130543792620301 + ] + ], + "time": 1.65 + }, + { + "entered": 0, + "positions": [ + [ + 2.94140100479126, + 4.07130241394043, + -0.014830494299531 + ] + ], + "time": 1.7 + }, + { + "entered": 0, + "positions": [ + [ + 3.10406541824341, + 4.00893402099609, + -0.00681743072345853 + ] + ], + "time": 1.75 + }, + { + "entered": 0, + "positions": [ + [ + 3.26640772819519, + 4.00266742706299, + 0.00609004637226462 + ] + ], + "time": 1.8 + }, + { + "entered": 0, + "positions": [ + [ + 3.42490005493164, + 3.98424768447876, + 0.0117378439754248 + ] + ], + "time": 1.85 + }, + { + "entered": 0, + "positions": [ + [ + 3.57916688919067, + 3.98056483268738, + 0.00112151284702122 + ] + ], + "time": 1.9 + }, + { + "entered": 0, + "positions": [ + [ + 3.73453617095947, + 3.98231983184814, + -0.00843166932463646 + ] + ], + "time": 1.95 + }, + { + "entered": 0, + "positions": [ + [ + 3.88508152961731, + 3.98322725296021, + -0.0101660415530205 + ] + ], + "time": 2.0 + }, + { + "entered": 0, + "positions": [ + [ + 4.03656768798828, + 3.9809730052948, + -0.0042744493111968 + ] + ], + "time": 2.05 + }, + { + "entered": 0, + "positions": [ + [ + 4.19164609909058, + 3.98092889785767, + 0.00437467638403177 + ] + ], + "time": 2.1 + }, + { + "entered": 0, + "positions": [ + [ + 4.34377145767212, + 3.9822838306427, + 0.00835659168660641 + ] + ], + "time": 2.15 + }, + { + "entered": 0, + "positions": [ + [ + 4.49540948867798, + 3.98236465454102, + 0.00577667681500316 + ] + ], + "time": 2.19999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.64709615707397, + 3.97271013259888, + 0.000198366702534258 + ] + ], + "time": 2.24999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.79878091812134, + 3.93853092193604, + -0.00537986494600773 + ] + ], + "time": 2.29999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.95046377182007, + 3.87982726097107, + -0.0109580159187317 + ] + ], + "time": 2.34999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.10214376449585, + 3.79659986495972, + -0.0165360830724239 + ] + ], + "time": 2.39999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.14601993560791, + 3.76739263534546, + -0.00773259811103344 + ] + ], + "time": 2.44999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.13599491119385, + 3.75293254852295, + 0.00826160795986652 + ] + ], + "time": 2.49999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.12596988677979, + 3.71394777297974, + 0.0242557674646378 + ] + ], + "time": 2.54999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.11594486236572, + 3.65043783187866, + 0.0402498468756676 + ] + ], + "time": 2.59999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.08447885513306, + 3.57936477661133, + 0.0464651212096214 + ] + ], + "time": 2.64999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.04222822189331, + 3.49317383766174, + 0.0453909002244473 + ] + ], + "time": 2.69999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.99159812927246, + 3.39783382415771, + 0.0258138682693243 + ] + ], + "time": 2.74999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.9883828163147, + 3.3078920841217, + -0.0161348897963762 + ] + ], + "time": 2.79999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.0141453742981, + 3.21191120147705, + -0.0139413550496101 + ] + ], + "time": 2.84999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.01885366439819, + 3.09915709495544, + 0.006140380166471 + ] + ], + "time": 2.89999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 5.00636100769043, + 2.96695446968079, + 0.018759535625577 + ] + ], + "time": 2.94999999999999 + }, + { + "entered": 0, + "positions": [ + [ + 4.99050951004028, + 2.81403160095215, + 0.0173882208764553 + ] + ], + "time": 2.99999999999999 + } + ] + }, + { + "contacts": { + "directional_boost": true, + "gentle": true, + "goal_hole": true, + "steep": true, + "straight": true, + "turn_90": true + }, + "final": [ + 4.98171234130859, + 2.16241073608398, + 0.00116024166345596 + ], + "issue": "", + "lesson": 5, + "speed": 3.63211607933044, + "success": true, + "time": 5.52500000000006, + "trace": [ + { + "entered": 0, + "positions": [ + [ + -4.06666707992554, + 5.31591272354126, + 0.0 + ] + ], + "time": 0.0333333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -3.8200855255127, + 5.30000972747803, + 0.00000000000679135480491366 + ] + ], + "time": 0.0833333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -3.58644604682922, + 5.30000972747803, + 0.0000000000617071740927067 + ] + ], + "time": 0.133333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -3.35847902297974, + 5.29319715499878, + 0.000000000171225811307352 + ] + ], + "time": 0.183333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -3.13073515892029, + 5.2625412940979, + 0.000000000283571138792738 + ] + ], + "time": 0.233333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -2.90299582481384, + 5.20736122131348, + 0.00000000039591407929862 + ] + ], + "time": 0.283333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -2.67526149749756, + 5.12765741348267, + 0.000000000508254549558274 + ] + ], + "time": 0.333333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -2.44753217697144, + 5.02343082427979, + 0.000000000620592521816121 + ] + ], + "time": 0.383333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -2.25436329841614, + 4.98675394058228, + 0.000659025390632451 + ] + ], + "time": 0.433333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -2.07997298240662, + 4.98054504394531, + 0.00103724526707083 + ] + ], + "time": 0.483333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -1.90765941143036, + 4.98035573959351, + -0.000111941175418906 + ] + ], + "time": 0.533333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -1.73564553260803, + 4.98037910461426, + -0.000782379996962845 + ] + ], + "time": 0.583333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -1.56386852264404, + 4.98038148880005, + -0.000823369016870856 + ] + ], + "time": 0.633333333333334 + }, + { + "entered": 0, + "positions": [ + [ + -1.39297199249268, + 4.98077726364136, + -0.000636192737147212 + ] + ], + "time": 0.683333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -1.22295796871185, + 4.98047924041748, + 0.000423264456912875 + ] + ], + "time": 0.733333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -1.05330002307892, + 4.98039722442627, + 0.00115824036765844 + ] + ], + "time": 0.783333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.88390839099884, + 4.98038625717163, + 0.000924168736673892 + ] + ], + "time": 0.833333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.714755117893219, + 4.98034381866455, + -0.000045888707973063 + ] + ], + "time": 0.883333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.545726478099823, + 4.98038673400879, + -0.000943088962230831 + ] + ], + "time": 0.933333333333332 + }, + { + "entered": 0, + "positions": [ + [ + -0.380385965108871, + 4.98379182815552, + -0.00352848833426833 + ] + ], + "time": 0.983333333333332 + }, + { + "entered": 0, + "positions": [ + [ + -0.248496413230896, + 5.00459957122803, + -0.0449339225888252 + ] + ], + "time": 1.03333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.1465834826231, + 5.01203203201294, + -0.117972329258919 + ] + ], + "time": 1.08333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.0688187927007675, + 5.00481986999512, + -0.20929804444313 + ] + ], + "time": 1.13333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.0182988438755274, + 4.98877573013306, + -0.315268248319626 + ] + ], + "time": 1.18333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.00818254984915257, + 4.98524045944214, + -0.431521594524384 + ] + ], + "time": 1.23333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.0176488757133484, + 4.99151992797852, + -0.548693239688873 + ] + ], + "time": 1.28333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.0149640673771501, + 4.98725891113281, + -0.664791762828827 + ] + ], + "time": 1.33333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.00357738556340337, + 4.98078536987305, + -0.780017018318176 + ] + ], + "time": 1.38333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.00331752561032772, + 4.98072957992554, + -0.891143381595612 + ] + ], + "time": 1.43333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.00131964054889977, + 4.98042249679565, + -0.996789813041687 + ] + ], + "time": 1.48333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.0032263370230794, + 4.98060369491577, + -1.10316634178162 + ] + ], + "time": 1.53333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.00417632330209017, + 4.98081350326538, + -1.21267688274384 + ] + ], + "time": 1.58333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.0014499839162454, + 4.98041105270386, + -1.32044351100922 + ] + ], + "time": 1.63333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.00195113476365805, + 4.98043489456177, + -1.42470002174377 + ] + ], + "time": 1.68333333333333 + }, + { + "entered": 0, + "positions": [ + [ + -0.0039754556491971, + 4.98087215423584, + -1.52521800994873 + ] + ], + "time": 1.73333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.00154223677236587, + 4.98460245132446, + -1.61727023124695 + ] + ], + "time": 1.78333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.0220174267888069, + 4.98959350585938, + -1.69591152667999 + ] + ], + "time": 1.83333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.056522473692894, + 4.98774099349976, + -1.76196241378784 + ] + ], + "time": 1.88333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.101743616163731, + 4.98374366760254, + -1.82009732723236 + ] + ], + "time": 1.93333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.154877707362175, + 4.9831428527832, + -1.87530136108398 + ] + ], + "time": 1.98333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.212897777557373, + 4.98537445068359, + -1.92498373985291 + ] + ], + "time": 2.03333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.274183034896851, + 4.98723316192627, + -1.96245133876801 + ] + ], + "time": 2.08333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.338022261857986, + 4.9857497215271, + -1.98700547218323 + ] + ], + "time": 2.13333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.404790043830872, + 4.98361444473267, + -2.00152444839478 + ] + ], + "time": 2.18333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.474644541740417, + 4.98318386077881, + -2.00930738449097 + ] + ], + "time": 2.23333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.544882655143738, + 4.98049545288086, + -2.01171946525574 + ] + ], + "time": 2.28333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.616535842418671, + 4.95889568328857, + -2.0122652053833 + ] + ], + "time": 2.33333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.692603170871735, + 4.92035341262817, + -2.00951957702637 + ] + ], + "time": 2.38333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.777327597141266, + 4.8772439956665, + -2.00374126434326 + ] + ], + "time": 2.43333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.870417952537537, + 4.83072566986084, + -1.99749970436096 + ] + ], + "time": 2.48333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 0.970909953117371, + 4.78095436096191, + -1.99212980270386 + ] + ], + "time": 2.53333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.07870435714722, + 4.72766590118408, + -1.98889243602753 + ] + ], + "time": 2.58333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.19324481487274, + 4.67040300369263, + -1.98878741264343 + ] + ], + "time": 2.63333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.31423497200012, + 4.60953330993652, + -1.99177813529968 + ] + ], + "time": 2.68333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.44119763374329, + 4.54531478881836, + -1.99730062484741 + ] + ], + "time": 2.73333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.57387816905975, + 4.49108123779297, + -2.00211334228516 + ] + ], + "time": 2.78333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.70766472816467, + 4.48267602920532, + -1.9996372461319 + ] + ], + "time": 2.83333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.84511411190033, + 4.48037528991699, + -1.99930286407471 + ] + ], + "time": 2.88333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 1.98235702514648, + 4.48035860061646, + -1.99965441226959 + ] + ], + "time": 2.93333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 2.1191520690918, + 4.4804859161377, + -2.00003480911255 + ] + ], + "time": 2.98333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 2.25579977035522, + 4.48035001754761, + -2.00017881393433 + ] + ], + "time": 3.03333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 2.39221787452698, + 4.48035430908203, + -2.00026154518127 + ] + ], + "time": 3.08333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 2.52803182601929, + 4.48091268539429, + -2.00055241584778 + ] + ], + "time": 3.13333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 2.66311573982239, + 4.46512269973755, + -2.00071835517883 + ] + ], + "time": 3.18333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 2.79819798469543, + 4.42480802536011, + -2.00088429450989 + ] + ], + "time": 3.23333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 2.93327856063843, + 4.35996866226196, + -2.00105023384094 + ] + ], + "time": 3.28333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.06835699081421, + 4.27060556411743, + -2.001216173172 + ] + ], + "time": 3.33333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.20343351364136, + 4.15671873092651, + -2.00138211250305 + ] + ], + "time": 3.38333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.33850765228271, + 4.01830911636353, + -2.00154805183411 + ] + ], + "time": 3.43333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.47357940673828, + 3.8553774356842, + -2.00171399116516 + ] + ], + "time": 3.48333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.60864853858948, + 3.66792392730713, + -2.00187993049622 + ] + ], + "time": 3.53333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.74355363845825, + 3.49606919288635, + -2.00190019607544 + ] + ], + "time": 3.58333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 3.87765192985535, + 3.50028729438782, + -2.00119209289551 + ] + ], + "time": 3.63333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.01165151596069, + 3.4803671836853, + -2.00052809715271 + ] + ], + "time": 3.68333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.14464712142944, + 3.48056650161743, + -1.99893641471863 + ] + ], + "time": 3.73333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.27731084823608, + 3.48042798042297, + -1.99820423126221 + ] + ], + "time": 3.78333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.40971565246582, + 3.48058176040649, + -1.99858915805817 + ] + ], + "time": 3.83333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.5416579246521, + 3.48062944412231, + -1.99990999698639 + ] + ], + "time": 3.88333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.66457509994507, + 3.4911835193634, + -1.99054801464081 + ] + ], + "time": 3.93333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.76154947280884, + 3.50142693519592, + -1.94891941547394 + ] + ], + "time": 3.98333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.842209815979, + 3.49432420730591, + -1.88990449905396 + ] + ], + "time": 4.03333333333332 + }, + { + "entered": 0, + "positions": [ + [ + 4.90625476837158, + 3.48512053489685, + -1.81285977363586 + ] + ], + "time": 4.08333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 4.95992851257324, + 3.48453712463379, + -1.72482538223267 + ] + ], + "time": 4.13333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 4.99998903274536, + 3.49020338058472, + -1.63110971450806 + ] + ], + "time": 4.18333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 5.01741600036621, + 3.49407839775085, + -1.53572833538055 + ] + ], + "time": 4.23333333333333 + }, + { + "entered": 0, + "positions": [ + [ + 5.01528024673462, + 3.48762583732605, + -1.44179391860962 + ] + ], + "time": 4.28333333333334 + }, + { + "entered": 0, + "positions": [ + [ + 5.00322675704956, + 3.48060417175293, + -1.34726941585541 + ] + ], + "time": 4.33333333333334 + }, + { + "entered": 0, + "positions": [ + [ + 4.99445152282715, + 3.48123908042908, + -1.25727224349976 + ] + ], + "time": 4.38333333333334 + }, + { + "entered": 0, + "positions": [ + [ + 4.99243974685669, + 3.48193001747131, + -1.17449402809143 + ] + ], + "time": 4.43333333333334 + }, + { + "entered": 0, + "positions": [ + [ + 4.99620294570923, + 3.48072981834412, + -1.09142374992371 + ] + ], + "time": 4.48333333333335 + }, + { + "entered": 0, + "positions": [ + [ + 5.00245380401611, + 3.4804892539978, + -1.00251364707947 + ] + ], + "time": 4.53333333333335 + }, + { + "entered": 0, + "positions": [ + [ + 5.00579357147217, + 3.48126244544983, + -0.909989297389984 + ] + ], + "time": 4.58333333333335 + }, + { + "entered": 0, + "positions": [ + [ + 5.00417852401733, + 3.48081374168396, + -0.817344546318054 + ] + ], + "time": 4.63333333333335 + }, + { + "entered": 0, + "positions": [ + [ + 4.99953746795654, + 3.48036408424377, + -0.727450847625732 + ] + ], + "time": 4.68333333333336 + }, + { + "entered": 0, + "positions": [ + [ + 4.99571943283081, + 3.48086476325989, + -0.640783965587616 + ] + ], + "time": 4.73333333333336 + }, + { + "entered": 0, + "positions": [ + [ + 4.99568891525269, + 3.48094272613525, + -0.557282090187073 + ] + ], + "time": 4.78333333333336 + }, + { + "entered": 0, + "positions": [ + [ + 4.99915838241577, + 3.48000001907349, + -0.472645998001099 + ] + ], + "time": 4.83333333333336 + }, + { + "entered": 0, + "positions": [ + [ + 5.00326871871948, + 3.47267818450928, + -0.385050863027573 + ] + ], + "time": 4.88333333333337 + }, + { + "entered": 0, + "positions": [ + [ + 5.00739431381226, + 3.44140958786011, + -0.297464430332184 + ] + ], + "time": 4.93333333333337 + }, + { + "entered": 0, + "positions": [ + [ + 5.01151990890503, + 3.38561654090881, + -0.209878787398338 + ] + ], + "time": 4.98333333333337 + }, + { + "entered": 0, + "positions": [ + [ + 5.0156455039978, + 3.3052990436554, + -0.122294031083584 + ] + ], + "time": 5.03333333333337 + }, + { + "entered": 0, + "positions": [ + [ + 5.01977109909058, + 3.20045781135559, + -0.0347102954983711 + ] + ], + "time": 5.08333333333338 + }, + { + "entered": 0, + "positions": [ + [ + 5.02389669418335, + 3.07109308242798, + 0.0528722889721394 + ] + ], + "time": 5.13333333333338 + }, + { + "entered": 0, + "positions": [ + [ + 5.00039672851562, + 2.99056124687195, + 0.0414119064807892 + ] + ], + "time": 5.18333333333338 + }, + { + "entered": 0, + "positions": [ + [ + 4.97350454330444, + 2.90151953697205, + 0.00936459563672543 + ] + ], + "time": 5.23333333333338 + }, + { + "entered": 0, + "positions": [ + [ + 4.99548625946045, + 2.81435990333557, + -0.0193276833742857 + ] + ], + "time": 5.28333333333339 + }, + { + "entered": 0, + "positions": [ + [ + 5.01799201965332, + 2.71559286117554, + -0.00829521007835865 + ] + ], + "time": 5.33333333333339 + }, + { + "entered": 0, + "positions": [ + [ + 5.01576328277588, + 2.59964990615845, + 0.0120755042880774 + ] + ], + "time": 5.38333333333339 + }, + { + "entered": 0, + "positions": [ + [ + 4.99979162216187, + 2.4642333984375, + 0.0198047310113907 + ] + ], + "time": 5.43333333333339 + }, + { + "entered": 0, + "positions": [ + [ + 4.9852614402771, + 2.30807113647461, + 0.0133070154115558 + ] + ], + "time": 5.4833333333334 + } + ] + } +] \ No newline at end of file diff --git a/playtest/baseline/README.md b/playtest/baseline/README.md index 5ffcbed..d5463cc 100644 --- a/playtest/baseline/README.md +++ b/playtest/baseline/README.md @@ -33,7 +33,7 @@ - Y 形在同一侧设置两个相邻、等高的入口,中心相距 1 m,各自连接一个单格直槽;公共出口与其中一路对齐,另一路以连续 S 形曲线并入,不要求对称。单件场景同时展示两个输入直槽和一个输出直槽,验证真实接缝。 - 编辑器按 Y 形四格占用进行选择、替换、旋转及重叠检查;数量配额计为一块。只有上方槽面参与路线连接。 -目标洞口现由 Blender 制作并导出为 `goal_hole.glb`:入口与喉部净半径均为 0.32 m,深度 0.55 m,壁厚 0.04 m。碰撞使用同一空心网格,避免只缩小视觉开口。入洞检测记录球心向下跨过洞底平面的交点,再按洞口净空校验水平位置。 +目标洞口现由 Blender 制作并导出为 `goal_hole.glb`:入口与喉部净半径均为 0.32 m,深度 0.55 m,壁厚 0.04 m。碰撞使用同一空心网格,避免只缩小视觉开口。这款直筒球洞的喉口位于上沿,球心向下跨入上口并满足孔径净空时即算入洞。 独立半径对比实验已完成选择并清理:删除其 Blender 模型、GLB、Godot 场景、脚本和报告,以及旧镜像下层导轨夹具;当前保留连续轨道、单件试跑、自由搭建和双球汇流四个试玩预设。底孔测试预设及独立底孔场景均已删除。 @@ -42,35 +42,19 @@ 铁球为 SphereShape3D 刚体,半径读取生成的资产目录;均匀实心球惯量按质量和半径生成。所有轨道为静态三角网格碰撞体,铁球与轨道、铁球与铁球碰撞均开启。固定物理频率为 120 Hz,启用连续碰撞检测。 -当前 `physics.json` 中的名义铁密度假设为 7870 kg/m³,半径 0.3 m 对应约 890.08 kg;质量值保存在物理预设中。木材接触试验系数为:静摩擦 0.42、动摩擦 0.32、滚动阻力 0.025、回弹 0.08;空气密度 1.225 kg/m³,铁球阻力系数为 0.47,正常计算风力和静止空气阻力。质量与接触值沿用首轮验证参数,不是实验测得的材质常数。 +当前 `physics.json` 中的名义铁密度假设为 7870 kg/m³,半径 0.3 m 对应约 890.08 kg;质量值保存在物理预设中。木槽滚动阻力为 0.025,恢复系数为 0.08。与工坊共用固体滚动阻力模型,空气阻力已停用。 Godot 原生 PhysicsMaterial 只暴露一个摩擦参数;本轮根据接触点滑速切换静/动摩擦系数,再由原生求解器计算接触冲量。这是用于本轮试验的近似,不等价于完整的逐接触双系数材质求解。滚动阻力另施加受限力矩,空气作用使用相对空气速度计算,不额外修改轨道速度。多材质同时接触和铁球之间的独立材质配对尚未完整标定;目前原生回弹合成会使两个铁球各 0.08 的回弹得到约 0.16 的相对恢复表现。[Godot PhysicsMaterial](https://docs.godotengine.org/en/4.7/classes/class_physicsmaterial.html) 接触数据和力矩在刚体积分回调中读取、施加,轨迹记录只用于显示与测量。[Godot PhysicsDirectBodyState3D](https://docs.godotengine.org/en/4.7/classes/class_physicsdirectbodystate3d.html) -## 验证范围 +## 验证与历史记录 -本次实心底座修改已通过 42 项基础物理检查;另有两套模型的 151 项碰撞/场景检查和 16 项源文件检查,见 [本次验证索引](../README.md)。以下交互流程与双球汇流的完整历史结果未在本轮重复运行。 +早期 `baseline-test` 及其物理、交互流程和双球汇流三组自动检查已删除,不再提供这些过时断言的运行入口,也不再保留 `playtest/baseline/checks/`。早期试玩场景仍可通过 `./scripts/playtest.zsh` 和 `./scripts/run.zsh merge` 手动检查。 -运行 `./scripts/run.zsh baseline-test` 会刷新 Godot 导入并运行物理、交互流程和双球汇流三组测试。报告记录实际参数、轨迹和结果;退出码非零表示测试失败。 +[基础物理报告](../artifacts/baseline/physics_report.json)、[交互报告](../artifacts/baseline/playtest_report.json) 和 [双球汇流报告](../artifacts/baseline/merge_report.json) 仅作为历史产物保留,不代表当前场景或共享物理脚本已经通过同一组检查。历史默认路线约 2.90 秒入洞;窗口关闭或不同操作路径不会被这些数值覆盖,需要按实际试玩继续验证。 -物理测试移除底孔通过用例后共 42 项: - -- 真空自由落体与球在半圆槽中的静止接触。 -- 30° 理想平面上实心球滚动,加速度与解析值比较。 -- 水平滚动时关闭/开启滚动阻力的速度差异。 -- 两个铁球副本迎面碰撞,检查速度方向与总动量。 -- 六种滑槽、四个朝向的顶部槽面通行;Y 形分别测试两个岔口,共 28 项路径测试。 -- Y 形连接两个相邻直槽及一个出口直槽后,分别测试两个入口和四个朝向,共 8 项完整连接测试。连接测试初速度为 1.6 m/s,其余既有路径测试继续使用原有的 1.2 m/s 或坡道静止释放条件。 -- 无接触条件下,质量相差十倍时的风响应比较;该解析基准直接读取当前铁球的非零阻力配置,仅改变质量,不再单独覆盖阻力系数。 - -交互流程测试共 30 项:默认重力路线穿过真实洞口、释放、暂停、重试、六种资产选择与四次旋转复位、相邻放置、运行后编辑锁定、删除、拒绝悬空放置、场景配额及鼠标射线选取可见方块;另覆盖 Y 形的合法四格尺寸、超界标记区分、重叠拒绝、四格选择、中心旋转和替换后释放多余格子。 - -较长的完整连接测试采用 1.6 m/s 初速度,场景中仍可用滑块调整;试验只设置初始速度,未添加持续推力、速度锁定或关闭摩擦。低初速度是否足够到达后续路线,继续由实际行程和摩擦耗能决定。 - -测试调用真实 Godot 场景和物理引擎。界面按钮通过信号触发、选格通过引擎输入事件路径验证;原生渲染已截图检查。没有声称通过操作系统鼠标自动化完成所有按钮测试。 - -当前基础物理结果见 [物理报告](../artifacts/baseline/physics_report.json),历史交互结果见 [交互报告](../artifacts/baseline/playtest_report.json)。历史默认路线约 2.90 秒入洞;当前 30° 平面验证仍与约 3.5036 m/s² 的解析值比较。窗口关闭或不同操作路径不会被这些数值覆盖,需要按实际试玩继续验证。 +当前自动检查按改动范围使用 `playtest/checks/` 中的专项,入口见 [脚本说明](../../scripts/README.md)。 ## 双铁球汇流场景 @@ -82,7 +66,7 @@ Godot 原生 PhysicsMaterial 只暴露一个摩擦参数;本轮根据接触点 入洞按球的唯一编号计数,每球只记录一次。已入洞球隐藏并退出碰撞;部分入洞不成功,任何一球丢失也不能通过减少剩余球数完成通关。重试会重建两球并清空入洞、轨迹及暂停状态。预设演示场景不开放方块编辑,可切回自由搭建场景调整其他布局。 -双球专项验证共 16 项,覆盖同高分支、同时释放、球间碰撞开关、两球暂停、分别通过不同入口及共同出口、两球进入同一洞口、部分入洞、事件去重、退出模拟、重试复现、丢球不判胜及切回单球场景。实际完成时间约 5.4 秒,具体轨迹和逐球入洞事件见 [双球汇流报告](../artifacts/baseline/merge_report.json)。 +历史双球专项曾有 16 项,覆盖同高分支、同时释放、球间碰撞开关、两球暂停、分别通过不同入口及共同出口、两球进入同一洞口、部分入洞、事件去重、退出模拟、重试复现、丢球不判胜及切回单球场景。当时实际完成时间约 5.4 秒,具体轨迹和逐球入洞事件见保留的 [双球汇流报告](../artifacts/baseline/merge_report.json);该专项现已删除,不再作为当前运行证明。 ## 后续需验证 diff --git a/playtest/baseline/checks/validate_merge.gd b/playtest/baseline/checks/validate_merge.gd deleted file mode 100644 index eec28fd..0000000 --- a/playtest/baseline/checks/validate_merge.gd +++ /dev/null @@ -1,84 +0,0 @@ -extends SceneTree -var results: Array=[] -var failures:=0 - -func _initialize() -> void:call_deferred("run") - -func check(name: String, ok: bool, detail: Dictionary={}) -> void: - results.append({"name":name,"passed":ok,"detail":detail.duplicate(true)}) - if not ok:failures+=1 - print(("PASS " if ok else "FAIL ")+name+" "+JSON.stringify(detail)) - -func run() -> void: - var app=load("res://playtest/baseline/scenes/main.tscn").instantiate() - root.add_child(app) - app.build_preset(3) - await physics_frame - check("two_iron_balls_ready",app.merge_balls.size()==2 and app.merge_balls.all(func(b):return b.freeze and is_equal_approx(b.radius,.3) and b.linear_velocity.is_zero_approx())) - check("separate_equal_height_branches",is_equal_approx(app.merge_balls[0].position.y,app.merge_balls[1].position.y) and is_equal_approx(absf(app.merge_balls[0].position.z-app.merge_balls[1].position.z),1.0)) - check("ball_collision_enabled",app.merge_balls.all(func(b):return (b.collision_layer&2)!=0 and (b.collision_mask&2)!=0)) - app.start_button.pressed.emit() - check("simultaneous_release",app.merge_release_ticks.size()==2 and app.merge_release_ticks[0]==app.merge_release_ticks[1] and app.merge_balls.all(func(b):return not b.freeze and b.linear_velocity.is_zero_approx())) - for i in range(35):await physics_frame - app.toggle_run() - var positions: Array=app.merge_balls.map(func(b):return b.position) - var time: float=app.elapsed - for i in range(20):await physics_frame - check("pause_stops_both_balls",app.paused and app.merge_balls[0].position.is_equal_approx(positions[0]) and app.merge_balls[1].position.is_equal_approx(positions[1]) and is_equal_approx(time,app.elapsed)) - app.toggle_run() - var partial_seen:=false - var premature_win:=false - for i in range(2400): - await physics_frame - if app.merge_entered.size()==1: - partial_seen=true - premature_win=premature_win or app.status.begins_with("成功") - if app.merge_entered.size()+app.merge_lost.size()==2:break - check("both_balls_enter_common_hole",app.merge_entered.size()==2 and app.merge_lost.is_empty(),{"status":app.status,"time":app.elapsed,"hole_events":app.merge_hole_events,"ball_collision_frames":app.merge_collision_frames,"a_position":[app.merge_balls[0].position.x,app.merge_balls[0].position.y,app.merge_balls[0].position.z],"b_position":[app.merge_balls[1].position.x,app.merge_balls[1].position.y,app.merge_balls[1].position.z]}) - check("one_ball_is_not_a_win",partial_seen and not premature_win) - check("two_unique_hole_events",app.merge_hole_events.size()==2 and app.merge_hole_events[0].ballId!=app.merge_hole_events[1].ballId) - var first_run: Array=app.merge_samples.duplicate(true) - var correct_inlets:=true - var common_outlet:=true - for i in range(2): - var key: String="a" if i==0 else "b" - var inlet_seen:=false - var outlet_seen:=false - for sample in first_run: - var p: Array=sample[key] - if p[0]>-.6 and p[0]<-.1 and absf(p[2]-i)<.2 and p[1]>1.8:inlet_seen=true - if p[0]>1.3 and p[0]<1.7 and absf(p[2]-1)<.2 and p[1]>1.5:outlet_seen=true - correct_inlets=correct_inlets and inlet_seen - common_outlet=common_outlet and outlet_seen - check("both_use_distinct_y_inlets",correct_inlets) - check("both_use_common_y_outlet",common_outlet) - for i in range(60):await physics_frame - check("hole_events_not_repeated",app.merge_hole_events.size()==2) - check("entered_balls_exit_simulation",app.merge_balls.all(func(b):return b.freeze and not b.visible and b.collision_mask==0 and b.collision_layer==0)) - app.reset_ball() - await physics_frame - check("retry_restores_two_balls",app.merge_balls.size()==2 and app.merge_balls.all(func(b):return b.freeze and b.visible and b.collision_mask==3) and app.merge_entered.is_empty() and app.merge_hole_events.is_empty() and app.elapsed==0) - app.toggle_run() - for i in range(2400): - await physics_frame - if app.merge_entered.size()+app.merge_lost.size()==2:break - check("repeat_run_completes",app.merge_entered.size()==2 and app.merge_lost.is_empty(),{"time":app.elapsed}) - app.reset_ball();app.toggle_run() - app.merge_balls[0].position=Vector3(0,-2,0) - for i in range(1800): - await physics_frame - if app.merge_entered.size()+app.merge_lost.size()==2:break - check("lost_ball_does_not_reduce_target",app.merge_lost.size()==1 and app.merge_entered.size()==1 and not app.status.begins_with("成功")) - app.build_preset(0) - await physics_frame - var dynamic_balls:=0 - for child in app.get_children(): - if child is RigidBody3D:dynamic_balls+=1 - check("switch_back_to_single_ball_scene",app.merge_balls.is_empty() and dynamic_balls==1 and is_instance_valid(app.ball)) - var path=ProjectSettings.globalize_path("res://playtest/artifacts/baseline/merge_report.json") - var file=FileAccess.open(path,FileAccess.WRITE) - file.store_string(JSON.stringify({"passed":results.size()-failures,"failed":failures,"results":results,"first_run_trace":first_run}," ")) - file.close() - app.queue_free() - await process_frame - quit(1 if failures else 0) diff --git a/playtest/baseline/checks/validate_merge.gd.uid b/playtest/baseline/checks/validate_merge.gd.uid deleted file mode 100644 index eff7147..0000000 --- a/playtest/baseline/checks/validate_merge.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://mumonx8gdgce diff --git a/playtest/baseline/checks/validate_physics.gd b/playtest/baseline/checks/validate_physics.gd deleted file mode 100644 index c81a547..0000000 --- a/playtest/baseline/checks/validate_physics.gd +++ /dev/null @@ -1,178 +0,0 @@ -extends SceneTree - -const Library = preload("res://playtest/baseline/scripts/asset_library.gd") -var lib = Library.new() -var arena: Node3D -var results: Array = [] -var failures := 0 - -func _initialize() -> void: - call_deferred("run") - -func vec(v: Vector3) -> Array: - return [snappedf(v.x,.000001),snappedf(v.y,.000001),snappedf(v.z,.000001)] - -func clear_arena() -> void: - if is_instance_valid(arena): - root.remove_child(arena) - arena.queue_free() - arena=Node3D.new() - root.add_child(arena) - await physics_frame - await physics_frame - -func record(name: String, passed: bool, detail: Dictionary) -> void: - results.append({"name":name,"passed":passed,"detail":detail}) - if not passed:failures+=1 - print(("PASS " if passed else "FAIL ")+name+" "+JSON.stringify(detail)) - -func run_path(kind: String, rotation_step: int, branch: int, connected := false) -> void: - await clear_arena() - var basis:=Basis(Vector3.UP,-rotation_step*PI/2) - arena.add_child(lib.create_piece(kind,Vector3.ZERO,rotation_step)) - var sphere=lib.create_ball() - sphere.freeze=true - var descending: bool=kind in ["gentle","steep"] - var t:=.80 if descending else .05 - var direction: Vector3=lib.path_tangent(kind,0,branch) - var start: Vector3 - var target: Vector3 - var exit_direction: Vector3 - start=lib.ball_on_surface(kind,t,branch) - target=lib.ball_on_surface(kind,0 if descending else 1,branch) - exit_direction=-lib.path_tangent(kind,0,branch) if descending else lib.path_tangent(kind,1,branch) - if connected: - for local_center in lib.y_connectors():arena.add_child(lib.create_piece("straight",basis*local_center,rotation_step)) - start=lib.path_point(kind,0,branch)+Vector3(-.65,-float(lib.catalog[kind].grooveRadius)+sphere.radius+.018,0) - target=lib.path_point(kind,1,branch)+Vector3(.85,-float(lib.catalog[kind].grooveRadius)+sphere.radius,0) - direction=Vector3.RIGHT - arena.add_child(sphere) - sphere.position=basis*start - await physics_frame - sphere.freeze=false - var initial_speed: float=1.6 if connected else 1.2 - sphere.linear_velocity=Vector3.ZERO if descending else basis*direction*initial_speed - sphere.angular_velocity=Vector3.UP.cross(sphere.linear_velocity)/sphere.radius - var closest:=100.0 - var reached:=false - var contact_frames:=0 - var highest_speed:=0.0 - var trace: Array=[] - var time_at_exit:=-1.0 - for frame in range(720): - await physics_frame - var p: Vector3=basis.inverse()*sphere.position - var delta_to_goal:=p-target - var axial:=delta_to_goal.dot(exit_direction) - var lateral:=(delta_to_goal-exit_direction*axial).length() - closest=minf(closest,delta_to_goal.length()) - highest_speed=maxf(highest_speed,sphere.linear_velocity.length()) - if sphere.contact_count>0:contact_frames+=1 - if frame%12==0:trace.append({"t":frame/120.0,"p":vec(p),"v":vec(basis.inverse()*sphere.linear_velocity)}) - if axial>.04 and lateral<.22: - reached=true - time_at_exit=frame/120.0 - break - if p.y < -2:break - var path_name:="connected" if connected else "upper" - record("%s_%s_r%d_b%d" % [path_name,kind,rotation_step*90,branch],reached and contact_frames>0, - {"reached_exit":reached,"time":time_at_exit,"initial_speed":0.0 if descending else initial_speed,"closest_m":closest,"contact_frames":contact_frames,"max_speed":highest_speed,"final":vec(basis.inverse()*sphere.position),"trace":trace}) - -func run() -> void: - Engine.physics_ticks_per_second=120 - await clear_arena() - var falling=lib.create_ball() - falling.drag_enabled=false - falling.rolling_enabled=false - arena.add_child(falling) - falling.position=Vector3(0,10,0) - await physics_frame - var start_y: float=falling.position.y - var start_v: float=falling.linear_velocity.y - for i in range(120):await physics_frame - var expected_drop: float=-start_v+4.905 - var observed_drop: float=start_y-falling.position.y - record("vacuum_freefall_1s",absf((falling.linear_velocity.y-start_v)+9.81)<.02 and absf(observed_drop-expected_drop)<.05, - {"initial_velocity":start_v,"velocity_delta":falling.linear_velocity.y-start_v,"distance":observed_drop,"analytic_distance":expected_drop,"position_error":absf(observed_drop-expected_drop)}) - await clear_arena() - arena.add_child(lib.create_piece("straight")) - var resting=lib.create_ball() - arena.add_child(resting) - resting.position=Vector3(0,1.8,0) - for i in range(300):await physics_frame - record("sphere_groove_rest",absf(resting.position.y-(1.0-float(lib.catalog["straight"].grooveRadius)+resting.radius))<.035 and resting.linear_velocity.length()<.1, - {"position":vec(resting.position),"speed":resting.linear_velocity.length(),"contacts":resting.contact_count}) - # An independent analytic benchmark: sphere rolling on a 30 degree plane. - await clear_arena() - var plane=lib.create_box(Vector3(20,.2,4),Vector3(0,-.1,0),Color.GRAY) - plane.rotation.z=-PI/6 - arena.add_child(plane) - var ramp_ball=lib.create_ball() - ramp_ball.drag_enabled=false - ramp_ball.rolling_enabled=false - arena.add_child(ramp_ball) - var normal: Vector3=plane.basis*Vector3.UP - var downhill: Vector3=plane.basis*Vector3.RIGHT - ramp_ball.position=plane.transform*Vector3(0,.1,0)+normal*(ramp_ball.radius+.005) - for i in range(30):await physics_frame - var first_velocity: float=ramp_ball.linear_velocity.dot(downhill) - for i in range(60):await physics_frame - var acceleration: float=(ramp_ball.linear_velocity.dot(downhill)-first_velocity)/.5 - var slip: float=absf(ramp_ball.linear_velocity.dot(downhill)-ramp_ball.angular_velocity.length()*ramp_ball.radius) - record("solid_sphere_30_degree_plane",absf(acceleration-3.503571)<.09 and slip<.06,{"acceleration":acceleration,"analytic_acceleration":3.503571,"rolling_slip":slip}) - var horizontal_speeds: Array=[] - for enabled in [false,true]: - await clear_arena() - arena.add_child(lib.create_box(Vector3(30,.2,4),Vector3(0,-.1,0),Color.GRAY)) - var rolling_ball=lib.create_ball() - rolling_ball.drag_enabled=false - rolling_ball.rolling_enabled=enabled - arena.add_child(rolling_ball) - rolling_ball.position=Vector3(0,rolling_ball.radius+.001,0) - rolling_ball.linear_velocity=Vector3(2,0,0) - rolling_ball.angular_velocity=Vector3(0,0,-2/rolling_ball.radius) - for i in range(240):await physics_frame - horizontal_speeds.append(rolling_ball.linear_velocity.length()) - record("rolling_resistance_dissipates",absf(horizontal_speeds[0]-2)<.05 and horizontal_speeds[1].02 and momentum_error<.02,{"left_velocity":vec(left.linear_velocity),"right_velocity":vec(right.linear_velocity),"normalized_momentum_error":momentum_error}) - for kind in ["straight","turn_90","gentle","steep","y_merge"]: - for q in range(4): - for branch in range(2 if kind=="y_merge" else 1): - await run_path(kind,q,branch) - for q in range(4): - for branch in range(2):await run_path("y_merge",q,branch,true) - # Air response independently of contacts; compare actual simulated velocities. - var air_velocities: Array=[] - for mass_factor in [1.0,10.0]: - await clear_arena() - var sphere=lib.create_ball() - sphere.gravity_scale=0 - sphere.mass*=mass_factor - sphere.wind_velocity=Vector3(20,0,0) - arena.add_child(sphere) - sphere.position=Vector3(0,5,0) - for i in range(60):await physics_frame - air_velocities.append(sphere.linear_velocity.x) - var ratio: float=air_velocities[0]/maxf(air_velocities[1],.000001) - record("wind_mass_response",absf(ratio-10)<.15,{"speeds":air_velocities,"ratio":ratio}) - var output={"engine":Engine.get_version_info().string,"physics_engine":ProjectSettings.get_setting("physics/3d/physics_engine"),"ticks_per_second":120,"passed":results.size()-failures,"failed":failures,"results":results} - var path: String=ProjectSettings.globalize_path("res://playtest/artifacts/baseline/physics_report.json") - var file:=FileAccess.open(path,FileAccess.WRITE) - file.store_string(JSON.stringify(output," ")) - file.close() - print("PHYSICS_REPORT "+path+" failures="+str(failures)) - if is_instance_valid(arena):arena.queue_free() - await process_frame - quit(1 if failures else 0) diff --git a/playtest/baseline/checks/validate_physics.gd.uid b/playtest/baseline/checks/validate_physics.gd.uid deleted file mode 100644 index 6028c4c..0000000 --- a/playtest/baseline/checks/validate_physics.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://byeccpbcfaoj3 diff --git a/playtest/baseline/checks/validate_playtest.gd b/playtest/baseline/checks/validate_playtest.gd deleted file mode 100644 index f250250..0000000 --- a/playtest/baseline/checks/validate_playtest.gd +++ /dev/null @@ -1,89 +0,0 @@ -extends SceneTree -var results: Array=[] -var failed:=0 - -func _initialize() -> void: - call_deferred("run") - -func check(name: String, passed: bool, detail: Dictionary={}) -> void: - results.append({"name":name,"passed":passed,"detail":detail}) - if not passed:failed+=1 - print(("PASS " if passed else "FAIL ")+name+" "+JSON.stringify(detail)) - -func run() -> void: - var app=load("res://playtest/baseline/scenes/main.tscn").instantiate() - root.add_child(app) - await physics_frame - check("one_iron_ball_ready",is_instance_valid(app.ball) and app.ball.freeze and is_equal_approx(app.ball.radius,.3),{"mass_kg":app.ball.mass,"radius_m":app.ball.radius}) - app.start_button.pressed.emit() - check("release_button",app.started and not app.ball.freeze) - for i in range(1800): - await physics_frame - if app.status.begins_with("成功") or app.status.begins_with("已离开"):break - check("default_course_reaches_hole",app.status.begins_with("成功"),{"status":app.status,"time":app.elapsed,"position":[app.ball.position.x,app.ball.position.y,app.ball.position.z],"max_speed":app.max_speed}) - app.reset_ball() - await physics_frame - check("retry_clears_state",not app.started and app.ball.freeze and app.trail_points.is_empty() and app.elapsed==0) - check("scenario_specific_quotas",app.quota("steep")==0 and app.quota("straight")==6) - app.choose_kind("steep") - check("reject_unavailable_type",app.selected_kind!="steep") - var click:=InputEventMouseButton.new() - click.button_index=MOUSE_BUTTON_LEFT - click.pressed=true - click.position=app.camera.unproject_position(Vector3(0,1.3,.5)) - app._unhandled_input(click) - check("ray_select_visible_tile",app.selected_index==app.find_cell(Vector2i(0,0)) and is_equal_approx(app.placement_height,.5)) - app.build_preset(1) - await physics_frame - for kind in app.IDS: - app.choose_kind(kind) - await physics_frame - check("library_"+kind,app.records.size()==1 and app.records[0].kind==kind and app.pieces.size()==1) - for i in range(4):app.rotate_selected() - check("rotation_cycle_"+kind,app.preview_quarter==0 and app.records[0].quarter==0) - check("y_has_declared_four_cell_footprint",app.lib.footprint("y_merge")==Vector2i(2,2) and app.lib.catalog.y_merge.declaredBoundsFits and app.lib.catalog.y_merge.ports.size()==3) - check("y_not_mislabelled_as_steep_exception",not app.warning_label.text.contains("陡坡")) - app.build_preset(2) - await physics_frame - var previous: int=app.records.size() - app.selected_cell=Vector2i(2,0) - app.placement_height=.5 - app.choose_kind("turn_90") - app.place_selected() - check("place_adjacent_tile",app.records.size()==previous+1 and app.find_cell(Vector2i(2,0))>=0) - app.toggle_run() - var locked: int=app.records.size() - app.remove_selected() - check("editing_locked_after_release",app.records.size()==locked) - app.toggle_run() - check("pause_preserves_run_lock",app.paused and app.started and app.ball.freeze) - app.reset_ball() - app.remove_selected() - check("delete_after_retry",app.records.size()==previous) - app.selected_cell=Vector2i(4,4) - app.place_selected() - check("reject_unattached_tile",app.records.size()==previous) - app.selected_cell=Vector2i(0,0) - app.placement_height=.5 - app.choose_kind("y_merge") - app.place_selected() - check("reject_y_overlap_with_neighbor",app.records.size()==previous and app.records[app.find_cell(Vector2i(0,0))].kind=="straight" and app.status.contains("重叠")) - app.selected_cell=Vector2i(-1,1) - app.place_selected() - var y_index: int=app.find_cell(Vector2i(-1,1)) - var all_cells_match: bool=y_index>=0 - for cell in [Vector2i(-1,1),Vector2i(0,1),Vector2i(-1,2),Vector2i(0,2)]:all_cells_match=all_cells_match and app.find_cell(cell)==y_index - check("y_reserves_four_cells",app.records.size()==previous+1 and all_cells_match) - var model_center: Vector3=app.pieces[y_index].position - for i in range(4):app.rotate_selected() - check("y_rotates_about_fixed_center",app.pieces[y_index].position.is_equal_approx(model_center) and app.preview_quarter==0) - app.choose_kind("straight") - app.place_selected() - check("replace_y_releases_extra_cells",app.find_cell(Vector2i(-1,1))==y_index and app.find_cell(Vector2i(0,2))==-1) - var path=ProjectSettings.globalize_path("res://playtest/artifacts/baseline/playtest_report.json") - var out=FileAccess.open(path,FileAccess.WRITE) - out.store_string(JSON.stringify({"passed":results.size()-failed,"failed":failed,"results":results}," ")) - out.close() - app.queue_free() - await process_frame - quit(1 if failed else 0) diff --git a/playtest/baseline/checks/validate_playtest.gd.uid b/playtest/baseline/checks/validate_playtest.gd.uid deleted file mode 100644 index 1c68809..0000000 --- a/playtest/baseline/checks/validate_playtest.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ddf8i08g3bf4k diff --git a/playtest/baseline/scripts/asset_library.gd b/playtest/baseline/scripts/asset_library.gd index 92ee4e4..bf60e23 100644 --- a/playtest/baseline/scripts/asset_library.gd +++ b/playtest/baseline/scripts/asset_library.gd @@ -34,7 +34,7 @@ func add_colliders(node: Node, kind: String) -> void: body.collision_mask = 2 body.set_meta("piece_type",kind) var material := PhysicsMaterial.new() - material.friction = .25 if kind=="goal_hole" else 1.0 # native pair uses min. + material.friction = 0.0 material.bounce = 0.0 body.physics_material_override = material var collider := CollisionShape3D.new() @@ -60,16 +60,13 @@ func create_ball() -> RigidBody3D: body.radius = float(data["radius"]) body.mass = float(profile["massKg"]) body.inertia = Vector3.ONE * (0.4 * body.mass * body.radius * body.radius) - body.drag_coefficient = float(profile["dragCoefficient"]) - body.air_density = float(physics["airDensity"]) - body.mu_static = float(pair["staticFriction"]) - body.mu_dynamic = float(pair["dynamicFriction"]) body.rolling_resistance = float(pair["rollingResistance"]) body.collision_layer = 2 body.collision_mask = 3 var material := PhysicsMaterial.new() - material.friction = body.mu_static + material.friction = 0.0 material.bounce = float(pair["restitution"]) + body.base_bounce = material.bounce body.physics_material_override = material var shape := SphereShape3D.new() shape.radius = body.radius @@ -100,7 +97,7 @@ func create_box(size: Vector3, location: Vector3, color: Color, solid := true) - root.collision_layer = 1 root.collision_mask = 2 var pm := PhysicsMaterial.new() - pm.friction = 1.0 + pm.friction = 0.0 root.physics_material_override = pm return root @@ -143,7 +140,8 @@ func create_goal_hole(location: Vector3) -> Node3D: return create_piece("goal_hole",location) func crossed_goal(previous: Vector3, current: Vector3, goal: Vector3, radius: float) -> bool: - var height: float=goal.y-float(catalog["goal_hole"].depth) + # This older straight bore has its throat entrance at the rim. + var height: float=goal.y if previous.y<=height or current.y>height:return false var ratio: float=(previous.y-height)/maxf(previous.y-current.y,.000001) var crossing: Vector3=previous.lerp(current,ratio) diff --git a/playtest/baseline/scripts/iron_ball.gd b/playtest/baseline/scripts/iron_ball.gd index df41ed5..22ce416 100644 --- a/playtest/baseline/scripts/iron_ball.gd +++ b/playtest/baseline/scripts/iron_ball.gd @@ -1,67 +1 @@ -extends RigidBody3D - -var radius: float = 0.3 -var drag_coefficient: float = 0.47 -var air_density: float = 1.225 -var wind_velocity := Vector3.ZERO -var mu_static: float = 0.42 -var mu_dynamic: float = 0.32 -var rolling_resistance: float = 0.025 -var friction_enabled := true -var rolling_enabled := true -var drag_enabled := true -var contact_count := 0 -var ball_contact_count := 0 -var contact_slip := 0.0 -var air_force := Vector3.ZERO -var rolling_torque := Vector3.ZERO -var travelled := 0.0 -var previous_position := Vector3.ZERO -var tracking_started := false - -func _ready() -> void: - continuous_cd = true - contact_monitor = true - max_contacts_reported = 12 - can_sleep = false - linear_damp_mode = RigidBody3D.DAMP_MODE_REPLACE - angular_damp_mode = RigidBody3D.DAMP_MODE_REPLACE - linear_damp = 0.0 - angular_damp = 0.0 - -func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: - if freeze: - return - contact_count = state.get_contact_count() - ball_contact_count = 0 - contact_slip = 0.0 - var support_normal := Vector3.ZERO - for i in range(contact_count): - if state.get_contact_collider_object(i) is RigidBody3D:ball_contact_count+=1 - # Contact positions are global; the sphere's radial direction is unambiguous. - var n := (state.transform.origin - state.get_contact_local_position(i)).normalized() - var relative := state.get_contact_local_velocity_at_position(i) - state.get_contact_collider_velocity_at_position(i) - var slip := relative - n * relative.dot(n) - contact_slip = maxf(contact_slip, slip.length()) - if n.dot(Vector3.UP) > 0.15: - support_normal += n - # Godot exposes one native friction coefficient. Select a slip-dependent - # coefficient; native contact solver still owns the friction impulse. - physics_material_override.friction = (mu_static if contact_slip < 0.035 else mu_dynamic) if friction_enabled else 0.0 - var relative_air := state.linear_velocity - wind_velocity - air_force = -0.5 * air_density * drag_coefficient * PI * radius * radius * relative_air.length() * relative_air if drag_enabled else Vector3.ZERO - state.apply_central_force(air_force) - rolling_torque = Vector3.ZERO - if rolling_enabled and support_normal.length_squared() > 0.001: - var n := support_normal.normalized() - var roll := state.angular_velocity - n * state.angular_velocity.dot(n) - if roll.length() > 0.0001: - var support := maxf(0.0, -(mass * state.total_gravity + air_force).dot(n)) - var moment := 0.4 * mass * radius * radius - var limit := roll.length() * moment / state.step - rolling_torque = -roll.normalized() * minf(rolling_resistance * support * radius, limit) - state.apply_torque(rolling_torque) - if tracking_started: - travelled += state.transform.origin.distance_to(previous_position) - previous_position = state.transform.origin - tracking_started = true +extends "res://assets/balls/shared/physics.gd" diff --git a/playtest/baseline/scripts/playtest.gd b/playtest/baseline/scripts/playtest.gd index 1873775..abedc5d 100644 --- a/playtest/baseline/scripts/playtest.gd +++ b/playtest/baseline/scripts/playtest.gd @@ -68,7 +68,6 @@ var start_button: Button var quota_label: Label var mode_selector: OptionButton var speed_slider: HSlider -var wind_slider: HSlider var type_buttons: Array = [] var ui_font: SystemFont var capture_frames := -1 @@ -262,12 +261,6 @@ func setup_ui() -> void: if not started: configure_spawn(); reset_ball() ) column.add_child(speed_slider) - column.add_child(label_for("横风速度(m/s)",13,MUTED)) - wind_slider = HSlider.new() - wind_slider.min_value = 0 - wind_slider.max_value = 60 - wind_slider.step = 5 - column.add_child(wind_slider) var checks := HBoxContainer.new() var trail_check := CheckButton.new() trail_check.text = "轨迹" @@ -323,7 +316,6 @@ func build_preset(new_mode: int) -> void: selected_kind="y_merge" launch_speed=0 speed_slider.set_value_no_signal(0) - wind_slider.set_value_no_signal(0) elif previous_mode==3: launch_speed=1.2 speed_slider.set_value_no_signal(launch_speed) @@ -674,7 +666,6 @@ func _physics_process(delta: float) -> void: process_merge(delta) return if not is_instance_valid(ball):return - ball.wind_velocity=Vector3(0,0,float(wind_slider.value)) if started and not paused and not ball.freeze: elapsed+=delta max_speed=maxf(max_speed,ball.linear_velocity.length()) @@ -785,7 +776,6 @@ func process_merge(delta: float) -> void: for i in range(merge_balls.size()): if merge_entered.has(i) or merge_lost.has(i):continue var sphere=merge_balls[i] - sphere.wind_velocity=Vector3(0,0,float(wind_slider.value)) max_speed=maxf(max_speed,sphere.linear_velocity.length()) if sphere.ball_contact_count>0:touching_ball=true if lib.crossed_goal(merge_previous_positions[i],sphere.position,goal_position,sphere.radius): diff --git a/playtest/captures/capture_ball_materials.gd b/playtest/captures/capture_ball_materials.gd index a8c81ea..eb88d59 100644 --- a/playtest/captures/capture_ball_materials.gd +++ b/playtest/captures/capture_ball_materials.gd @@ -19,12 +19,4 @@ func run() -> void: app.status="同一球面 · 半径 0.3 m · 原木 / 陶瓷 / 铁";app.refresh_ui() await capture("ball_materials") root.remove_child(app);app.queue_free();await process_frame - var demo=load("res://playtest/materials/scenes/materials.tscn").instantiate();root.add_child(demo) - demo.load_mode("wind") - for i in range(3):await physics_frame - demo.toggle_run() - for i in range(600):await physics_frame - demo.toggle_run() - await capture("ball_materials_wind") - root.remove_child(demo);demo.queue_free();await process_frame quit() diff --git a/playtest/captures/capture_boost.gd b/playtest/captures/capture_boost.gd index ae09ca7..cca4904 100644 --- a/playtest/captures/capture_boost.gd +++ b/playtest/captures/capture_boost.gd @@ -7,7 +7,7 @@ func run() -> void: entities.append({"id":"boost_"+str(quarter),"kind":"directional_boost","position":[quarter*2,0,0],"quarter":quarter}) app.apply_data({"schemaVersion":2,"pieces":[],"entities":entities,"balls":[]}) app.select_record("boost_0");app.target=Vector3(3,.5,0);app.camera_size=9;app.pitch=.95;app.update_camera() - app.status="定向加速 · 四种朝向 · 顶面接触后先转向,再固定增加 5 m/s";app.refresh_ui() + app.status="定向加速 · 四种朝向 · 顶面接触后先转向,再固定增加 %.0f m/s" % app.Booster.SPEED_GAIN;app.refresh_ui() for i in range(15):await process_frame await RenderingServer.frame_post_draw root.get_texture().get_image().save_png(ProjectSettings.globalize_path("res://playtest/artifacts/styled/directional_boost.png")) diff --git a/playtest/captures/capture_surface_alignment.gd b/playtest/captures/capture_surface_alignment.gd index 4287d59..93218a4 100644 --- a/playtest/captures/capture_surface_alignment.gd +++ b/playtest/captures/capture_surface_alignment.gd @@ -10,10 +10,10 @@ func run() -> void: app.records=[launch,slope,tail] for y in [0,1]:app.records.append(placement.record_at("wall",Vector3(-1,y,0),0,"wall_%d"%y)) app.spawn_specs=[{"id":"ball","ballTypeId":"iron_ball","position":[-1,3.32,0]}] - app.rebuild();app.reset_simulation();app.select_record("slope") - app.target=Vector3(0,1.5,0);app.camera_size=6.8;app.yaw=.9;app.update_camera() + app.rebuild();app.reset_simulation();app.kind="";app.refresh_selection() + app.target=Vector3(-.4,2.6,0);app.camera_size=5.6;app.yaw=.9;app.update_camera() app.sidebar_scroll.scroll_vertical=150 - app.status="陡坡底面 Y 1.82 · 高端槽底 Y 3.00,与加速方块顶面齐平";app.refresh_ui() + app.status="加速出口接陡坡 · 槽底 Y 3.00 · 两侧槽沿 Y 3.32";app.refresh_ui() for i in range(12):await process_frame RenderingServer.force_draw(false);RenderingServer.force_sync() root.get_texture().get_image().save_png(ProjectSettings.globalize_path("res://playtest/artifacts/styled/surface_alignment.png")) diff --git a/playtest/checks/validate_ball_materials.gd b/playtest/checks/validate_ball_materials.gd index 2ee170d..2ffc33e 100644 --- a/playtest/checks/validate_ball_materials.gd +++ b/playtest/checks/validate_ball_materials.gd @@ -5,7 +5,6 @@ var results: Array=[] var failures:=0 var app var demo -var wind_measurements: Dictionary={} func _initialize() -> void: call_deferred("run") func check(name: String, ok: bool, detail: Dictionary={}) -> void: @@ -84,7 +83,7 @@ func run() -> void: var correct:=false if not event.is_empty(): var before: Vector3=event.before;var after: Vector3=event.after - var expected:=direction*(Vector2(before.x,before.z).length()+5) + var expected: Vector3=direction*(Vector2(before.x,before.z).length()+app.Booster.SPEED_GAIN) correct=Vector3(after.x,0,after.z).distance_to(expected)<.0001 and is_equal_approx(before.y,after.y) var pos: Vector3=body.position await frames(8) @@ -114,75 +113,20 @@ func run() -> void: for kind in TYPES: check("roll_into_hole_%s_run%d"%[kind,attempt+1],demo.events.any(func(event):return event.ballId==kind),{"events":demo.events}) check("roll_three_unique_goal_events_run%d"%(attempt+1),demo.entered.size()==3 and demo.events.size()==3 and demo.lost.is_empty()) - for with_wind in [false,true]: - demo.load_mode("wind");await frames(3) - for body in demo.balls:body.wind_velocity=Vector3(20,0,0) if with_wind else Vector3.ZERO - var peaks: Array=[0.0,0.0,0.0] - demo.toggle_run() - for frame in range(600): - await physics_frame - for i in range(3):peaks[i]=maxf(peaks[i],demo.balls[i].air_force.length()) - var measurements: Dictionary={} - for i in range(3): - var body=demo.balls[i] - measurements[TYPES[i]]={"dx":body.position.x-demo.spawn_specs[i].position[0],"speed":body.linear_velocity.length(),"peakAirForceN":peaks[i]} - wind_measurements["wind" if with_wind else "calm"]=measurements - var wood_delta: float=wind_measurements.wind.wood_ball.dx-wind_measurements.calm.wood_ball.dx - var ceramic_delta: float=wind_measurements.wind.ceramic_ball.dx-wind_measurements.calm.ceramic_ball.dx - var iron_delta: float=wind_measurements.wind.iron_ball.dx-wind_measurements.calm.iron_ball.dx - check("wind_clearly_moves_wood",wood_delta>1.0,{"windMinusCalmMeters":wood_delta}) - check("ceramic_weak_wind_response",ceramic_delta>=-.001 and ceramic_delta<.2 and ceramic_delta30 and wind_measurements.wind.iron_ball.peakAirForceN<35, - {"peakAirForceN":wind_measurements.wind.iron_ball.peakAirForceN}) - check("heavy_iron_barely_moves_in_reference_wind",absf(iron_delta)<.1 and absf(iron_delta).5 and iron.air_force.x>0, - {"windSpeedMps":100,"durationSeconds":3,"displacementMeters":iron.position.x-start_x,"airForceN":iron.air_force.x}) root.remove_child(demo);demo.queue_free();await process_frame - # Isolate mass with two otherwise identical iron bodies in free space. - # No drag override: this tests the actual configured iron profile. - var heavy=lib.create_ball("iron_ball") - var light=lib.create_ball("iron_ball") - var calm=lib.create_ball("iron_ball") - light.mass=heavy.mass/10 - light.inertia=Vector3.ONE*(.4*light.mass*light.radius*light.radius) - var bodies=[heavy,light,calm] - for i in range(3): - var body=bodies[i] - body.freeze=true;body.gravity_scale=0;root.add_child(body);body.position=Vector3(0,10,i*3) - body.wind_velocity=Vector3(20,0,0) if i<2 else Vector3.ZERO - await frames(3) - check("iron_profile_has_normal_air_drag",heavy.drag_enabled and is_equal_approx(heavy.drag_coefficient,.47) and - is_equal_approx(heavy.drag_coefficient,lib.physics.physicsProfiles.wood_game.dragCoefficient)) - for body in bodies:body.freeze=false - calm.linear_velocity=Vector3(2,0,0) - await frames(2) - var forces: Array=[heavy.air_force.x,light.air_force.x] - await frames(118) - var k: float=.5*heavy.air_density*heavy.drag_coefficient*PI*heavy.radius*heavy.radius - var expected_force: float=k*20*20 - check("mass_does_not_change_initial_wind_force",forces[0]>0 and absf(forces[0]-expected_force)<.1 and absf(forces[1]-expected_force)<.1, - {"heavyLightForceN":forces,"analyticForceN":expected_force}) - # dv/dt = k/m * (u-v)^2, v(0)=0, integrated for one second. - for body in [heavy,light]: - var expected_speed: float=20.0-20.0/(1.0+k/body.mass*20.0) - check("wind_motion_matches_equation_mass_"+str(body.mass),absf(body.linear_velocity.x-expected_speed).02 and light.linear_velocity.x>heavy.linear_velocity.x*9, - {"heavyLightSpeedsMps":[heavy.linear_velocity.x,light.linear_velocity.x]}) - check("iron_still_air_drag_is_active",calm.air_force.dot(calm.linear_velocity)<0 and calm.linear_velocity.x<1.9999, - {"speedMps":calm.linear_velocity.x,"airForceX":calm.air_force.x}) - for body in bodies:root.remove_child(body);body.queue_free() - await process_frame + # All production profiles keep their horizontal speed during free flight. + for kind in TYPES: + var body=lib.create_ball(kind) + root.add_child(body);body.position=Vector3(0,40,0) + body.linear_velocity=Vector3(4,0,0) + await physics_frame + var initial:Vector3=body.linear_velocity + await frames(120) + var delta:Vector3=body.linear_velocity-initial + check("gravity_only_in_air_"+kind,absf(delta.x)<.001 and absf(delta.y+9.81)<.02 and body.rolling_force.is_zero_approx() and body.physics_material_override.friction==0.0,{"velocity_change_1s":delta}) + root.remove_child(body);body.queue_free() var file:=FileAccess.open("res://playtest/artifacts/styled/ball_materials_report.json",FileAccess.WRITE) file.store_string(JSON.stringify({"engine":Engine.get_version_info().string,"physicsHz":120, - "windSpeedMps":20,"windDurationSeconds":5,"windComparisons":wind_measurements, "passed":results.size()-failures,"failed":failures,"results":results}," "));file.close() print("BALL_MATERIALS_REPORT ",results.size()-failures," passed, ",failures," failed") quit(1 if failures else 0) diff --git a/playtest/checks/validate_ball_placement.gd b/playtest/checks/validate_ball_placement.gd index 84789f3..28a06bd 100644 --- a/playtest/checks/validate_ball_placement.gd +++ b/playtest/checks/validate_ball_placement.gd @@ -41,7 +41,7 @@ func run() -> void: {"id":"wall2","kind":"wall","position":[0,2,0],"quarter":0}],"balls":[]}) app.select_category("balls");app.target=Vector3(0,1,0);app.camera_size=9;app.update_camera();await settle() await click_world(app,Vector3(.1,3.001,.1)) - check("mouse_picks_wall_top",app.ball_cursor.distance_to(Vector3(.1,3.32,.1))<.02 and no_overlap(app,app.ball_cursor),{"position":app.codec.array_from(app.ball_cursor)}) + check("mouse_picks_wall_top",app.ball_cursor.is_equal_approx(Vector3(0,3.32,0)) and no_overlap(app,app.ball_cursor),{"position":app.codec.array_from(app.ball_cursor)}) await click_button(app.add_ball_button);await settle() var original: Vector3=app.balls[0].position await click_world(app,Vector3(2,0,1)) @@ -71,11 +71,15 @@ func run() -> void: app.yaw=.72+quarter*PI/2;app.pitch=.95;app.camera_size=7;app.update_camera();await settle() var record: Dictionary=app.records[0] var transform:=Transform3D(Basis(Vector3.UP,-quarter*PI/2),app.lib.record_center(record)) - var target: Vector3=transform*(app.lib.path_point(kind,.45)-Vector3.UP*float(app.lib.catalog[kind].grooveRadius)) - await click_world(app,target) - var local: Vector3=transform.affine_inverse()*app.ball_cursor - var bounds: AABB=app.lib.record_bounds(record).grow(.35) - check("chute_pick_"+kind+"_"+str(quarter),bounds.has_point(app.ball_cursor) and no_overlap(app,app.ball_cursor) and local.y>.4,{"position":app.codec.array_from(app.ball_cursor)}) + var paths: Array = app.lib.catalog[kind].upperPaths + for branch in range(paths.size()): + var expected: Vector3 = (transform * app.lib.ball_on_surface(kind,.5,branch)).snapped(Vector3.ONE*.01) + # Both Y branches have distinct inlets; the outlet is shared. + for t in [.12, .35]: + var target: Vector3 = transform * (app.lib.path_point(kind,t,branch) - Vector3.UP * float(app.lib.catalog[kind].grooveRadius)) + app.ball_cursor = Vector3(10,10,10) + await click_world(app,target) + check("chute_midpoint_%s_%d_%d_%.2f" % [kind,quarter,branch,t],app.ball_cursor.is_equal_approx(expected) and no_overlap(app,app.ball_cursor),{"actual":app.ball_cursor,"expected":expected}) # The picked location must remain a normal rigid-body spawn, not attached to the track. if kind=="gentle" and quarter==2: await click_button(app.add_ball_button);await settle() @@ -87,6 +91,16 @@ func run() -> void: await click_world(app,Vector3(3,0,3)) check("simulation_blocks_ball_picking",app.ball_cursor.is_equal_approx(pending)) app.reset_simulation() + for kind in ["directional_boost","water","ice","goal_hole"]: + var level := empty_level() + level.entities = [{"id":"top","kind":kind,"position":[0,1,0],"quarter":1}] + app.apply_data(level) + app.select_category("balls") + app.pitch=1.1;app.camera_size=7;app.update_camera();await settle() + var top_y := 1.0 if kind=="goal_hole" else 2.0 + app.ball_cursor = Vector3(10,10,10) + await click_world(app,Vector3(.42,top_y,.35)) + check("entity_top_center_"+kind,app.ball_cursor.is_equal_approx(Vector3(0,top_y+.32,0)) and no_overlap(app,app.ball_cursor),{"actual":app.ball_cursor}) var seam:=empty_level() seam.pieces=[{"id":"ramp","kind":"steep","position":[0,1,0],"quarter":0}] seam.entities=[{"id":"back_wall","kind":"wall","position":[1,1.5,0],"quarter":0}] diff --git a/playtest/checks/validate_boost.gd b/playtest/checks/validate_boost.gd index 1d794d3..0b45cd1 100644 --- a/playtest/checks/validate_boost.gd +++ b/playtest/checks/validate_boost.gd @@ -44,10 +44,12 @@ func run() -> void: check("interactive_palette_exposes_boost",app.kind=="directional_boost" and app.boost_controls.is_visible_in_tree()) check("editor_has_fixed_gain_label_and_no_speed_input",app.boost_controls.find_children("*","SpinBox",true,false).is_empty() and app.boost_controls.find_children("*","Label",true,false).any(func(l):return l.text=="固定增速:+5 m/s")) app.quarter=3;app.cursor=Vector3(2,0,-1);app.refresh_selection() + var preview=app.selection + check("standalone_preview_has_guide_and_arrow",preview.find_children("ink_boost_arrow_fill*","MeshInstance3D",true,false).size()==1 and preview.find_children("directional_boost*","MeshInstance3D",true,false).any(func(m):return is_equal_approx(m.mesh.get_aabb().size.y,1.32))) await click(app.place_button);await frames(3) var id: String=app.last_placed_id check("gui_places_boost_without_gain_override",app.records.size()==1 and not app.records[0].has("speedGain") and app.records[0].quarter==3) - check("boost_retains_solid_wall_bounds",app.lib.record_bounds(app.records[0]).size==Vector3.ONE and app.pieces[0].find_children("*","StaticBody3D",true,false).size()==1) + check("boost_includes_permanent_guide_bounds",app.lib.record_bounds(app.records[0]).size.is_equal_approx(Vector3(1,1.32,1)) and app.pieces[0].find_children("*","StaticBody3D",true,false).size()==1) app.select_record(id);app.cursor.y=1;await click(app.apply_button) check("gui_moves_selected_boost",app.records[0].position.y==1) app.undo();check("undo_restores_boost_position",app.records[0].position.y==0) @@ -76,7 +78,7 @@ func run() -> void: await load_case([{"id":"base","kind":"wall","position":[0,0,0],"quarter":0}],[]) app.select_category("interactive");app.cursor=Vector3(0,1,0);app.quarter=1;app.refresh_selection() await click(app.place_button);await frames(3) - check("boost_stacks_on_wall",app.records.size()==2 and app.lib.record_bounds(app.records[1]).end.y==2) + check("boost_stacks_on_wall",app.records.size()==2 and is_equal_approx(app.lib.record_bounds(app.records[1]).end.y,2.32)) app.select_category("balls");await frames(3) await click_point(app.camera.unproject_position(Vector3(0,2.001,0))) check("mouse_places_ball_on_boost_top",app.ball_cursor.distance_to(Vector3(0,2.32,0))<.02) diff --git a/playtest/checks/validate_environment.gd b/playtest/checks/validate_environment.gd index 77da20c..09e0a81 100644 --- a/playtest/checks/validate_environment.gd +++ b/playtest/checks/validate_environment.gd @@ -145,14 +145,15 @@ func run() -> void: var name: String=kind+("_rolling" if rolling else "_sliding") measurements.braking[name]={"wall":wall,"ice":ice} check("wall_quick_stop_"+name,wall.speedMps<.1 and wall.stopSeconds>0 and wall.stopSeconds<1.2 and wall.distanceM<1.8,wall) + check("zero_native_friction_"+name,is_zero_approx(wall.nativeFriction) and is_zero_approx(ice.nativeFriction)) check("ice_remains_slippery_"+name,ice.distanceM>wall.distanceM+2 and ice.speedMps>1.5,ice) - # Wall side faces also select the same rough contact material. + # A loaded wall face brakes tangential travel with zero native friction. for kind in TYPES: await clear();piece("wall",Vector3.ZERO) var body=ball(kind,Vector3(.802,.5,0));body.gravity_scale=0 await frames(3);body.freeze=false;body.constant_force=Vector3(-body.mass*9.81,0,0);body.linear_velocity=Vector3(0,0,1) await frames(30) - check("wall_side_uses_high_friction_"+kind,body.active_surface=="wall" and body.physics_material_override.friction>=.9 and absf(body.linear_velocity.z)<.6,{"speedZ":body.linear_velocity.z,"surface":body.active_surface}) + check("loaded_wall_side_uses_only_rolling_resistance_"+kind,body.active_surface=="wall" and is_zero_approx(body.physics_material_override.friction) and absf(body.linear_velocity.z)<.6,{"speedZ":body.linear_velocity.z,"surface":body.active_surface}) await clear() # Real editor registry, flow rendering, ray selection, serialization, reset. var app=load("res://designer/scenes/workshop.tscn").instantiate();root.add_child(app);await frames(3) diff --git a/playtest/checks/validate_floating.gd b/playtest/checks/validate_floating.gd index 6a6627c..9b883a2 100644 --- a/playtest/checks/validate_floating.gd +++ b/playtest/checks/validate_floating.gd @@ -50,7 +50,7 @@ func run() -> void: var launcher:Dictionary=app.records[app.index_for("launcher")] var bounds:AABB=lib.record_bounds(launcher) var start_ball:Vector3=app.balls[0].position - check("L%d_ball_on_boost"%(index+1),launcher.kind=="directional_boost" and absf(start_ball.y-bounds.end.y-.32)<.0001 and absf(start_ball.x-bounds.get_center().x)<.5) + check("L%d_ball_on_boost"%(index+1),launcher.kind=="directional_boost" and absf(start_ball.y-launcher.position.y-lib.catalog.directional_boost.baseHeight-.32)<.0001 and absf(start_ball.x-bounds.get_center().x)<.5) check("L%d_has_no_support_walls_or_grid_colliders"%(index+1),app.records.filter(func(r):return r.kind=="wall").all(func(r):return r.id=="stop") and app.slots_view.find_children("*","CollisionObject3D",true,false).is_empty() and app.ground_view.find_children("*","CollisionObject3D",true,false).is_empty()) # Empty virtual grids cannot catch a sphere or satisfy physics support. var query:=PhysicsShapeQueryParameters3D.new();var shape:=SphereShape3D.new();shape.radius=.12 @@ -74,7 +74,7 @@ func run() -> void: var boosts:Array=app.balls[0].boost_controller.events var gain:=0.0 if boosts.size()==1:gain=Vector2(boosts[0].after.x,boosts[0].after.z).length()-Vector2(boosts[0].before.x,boosts[0].before.z).length() - check("L%d_boosted_floating_run_%d"%[index+1,repeat+1],app.solved and boosts.size()==1 and boosts[0].blockId=="launcher" and absf(gain-5)<.00001 and app.pieces.map(func(p):return p.global_transform)==originals,{"time":app.elapsed,"boosts":boosts.size(),"speed_gain":gain}) + check("L%d_boosted_floating_run_%d"%[index+1,repeat+1],app.solved and boosts.size()==1 and boosts[0].blockId=="launcher" and absf(gain-app.Booster.SPEED_GAIN)<.00001 and app.pieces.map(func(p):return p.global_transform)==originals,{"time":app.elapsed,"boosts":boosts.size(),"speed_gain":gain}) var file:=FileAccess.open("res://playtest/artifacts/tutorial/floating_report.json",FileAccess.WRITE) file.store_string(JSON.stringify({"passed":results.size()-failures,"failed":failures,"engine":Engine.get_version_info().string,"results":results}," "));file.close() quit(1 if failures else 0) diff --git a/playtest/checks/validate_goal_block.gd b/playtest/checks/validate_goal_block.gd index 19c6663..554ba47 100644 --- a/playtest/checks/validate_goal_block.gd +++ b/playtest/checks/validate_goal_block.gd @@ -12,8 +12,31 @@ func check(name: String, passed: bool, detail: Dictionary = {}) -> void: if not passed:failures += 1 print(("PASS " if passed else "FAIL ") + name) +func check_supported_workshop_goal() -> void: + var workshop = load("res://designer/scenes/workshop.tscn").instantiate() + root.add_child(workshop) + workshop.apply_data({"schemaVersion":2, "pieces":[], "entities":[ + {"id":"support", "kind":"wall", "position":[2,0,-1], "quarter":0}, + {"id":"hole", "kind":"goal_hole", "position":[2,2,-1], "quarter":0} + ], "balls":[{"id":"iron", "ballTypeId":"iron_ball", "position":[2.24,3.2,-1]}]}) + await physics_frame + workshop.toggle_run() + for frame in range(360): + await physics_frame + var ball = workshop.balls[0] + check("workshop_scores_inside_supported_goal", workshop.events.size()==1 + and workshop.events[0].goalId=="hole" and workshop.entered.size()==1 + and workshop.status.begins_with("全部入洞") and not ball.visible and ball.position.y>1.3, + {"events":workshop.events.duplicate(true), "centerY":ball.position.y, "status":workshop.status}) + root.remove_child(workshop) + workshop.queue_free() + func run() -> void: + await check_supported_workshop_goal() var lib = Library.new() + check("skimming_above_mouth_does_not_score", not lib.crossed_goal(Vector3(-.3,.4,0),Vector3(.3,.3,0),Vector3.ZERO,.3)) + check("grazing_throat_edge_does_not_score", not lib.crossed_goal(Vector3(.08,.4,0),Vector3(.08,-1.2,0),Vector3.ZERO,.3)) + check("rising_from_below_does_not_score", not lib.crossed_goal(Vector3.DOWN*1.2,Vector3.UP,Vector3.ZERO,.3)) var arena := Node3D.new();root.add_child(arena) var trials: Array = [] var offsets := [Vector2.ZERO,Vector2(.12,0),Vector2(.26,0),Vector2(.36,0), @@ -60,6 +83,10 @@ func run() -> void: app.started=false;app.unlocked=4;app.open_lesson(index) for r in Maps.solution(app.lesson): app.records.append({"id":r.id,"kind":r.kind,"position":app.lib.vector(r.position),"quarter":int(r.quarter)}) + if index==0: + # Exercise a rolling approach with the exit sealed, as in the workshop. + var bottom: Vector3 = app.placement.bottom_of(app.goals[0]) + app.records.append({"id":"support","kind":"wall","position":bottom-Vector3.UP,"quarter":0}) app.rebuild();app.reset_simulation() for i in range(3):await physics_frame app.toggle_run() diff --git a/playtest/checks/validate_surface_alignment.gd b/playtest/checks/validate_surface_alignment.gd index 058d454..3c1d10d 100644 --- a/playtest/checks/validate_surface_alignment.gd +++ b/playtest/checks/validate_surface_alignment.gd @@ -70,6 +70,8 @@ func run() -> void: var slope:=placement.align_surfaces(record("steep",Vector3(0,2,0),2),[launcher]) check("screenshot_reproduces_old_018_lip",absf(seam(record("steep",Vector3(0,2,0),2),launcher)-.18)<.00001) check("screenshot_exact_y_182",absf(slope.position.y-1.82)<.00001 and seam(slope,launcher)<.00001) + var reverse_join := placement.align_surfaces(record("directional_boost",launcher.position+Vector3.UP*.5,0,"launcher"),[slope]) + check("placing_launcher_second_joins_same_surface",reverse_join.position.is_equal_approx(launcher.position)) var wall:=record("wall",Vector3(-1,2,0),0,"wall") check("top_click_still_stacks",placement.on_face(wall,Vector3(-1,3,0),Vector3.UP,"steep",2)==Vector3(-1,3,0)) check("wall_side_still_bottom_aligned",placement.on_face(wall,Vector3(-.5,2.5,0),Vector3.RIGHT,"wall",0)==Vector3(0,2,0)) @@ -81,14 +83,18 @@ func run() -> void: # No direct initial velocity or test-only material overrides: normal iron, # real launcher top contact, real imported solid meshes, all four rotations. for kind in ["gentle","steep"]: - for quarter in range(4):await roll_across(kind,quarter) + for quarter in range(4): + for offset in [0.0,-.05,.05]:await roll_across(kind,quarter,offset) var file:=FileAccess.open(Output,FileAccess.WRITE) file.store_string(JSON.stringify({"engine":Engine.get_version_info().string,"passed":results.size()-failures,"failed":failures,"results":results}," "));file.close() quit(1 if failures else 0) func check_interfaces(launcher:Dictionary) -> void: var app=load("res://designer/scenes/workshop.tscn").instantiate();root.add_child(app);await frames(3) - app.records=[launcher];app.rebuild();app.select_category("chutes");app.kind="steep";app.quarter=2 + app.records=[launcher];app.rebuild() + var meshes:Array=app.pieces[0].find_children("*","MeshInstance3D",true,false) + check("standalone_launcher_has_rims_and_arrow",meshes.any(func(m):return not str(m.name).begins_with("ink_") and absf(m.mesh.get_aabb().size.y-1.32)<.001) and meshes.any(func(m):return str(m.name).begins_with("ink_boost_arrow_fill"))) + app.select_category("chutes");app.kind="steep";app.quarter=2 app.target=Vector3(0,2,0);app.camera_size=8;app.update_camera();await frames(3) await click(app.camera.unproject_position(Vector3(-.499,2.7,0))) check("workshop_mouse_side_pick_aligns",not app.face_pick.is_empty() and absf(app.cursor.y-1.82)<.00001,{"cursor":str(app.cursor)}) @@ -123,27 +129,46 @@ func check_interfaces(launcher:Dictionary) -> void: check("player_preview_matches_commit",index>=0 and app.records[index].position.is_equal_approx(preview)) root.remove_child(app);app.queue_free();await frames(3) -func roll_across(kind:String,quarter:int) -> void: +func roll_across(kind:String,quarter:int,offset:float) -> void: var basis:=Basis(Vector3.UP,-quarter*PI/2) var direction:Vector3=basis*Vector3.LEFT # local high end to low end var launch:=record("directional_boost",-direction+Vector3.UP*2,(quarter+2)%4,"launch") var slope:=placement.align_surfaces(record(kind,Vector3.UP*2,quarter,"slope"),[launch]) var tail:=placement.align_surfaces(record("straight",direction+Vector3.UP*2,quarter,"tail"),[slope]) var arena:=Node3D.new();root.add_child(arena) - for item in [launch,slope,tail]: + var pieces := [launch,slope,tail] + var across := direction.cross(Vector3.UP) + for item in pieces: var piece:Node3D=lib.create_piece(item.kind,lib.record_center(item),item.quarter) piece.set_meta("record_id",item.id);arena.add_child(piece) var ball=lib.create_ball();ball.freeze=true;arena.add_child(ball) - ball.position=launch.position+Vector3.UP*(1+lib.ball_radius()+.02) - await frames(3);ball.freeze=false + ball.position=launch.position+Vector3.UP*(1+lib.ball_radius()+.02)+across*offset + await frames(3) + var mouth:Vector3 = launch.position + Vector3.UP + direction*.5 + if offset==0: + # Compare both sides 1 mm from the joint, across floor, curved sides and rims. + var max_step := 0.0 + for z in [-.45,-.32,-.25,-.15,0,.15,.25,.32,.45]: + var heights:Array[float]=[] + for side in [-1,1]: + var sample:Vector3=mouth+across*z+direction*.001*side + var ray:=PhysicsRayQueryParameters3D.create(sample+Vector3.UP,sample-Vector3.UP,1) + var hit:=arena.get_world_3d().direct_space_state.intersect_ray(ray) + heights.append(hit.position.y if not hit.is_empty() else INF) + max_step=maxf(max_step,absf(heights[0]-heights[1])) + check("%s_q%d_full_mouth" % [kind,quarter],max_step<.003,{"max_step_m":max_step}) + ball.freeze=false + var entry_speed := -1.0 var contacts:Array=[];var crossed:=false;var time:=0.0 for tick in range(480): await physics_frame;time=(tick+1)/120.0 + if entry_speed<0 and (ball.position-mouth).dot(direction)>.06: + entry_speed=ball.linear_velocity.dot(direction) for collider in ball.get_colliding_bodies(): var node:Node=collider while node!=null and not node.has_meta("record_id"):node=node.get_parent() if node!=null and node.get_meta("record_id") not in contacts:contacts.append(node.get_meta("record_id")) if ball.position.dot(direction)>1.3 and "tail" in contacts:crossed=true;break if ball.position.y<0:break - check("%s_q%d_real_ball_crosses_both_seams"%[kind,quarter],crossed and "slope" in contacts and ball.boost_controller.events.size()==1,{"contacts":contacts,"time":time,"final":str(ball.position),"slope_y":slope.position.y,"tail_y":tail.position.y,"boosts":ball.boost_controller.events.size()}) + check("%s_q%d_offset_%.2f_real_ball"%[kind,quarter,offset],entry_speed>lib.Booster.SPEED_GAIN*.5 and crossed and "slope" in contacts and ball.boost_controller.events.size()==1,{"entry_speed_mps":entry_speed,"contacts":contacts,"time":time,"final":str(ball.position),"slope_y":slope.position.y,"tail_y":tail.position.y,"boosts":ball.boost_controller.events.size()}) root.remove_child(arena);arena.queue_free();await frames(3) diff --git a/playtest/checks/validate_tutorial.gd b/playtest/checks/validate_tutorial.gd index c06a460..21cc289 100644 --- a/playtest/checks/validate_tutorial.gd +++ b/playtest/checks/validate_tutorial.gd @@ -115,7 +115,7 @@ func run() -> void: check("L%d_gui_solution_enters_goal"%(index+1),app.solved and app.entered.size()==1 and app.lost.is_empty() and app.events.size()==1 and app.events[0].goalId=="goal" and required.all(func(id):return app.contact_ids.has(id)),{"time":app.elapsed,"contacts":app.contact_ids.keys(),"events":app.events}) if not app.solved:write_report();quit(1);return var boosts:Array=app.balls[0].boost_controller.events - check("L%d_real_launch_block_fires_once"%(index+1),boosts.size()==1 and boosts[0].blockId=="launcher" and is_equal_approx(Vector2(boosts[0].after.x,boosts[0].after.z).length()-Vector2(boosts[0].before.x,boosts[0].before.z).length(),5.0)) + check("L%d_real_launch_block_fires_once"%(index+1),boosts.size()==1 and boosts[0].blockId=="launcher" and is_equal_approx(Vector2(boosts[0].after.x,boosts[0].after.z).length()-Vector2(boosts[0].before.x,boosts[0].before.z).length(),app.Booster.SPEED_GAIN)) var accepted:Dictionary={"lesson":index+1,"time":app.elapsed,"layout":layout,"input_events":app.interface_events.duplicate(true),"contacts":app.contact_ids.keys(),"goal_events":app.events.duplicate(true),"trace":app.samples.duplicate(true),"launch_boosts":boosts.map(func(e):return {"blockId":e.blockId,"before":app.codec.array_from(e.before),"after":app.codec.array_from(e.after),"tick":e.tick})} runs.append(accepted);save_json("%02d_accepted.json"%(index+1),accepted) await snapshot("%02d_completed"%(index+1)) diff --git a/playtest/environment/README.md b/playtest/environment/README.md index 70c367a..e3bd3c8 100644 --- a/playtest/environment/README.md +++ b/playtest/environment/README.md @@ -18,15 +18,15 @@ 水流固定为 **5 m/s**,由 [behavior.gd](../../assets/blocks/water/behavior.gd) 的常量定义;关卡只保存位置与朝向,没有逐块速度控件。额外写入的 `flowSpeed` 字段不会被载入为速度,也不保留在再次保存的文件中。 -当前测试使用水密度 1000 kg/m³、水中阻力系数 0.47,三种球共用水的作用公式,保持原有质量、尺寸和空气响应配置。浸没体积通过球体竖直截柱与相邻水格范围的并集求得;浮力为排开水的重量,水阻力按相对流速计算。跨格不产生固体接缝,重叠体积不会重复提供浮力。不同流向接缝按浸没部分合成当前有效流速,是首版近似。 +当前测试使用水密度 1000 kg/m³、水中阻力系数 0.47,三种球共用水的作用公式,保留原有质量和尺寸。浸没体积通过球体竖直截柱与相邻水格范围的并集求得;浮力为排开水的重量,水阻力按相对流速计算。跨格不产生固体接缝,重叠体积不会重复提供浮力。不同流向接缝按浸没部分合成当前有效流速,是首版近似。 当前是由作者铺设的固定水域,不进行水源扩散、水量守恒或河道流体求解。方块朝向指定局部流向;水不能把球穿过实际河岸。没有按球种类硬编码浮沉或锁定沉底球。 -三球同时释放后,木球浮起并到达下游;330 kg 陶瓷球与铁球沉到粗糙墙壁河床,仍受水流作用。8 秒模拟时陶瓷球最大水平位移约 1.36 m、速度约 0.10 m/s;铁球位移约 0.38 m、速度约 0.039 m/s。木球到达尽头后会受到岸壁碰撞和摩擦,截图中的最终浸没比例不应当作为自由漂浮平衡比例。水速 5 m/s 不等于小球必须以 5 m/s 运动。 +三球同时释放后,木球浮起并到达下游;330 kg 陶瓷球与铁球沉到粗糙墙壁河床,仍受水流作用。旧接触模型的 8 秒模拟中,陶瓷球最大水平位移约 1.36 m、速度约 0.10 m/s;铁球位移约 0.38 m、速度约 0.039 m/s。木球到达尽头后会受到岸壁碰撞和摩擦,截图中的最终浸没比例不应当作为自由漂浮平衡比例。水速 5 m/s 不等于小球必须以 5 m/s 运动。 ## 冰块 -冰块是静态实心 1×1×1 方块。与三种球的接触参数统一采用静摩擦 0.03、动摩擦 0.02、滚动阻力 0.002、恢复系数 0.02;配置见 [physics.json](../../assets/collections/storybook/physics.json)。 +冰块是静态实心 1×1×1 方块。与三种球的接触参数统一采用滚动阻力 0.002、恢复系数 0.02;配置见 [physics.json](../../assets/collections/storybook/physics.json)。 破碎按一次真实接触事件的**法向冲量 1000 N·s**判定,接近速度需达到 0.5 m/s 以排除静态接触及低速噪声。冲量是力对碰撞时间的积分,这里不使用依赖物理步长的单帧“力峰值”。同一事件的接触点合并计算,持续承重不累计冲量;预测接触不会提前消耗本次撞击。破碎后移除该冰块的实体碰撞与外观,重置恢复完整冰块及判定状态。 @@ -44,11 +44,11 @@ Jolt 的接触冲量属于预估值,多物体同时接触时可能不精确。 ## 墙壁减速 -所有现用 `wall` 方块与三种球的接触参数均调整为静摩擦 **1.0**、动摩擦 **0.9**、滚动阻力 **0.8**、恢复系数 **0.02**。各面共享同一规则,无需逐块配置;滑槽、球洞、加速方块不因外观接近墙块而继承这些数值。 +所有现用 `wall` 方块与三种球的运行时接触参数为滚动阻力 **0.8**、恢复系数 **0.02**。各面共享同一规则,无需逐块配置;滑槽、球洞、加速方块不因外观接近墙块而继承这些数值。 -滑动摩擦由原生接触求解,滚动阻力通过受限力矩耗能;受压墙侧面也参与。没有按位置停止球、修改球质量或添加泥沙机制。当前仍沿用每刚体摩擦近似:同时接触多种表面时选择较粗糙的已配置接触对,不等价于独立逐接触材质求解。 +原生接触摩擦为零。滚动阻力作用在承托面的切向,受压墙侧面也参与。多个接触同时存在时合成承托方向,只对球施加一次滚动阻力。 -3 m/s 初速的专项测试中,三球从滑动开始约 0.40~0.41 秒、0.52 m 后降至停止容差;从纯滚动开始约 0.54 秒、0.81 m。停止容差为线速度低于 0.05 m/s。相同初态的冰面对照在 2 秒后仍有约 2.4~2.8 m/s。 +旧接触模型的 3 m/s 初速专项测试中,三球从滑动开始约 0.40~0.41 秒、0.52 m 后降至停止容差;从纯滚动开始约 0.54 秒、0.81 m。停止容差为线速度低于 0.05 m/s。相同初态的冰面对照在 2 秒后仍有约 2.4~2.8 m/s。 可视墙面/冰面场景使用相同固定加速块从静止起步(+5 m/s);上述 3 m/s 初态只用于受控制动测量。 @@ -56,7 +56,7 @@ Jolt 的接触冲量属于预估值,多物体同时接触时可能不精确。 实际修改 [现用 physics.json](../../assets/collections/storybook/physics.json) 中对应预设的 `massKg`:原木 `wood_game`、陶瓷 `ceramic_game`、铁球 `solid_iron_test`。当前起始质量为 60 / 330 / 890.0760306150601 kg;330 kg 陶瓷球已正式应用,计算阶段的 75 kg 输入与原结果作为历史记录保留。质量改变后,运行时按原半径和惯量模型重新计算转动惯量,不需要重建模型。 -每轮先明确预期,优先只改一种球的质量;固定水速、冰块阈值、表面接触参数、几何及对照初态。重跑相关场景,记录浮沉、冲量/破碎、停止时间和距离。三球从相同高度释放,不通过改变初速度或高度抵消质量变化;既有受风、入洞和加速回归仍在 `playtest/materials/`。 +每轮先明确预期,优先只改一种球的质量;固定水速、冰块阈值、表面接触参数、几何及对照初态。重跑相关场景,记录浮沉、冲量/破碎、停止时间和距离。三球从相同高度释放,不通过改变初速度或高度抵消质量变化;自由飞行、入洞和加速回归仍在 `playtest/materials/`。 `test-environment` 与 `test-balls` 的断言包含当前质量、比例和玩法预期。调整后若失败,应先解释差异并确认新的目标,再更新预期;不能静默覆盖测试中的真实质量或为了通过而降低检查标准。将每轮实际配置、初态与报告保留到 `playtest/artifacts/environment/mass_tuning/<轮次>/`,完整约定见 [质量调校流程](../../references/design/physics_system.md#25-小球质量的持续调校)。 diff --git a/playtest/environment/scripts/environment.gd b/playtest/environment/scripts/environment.gd index 1357d49..1d056f7 100644 --- a/playtest/environment/scripts/environment.gd +++ b/playtest/environment/scripts/environment.gd @@ -88,8 +88,8 @@ func refresh_ui() -> void: description.text={"water":"流速固定 5 m/s · 水面泡沫顺流漂动\n水体可穿入 · 河床/岸壁是独立墙块", "ice":"同一高度从静止释放 · 冲量 ≥ 1000 N·s 破碎\n不累计静置承重 · 不是按球种类判定", "rest":"三球直接放在冰面上 · 无释放落差\n检验重铁球持续承重也不会压碎冰块", - "wall":"固定加速块起步 +5 m/s · 粗糙墙面制动\n三种球使用相同的墙面接触规则", - "ice_slide":"相同加速起点 · 冰面低摩擦、低滚阻\n与墙面场景对比滑行距离"}[test_mode] + "wall":"固定加速块起步 +%.0f m/s · 粗糙墙面制动\n三种球使用相同的墙面接触规则" % Booster.SPEED_GAIN, + "ice_slide":"相同加速起点 · 冰面滚动阻力低\n与墙面场景对比滑行距离"}[test_mode] var lines: PackedStringArray=[] for i in range(balls.size()): var ball=balls[i] diff --git a/playtest/mass_calibration/results/engine_00.log b/playtest/mass_calibration/results/engine_00.log new file mode 100644 index 0000000..2748eb8 --- /dev/null +++ b/playtest/mass_calibration/results/engine_00.log @@ -0,0 +1,13 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 75.0 kg; x=8.20289516448975 m; final_y=1.93543541431427 +MASS_TRIAL 114.0 kg; x=8.20000076293945 m; final_y=1.42689049243927 +MASS_TRIAL 150.0 kg; x=8.20236778259277 m; final_y=1.30000948905945 +MASS_TRIAL 200.0 kg; x=8.20000267028809 m; final_y=1.3000100851059 +MASS_TRIAL 250.0 kg; x=7.8447847366333 m; final_y=1.30000996589661 +MASS_TRIAL 300.0 kg; x=2.97876834869385 m; final_y=1.30000984668732 +MASS_TRIAL 310.0 kg; x=2.23834562301636 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 350.0 kg; x=1.11907255649567 m; final_y=1.29922604560852 +MASS_TRIAL 400.0 kg; x=0.95344060659409 m; final_y=1.30000984668732 +MASS_TRIAL 500.0 kg; x=0.73166847229004 m; final_y=1.2998274564743 diff --git a/playtest/mass_calibration/results/engine_01.log b/playtest/mass_calibration/results/engine_01.log new file mode 100644 index 0000000..0218e7b --- /dev/null +++ b/playtest/mass_calibration/results/engine_01.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 320.0 kg; x=1.53083384037018 m; final_y=1.29988706111908 diff --git a/playtest/mass_calibration/results/engine_02.log b/playtest/mass_calibration/results/engine_02.log new file mode 100644 index 0000000..9c64765 --- /dev/null +++ b/playtest/mass_calibration/results/engine_02.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 315.0 kg; x=1.83812749385834 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_03.log b/playtest/mass_calibration/results/engine_03.log new file mode 100644 index 0000000..7d36a19 --- /dev/null +++ b/playtest/mass_calibration/results/engine_03.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.5 kg; x=2.02345991134644 m; final_y=1.30000996589661 diff --git a/playtest/mass_calibration/results/engine_04.log b/playtest/mass_calibration/results/engine_04.log new file mode 100644 index 0000000..e3718ab --- /dev/null +++ b/playtest/mass_calibration/results/engine_04.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 313.75 kg; x=1.92791843414307 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_05.log b/playtest/mass_calibration/results/engine_05.log new file mode 100644 index 0000000..d9b7604 --- /dev/null +++ b/playtest/mass_calibration/results/engine_05.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 313.125 kg; x=1.96931135654449 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_06.log b/playtest/mass_calibration/results/engine_06.log new file mode 100644 index 0000000..2d90b36 --- /dev/null +++ b/playtest/mass_calibration/results/engine_06.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.8125 kg; x=2.00182914733887 m; final_y=1.30000996589661 diff --git a/playtest/mass_calibration/results/engine_07.log b/playtest/mass_calibration/results/engine_07.log new file mode 100644 index 0000000..dfccca5 --- /dev/null +++ b/playtest/mass_calibration/results/engine_07.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.96875 kg; x=1.99357950687408 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_08.log b/playtest/mass_calibration/results/engine_08.log new file mode 100644 index 0000000..1958b1c --- /dev/null +++ b/playtest/mass_calibration/results/engine_08.log @@ -0,0 +1,7 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.96875 kg; x=1.99357950687408 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 312.96875 kg; x=1.99360370635986 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36222124099731 m; final_y=1.29912185668945 diff --git a/playtest/mass_calibration/results/engine_stdout_00.log b/playtest/mass_calibration/results/engine_stdout_00.log new file mode 100644 index 0000000..2748eb8 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_00.log @@ -0,0 +1,13 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 75.0 kg; x=8.20289516448975 m; final_y=1.93543541431427 +MASS_TRIAL 114.0 kg; x=8.20000076293945 m; final_y=1.42689049243927 +MASS_TRIAL 150.0 kg; x=8.20236778259277 m; final_y=1.30000948905945 +MASS_TRIAL 200.0 kg; x=8.20000267028809 m; final_y=1.3000100851059 +MASS_TRIAL 250.0 kg; x=7.8447847366333 m; final_y=1.30000996589661 +MASS_TRIAL 300.0 kg; x=2.97876834869385 m; final_y=1.30000984668732 +MASS_TRIAL 310.0 kg; x=2.23834562301636 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 350.0 kg; x=1.11907255649567 m; final_y=1.29922604560852 +MASS_TRIAL 400.0 kg; x=0.95344060659409 m; final_y=1.30000984668732 +MASS_TRIAL 500.0 kg; x=0.73166847229004 m; final_y=1.2998274564743 diff --git a/playtest/mass_calibration/results/engine_stdout_01.log b/playtest/mass_calibration/results/engine_stdout_01.log new file mode 100644 index 0000000..0218e7b --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_01.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 320.0 kg; x=1.53083384037018 m; final_y=1.29988706111908 diff --git a/playtest/mass_calibration/results/engine_stdout_02.log b/playtest/mass_calibration/results/engine_stdout_02.log new file mode 100644 index 0000000..9c64765 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_02.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 315.0 kg; x=1.83812749385834 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_stdout_03.log b/playtest/mass_calibration/results/engine_stdout_03.log new file mode 100644 index 0000000..7d36a19 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_03.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.5 kg; x=2.02345991134644 m; final_y=1.30000996589661 diff --git a/playtest/mass_calibration/results/engine_stdout_04.log b/playtest/mass_calibration/results/engine_stdout_04.log new file mode 100644 index 0000000..e3718ab --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_04.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 313.75 kg; x=1.92791843414307 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_stdout_05.log b/playtest/mass_calibration/results/engine_stdout_05.log new file mode 100644 index 0000000..d9b7604 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_05.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 313.125 kg; x=1.96931135654449 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_stdout_06.log b/playtest/mass_calibration/results/engine_stdout_06.log new file mode 100644 index 0000000..2d90b36 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_06.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.8125 kg; x=2.00182914733887 m; final_y=1.30000996589661 diff --git a/playtest/mass_calibration/results/engine_stdout_07.log b/playtest/mass_calibration/results/engine_stdout_07.log new file mode 100644 index 0000000..dfccca5 --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_07.log @@ -0,0 +1,3 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.96875 kg; x=1.99357950687408 m; final_y=1.30000984668732 diff --git a/playtest/mass_calibration/results/engine_stdout_08.log b/playtest/mass_calibration/results/engine_stdout_08.log new file mode 100644 index 0000000..1958b1c --- /dev/null +++ b/playtest/mass_calibration/results/engine_stdout_08.log @@ -0,0 +1,7 @@ +Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org + +MASS_TRIAL 312.96875 kg; x=1.99357950687408 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 312.96875 kg; x=1.99360370635986 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36199700832367 m; final_y=1.30000984668732 +MASS_TRIAL 330.0 kg; x=1.36222124099731 m; final_y=1.29912185668945 diff --git a/playtest/materials/README.md b/playtest/materials/README.md index ff31fdc..f265db3 100644 --- a/playtest/materials/README.md +++ b/playtest/materials/README.md @@ -2,13 +2,7 @@ 2026-11-17。原木球、陶瓷球和铁球使用同一球面几何,半径均为 0.3 m,具有独立 `.blend` / `.glb` 与材质。木球使用原木纹理;陶瓷使用浅色釉面及蓝色纹饰。工坊在「小球」菜单中提供三种球,放置、贴表面点选、悬空坐标、移动、撤销与保存均保留所选球种;旧关卡继续按铁球读取。 -| 球种 | 质量 | 空气阻力系数 | 当前风场行为 | -| --- | ---: | ---: | --- | -| 原木球 | 60 kg | 0.47 | 明显受风。 | -| 陶瓷球 | 330 kg | 0.04 | 弱受风;质量为木球的 5.5 倍。 | -| 铁球 | 约 890.08 kg | 0.47 | 正常受风,普通测试风场下难以推动。 | - -质量与阻力系数是当前玩法验证参数,不是现实材料测量值。使用现有相对空气速度阻力公式,不额外施加“风扇倍率”,不通过改写球位移或速度制造风效应;铁球恢复使用 0.47 的非零阻力系数,风力和静止空气阻力均正常计算。相同尺寸和瞬间相对风速下,铁球与木球受到相同空气力;铁球的大质量带来更小空气加速度,在滑槽上也产生更大的正常滚动阻力。三种球沿用原有滚动/接触调校。完整规则见 [物理系统](../../references/design/physics_system.md#332-当前三种球的玩法参数),数据见 [physics.json](../../assets/collections/storybook/physics.json)。 +木球 60 kg、陶瓷球 330 kg、铁球约 890.08 kg。三种球使用相同的滚动阻力模型。水中根据质量与浸没体积产生浮沉差异,飞行时保留水平速度。[现行物理规则](../../references/design/physics_system.md) ## 打开对照场景 @@ -16,21 +10,24 @@ ./scripts/materials.zsh ``` -原生入口是 [materials.tscn](scenes/materials.tscn)。菜单提供三种独立布局,切换会重置实验: +原生入口是 [materials.tscn](scenes/materials.tscn)。菜单提供两种独立布局,切换会重置实验: - **滚动入洞**:三条同样的坡道,各球从静止滚入自己的球洞。 -- **同风对照**:三条相同水平滑槽,统一沿 +X 施加 20 m/s 的风;面板实时显示速度和位移。 - **定向加速**:三种球落在同朝向的加速块上,首次真实顶面接触后都沿箭头获得固定 +5 m/s。 -启动/暂停、重置均在面板中;右键旋转、中键平移、滚轮缩放、F 全景。风场由该实验的环境配置提供。场景没有被列为正式关卡,也不改变工坊草稿。 +启动/暂停、重置均在面板中;右键旋转、中键平移、滚轮缩放、F 全景。场景没有被列为正式关卡,也不改变工坊草稿。 ![三种独立小球及工坊菜单](../artifacts/styled/ball_materials.png) -![同一风场运行五秒后的原生画面](../artifacts/styled/ball_materials_wind.png) +## 旧版风场实验记录 + +以下为停用风力前的测试与截图。当前专项以三球各自的自由飞行验证零空气阻力。 + +![旧版同一风场运行五秒后的原生画面](../artifacts/styled/ball_materials_wind.png) 截图保留此前材质展示;下列数值与材质球报告已按 330 kg 陶瓷球重新验证。冰块行为及新增方块的工坊放置由 [环境专项](../environment/README.md) 覆盖。 -## 已运行验证 +### 当时的验证 ```sh ./scripts/run.zsh test-balls diff --git a/playtest/materials/scripts/cases.gd b/playtest/materials/scripts/cases.gd index 91a96eb..52087b1 100644 --- a/playtest/materials/scripts/cases.gd +++ b/playtest/materials/scripts/cases.gd @@ -1,7 +1,6 @@ extends RefCounted const TYPES = ["wood_ball","ceramic_ball","iron_ball"] -const WIND = Vector3(20,0,0) static func level(mode: String, lib) -> Dictionary: var pieces: Array=[] @@ -15,9 +14,6 @@ static func level(mode: String, lib) -> Dictionary: for x in range(-1,2):pieces.append({"id":"track_%d_%d"%[i,x],"kind":"straight","position":[x,.5,z],"quarter":0}) entities.append({"id":"goal_%d"%i,"kind":"goal_hole","position":[2,1.18,z],"quarter":0}) position=Vector3(-2,1,z)+Basis(Vector3.UP,-PI)*lib.ball_on_surface("gentle",.82) - elif mode=="wind": - for x in range(-1,8):pieces.append({"id":"track_%d_%d"%[i,x],"kind":"straight","position":[x,0,z],"quarter":0}) - position=Vector3(0,0,z)+lib.ball_on_surface("straight",.5) else: entities.append({"id":"boost_%d"%i,"kind":"directional_boost","position":[-2,0,z],"quarter":0}) for x in range(-1,5):entities.append({"id":"floor_%d_%d"%[i,x],"kind":"wall","position":[x,0,z],"quarter":0}) diff --git a/playtest/materials/scripts/materials.gd b/playtest/materials/scripts/materials.gd index 4fc512f..aff58d9 100644 --- a/playtest/materials/scripts/materials.gd +++ b/playtest/materials/scripts/materials.gd @@ -5,7 +5,6 @@ var test_mode := "roll" var mode_selector: OptionButton var metrics_label: Label var description_label: Label -var wind_setting := Vector3.ZERO func setup_environment() -> void: super.setup_environment() @@ -26,8 +25,8 @@ func setup_ui() -> void: var col:=VBoxContainer.new();col.add_theme_constant_override("separation",10);panel.add_child(col) col.add_child(label("小球材质对照",24)) mode_selector=OptionButton.new() - for title in ["滚动入洞","同风对照 · 20 m/s →","定向加速 · 固定 +5 m/s"]:mode_selector.add_item(title) - mode_selector.item_selected.connect(func(i):load_mode(["roll","wind","boost"][i])) + for title in ["滚动入洞","定向加速 · 固定 +%.0f m/s" % Booster.SPEED_GAIN]:mode_selector.add_item(title) + mode_selector.item_selected.connect(func(i):load_mode(["roll","boost"][i])) col.add_child(mode_selector) description_label=label("",14);description_label.custom_minimum_size.x=290;col.add_child(description_label) var controls:=row(col) @@ -42,18 +41,16 @@ func initialize_level() -> void: load_mode(test_mode) func load_mode(mode: String) -> void: - test_mode=mode if mode in ["roll","wind","boost"] else "roll" - wind_setting=Cases.WIND if test_mode=="wind" else Vector3.ZERO - mode_selector.select(["roll","wind","boost"].find(test_mode)) + test_mode=mode if mode in ["roll","boost"] else "roll" + mode_selector.select(["roll","boost"].find(test_mode)) apply_data(Cases.level(test_mode,lib)) - target=Vector3(2 if test_mode=="wind" else 0,.8,0) + target=Vector3(0,.8,0) camera_size=12.5;update_camera() refresh_ui() func reset_simulation() -> void: super.reset_simulation() for i in range(balls.size()): - balls[i].wind_velocity=wind_setting tags[i].text=kind_name(spawn_specs[i].ballTypeId) tags[i].font_size=32 refresh_ui() @@ -62,8 +59,7 @@ func refresh_ui() -> void: if run_button==null or metrics_label==null:return run_button.text="继续" if paused else ("暂停" if started else "启动") description_label.text={"roll":"同一坡道 · 从静止出发 · 各自进入球洞", - "wind":"同尺寸、同风场、同一平直滑槽\n原木易受风 · 陶瓷弱受风 · 铁球难推动", - "boost":"三种球均沿箭头转向,再增加 5 m/s\n每次顶面接触只触发一次"}[test_mode] + "boost":"三种球均沿箭头转向,再增加 %.0f m/s\n每次顶面接触只触发一次" % Booster.SPEED_GAIN}[test_mode] var lines: PackedStringArray=[] for i in range(balls.size()): var b=balls[i] diff --git a/playtest/tutorial/README.md b/playtest/tutorial/README.md index f609464..6ac05b4 100644 --- a/playtest/tutorial/README.md +++ b/playtest/tutorial/README.md @@ -20,7 +20,7 @@ | 04 [读懂两种坡度](scenes/lesson_04.tscn) | 按 0.5 m / 1 m 落差搭配缓坡和急坡 | 缓坡 ×1、急坡 ×1、直槽 ×2 | 空中格高度不同,需比较槽口并正确旋转;交换两种坡会受阻。 | | 05 [山间长路](scenes/lesson_05.tscn) | 综合前四关,规划较长路线 | 直槽 ×5、90°弯槽 ×3、缓坡 ×1、急坡 ×1 | 参考路线包含三次转弯和两种下降坡段,玩家可在配额内探索其他路线。 | -前两关提供便于起步的初始朝向,五关均采用相同的缩略图旋转操作;第三关开始必须主动调整朝向。每关提供概念提示,不自动填入参考解,也不按排列与参考解一致来判胜;**真实穿过球洞底部截面才算成功**,其他物理解法同样有效。 +前两关提供便于起步的初始朝向,五关均采用相同的缩略图旋转操作;第三关开始必须主动调整朝向。每关提供概念提示,不自动填入参考解,也不按排列与参考解一致来判胜;**球心从上方进入球洞喉口并满足净空即算入洞**,其他物理解法同样有效。 ## 操作 diff --git a/playtest/tutorial/scripts/maps.gd b/playtest/tutorial/scripts/maps.gd index 7c60f4e..f06c79f 100644 --- a/playtest/tutorial/scripts/maps.gd +++ b/playtest/tutorial/scripts/maps.gd @@ -10,7 +10,7 @@ static func initial_level(lesson: Dictionary, lib) -> Dictionary: if entity.id==lesson.spawn.entityId:launcher=entity;break assert(not launcher.is_empty(),"Missing launch block") var basis:=Basis(Vector3.UP,-int(launcher.quarter)*PI/2) - var top:float=lib.catalog[launcher.kind].boundsBlender.max[2] + var top:float=lib.catalog[launcher.kind].baseHeight var pos:Vector3=lib.vector(launcher.position)+basis*Vector3(float(lesson.spawn.get("localX",0)),top+lib.ball_radius()+.02,0) data.balls = [{"id":"student_ball","ballTypeId":"iron_ball","position":[pos.x,pos.y,pos.z]}] return data diff --git a/references/README.md b/references/README.md index f719df2..7a056db 100644 --- a/references/README.md +++ b/references/README.md @@ -5,10 +5,12 @@ | [design/game_reference.md](design/game_reference.md) | 已确认玩法、通关、重试及奖励规则,也保留参考方向。 | | [design/blocks.md](design/blocks.md) | 方块完整设定唯一维护文档。 | | [design/physics_system.md](design/physics_system.md) | 物理系统与小球数据约定。 | +| [好谜题的构成](design/what_makes_a_good_puzzle.md) | GMTK 视频笔记。用矛盾、领悟和布局分析单道谜题。 | +| [从系统交互设计关卡](design/system_centric_puzzle_design.md) | 《Patrick’s Parabox》GDC 演讲笔记。涵盖出题、关序、盲玩和机制取舍。 | | [games/railbound](games/railbound/README.md) | 官方截图、来源及视觉分析。 | | [negative_reviews.md](games/railbound/negative_reviews.md) | Railbound 差评研究。 | | [materials/ball-materials](materials/ball-materials/README.md) | 铁球、陶瓷球与木球的 CC0 外观参考、贴图原档和来源。 | | [materials/ice](materials/ice/README.md) | 风格化冰块的 CC0 参考、贴图原档和来源。 | | [mechanics/zumex_juicer.md](mechanics/zumex_juicer.md) | 榨汁机构造笔记,属于参考资料。 | -`design/` 是项目规则,`games/`、`materials/` 和 `mechanics/` 是外部参考。工坊说明在 [designer](../designer/README.md),实验说明随场景放在 [playtest](../playtest/README.md)。 +`design/` 收录项目规则与设计方法笔记,两篇视频笔记中的应用示例仅供讨论,`games/`、`materials/` 和 `mechanics/` 是外部参考。工坊说明在 [designer](../designer/README.md),实验说明随场景放在 [playtest](../playtest/README.md)。 diff --git a/references/design/blocks.md b/references/design/blocks.md index c802963..924d1d4 100644 --- a/references/design/blocks.md +++ b/references/design/blocks.md @@ -1,4 +1,4 @@ -更新日期:2026-11-17(Asia/Shanghai)。 +更新日期:2026-12-01(Asia/Shanghai)。 滑槽与非滑槽的场景构件统一称为方块,按“滑槽”和“实体”分别组织定义及所属规则。小球的受力计算见 [小球受力与速度计算系统](physics_system.md),整体玩法见 [游戏参考与已确认方向](game_reference.md)。 @@ -44,7 +44,7 @@ **滑槽入口和出口均位于模型表面,拼接时优先使用实际连接表面对齐。** 对齐基准是供小球通过的表面及对应端口,而不是仅对齐模型原点或底面。 -工坊的侧面点选和玩家测试关的格位放置共用 [placement.gd](../../designer/scripts/placement.gd) 的槽面连接算法,预览与提交使用同一结果。读取资产 `ports.surface` 的真实槽底位置,旋转后匹配水平位置相同、向外法线相反的槽口,再计算竖直平移;接墙壁、冰块或定向加速块时以其实际顶面为基准。球洞作为接入目标时使用洞口上沿。水体不作为固体顶面。 +工坊的侧面点选和玩家测试关的格位放置共用 [placement.gd](../../designer/scripts/placement.gd) 的槽面连接算法,预览与提交使用同一结果。读取资产 `ports.surface` 的真实槽底位置,旋转后匹配水平位置相同、向外法线相反的槽口,再计算竖直平移;接墙壁或冰块时以其实际顶面为基准,接定向加速方块出口时以槽底为基准。球洞作为接入目标时使用洞口上沿。水体不作为固体顶面。 连接高度不得强制取整到半米,否则会重新产生台阶;X/Z 网格、占用检查、玩家库存与一面依附条件仍有效。算法不旋转或移动已有方块,也不替玩家选坡型;工坊优先所点连接面,玩家格位优先满足更多相容槽口再取最近高度。若两端要求的高差与所选坡型不符,不能仅靠平移使两端都连通。顶面点击仍表示叠放,手动坐标表示明确的作者位置,存档载入不自动重新吸附。 @@ -96,7 +96,7 @@ Y 形汇流按一个完整方块计入数量配额,但摆放、替换及旋转 滑槽通过槽底和侧壁的形状引导小球在表面运动。碰撞几何保留上方槽内空间,下方底座保持实心,不能用填满整个占用格的碰撞盒堵住上方轨道。 -滑槽本身不受小球受力系统驱动,不会因重力下落、被风吹走或被球撞动。小球的滚动、打滑、速度变化和离轨由物理系统计算;沿滑槽运动不表示始终锁定在中心线上,失去支撑后继续计算自由运动。 +滑槽本身不受小球受力系统驱动,不会因重力下落、被风吹走或被球撞动。关卡通过坡度、槽形与表面滚动阻力设计小球的行程;沿滑槽运动不表示始终锁定在中心线上,失去支撑后继续计算自由运动。 球间碰撞默认开启。汇流时同时处理球与球、球与槽面的接触和摩擦,不自动合并小球或重置速度。 @@ -110,7 +110,9 @@ Y 形汇流按一个完整方块计入数量配额,但摆放、替换及旋转 **滑槽的初始物理材质方案统一采用有油漆的木材质,后续根据实际表现调整。** 物理配置引用对应的接触材质;外观与贴图仍由模型资源提供。 -当前原木、陶瓷、铁球与涂漆木滑槽的接触对均采用静摩擦 0.42、动摩擦 0.32、滚动阻力 0.025、恢复系数 0.08,记录于现用 [physics.json](../../assets/collections/storybook/physics.json)。后续按接触对调整与验证,不从油漆颜色或渲染粗糙度直接推导物理系数。 +关卡设计只按小球在固体表面的滚动阻力区分摩擦效果。同一种球以相同速度进入水平段时,滚动阻力大的材质让它较早停下。冰面、木槽和粗糙墙面可用这个差异搭建不同长度的路线。 + +原木、陶瓷、铁球在涂漆木槽上均采用滚动阻力 0.025、恢复系数 0.08,记录于现用 [physics.json](../../assets/collections/storybook/physics.json)。后续按接触对调整与验证,不从油漆颜色或渲染粗糙度直接推导物理系数。 ## 关卡可用类型与数量 @@ -152,6 +154,8 @@ Y 形汇流按一个完整方块计入数量配额,但摆放、替换及旋转 **已接入关卡工坊。** 该方块属于“实体 → 触发方块”,在工坊中归入“交互方块 → 定向加速”。以实心 $1\times1\times1$ 标准墙壁方块为基础,在顶面增加明确的箭头,用于指示给予小球水平速度的方向;箭头与效果方向随方块朝向一致变化。箭头为可视标识,不额外抬高实体碰撞面;独立 Blender 源文件与导出模型见 [工坊资产说明](../../designer/README.md#独立资产)。 +定向加速方块自带渐进式 U 形导槽,单独摆放、预览和旋转时均可见。槽底距底面 1 m,两侧沿箭头方向逐渐升高,出口的半圆截面半径为 0.32 m。接入缓坡或陡坡时,出口中央滚动线与两侧槽沿分别齐平。槽壁参与碰撞,方向箭头贴合槽面。 + **触发效果为先改向,再叠加水平速率。** 先将小球的水平运动方向强制改为箭头所指方向,保留改向前的水平速率,再固定增加 **5 m/s** 的水平速率。静止小球也能获得该增量,因此方块可放在小球出发点承担起步作用,也可用于运动途中的改向与提速。 设触发前的水平速度为 $\mathbf v_h=(v_x,v_z)$,箭头的水平单位方向为 $\hat{\mathbf d}$,固定速率增量为 $\Delta s=5\,\mathrm{m/s}$,则每次有效触发后的水平速度为: @@ -170,13 +174,13 @@ $$ ### 冰方块 -**冰方块(`ice`)属于“实体 → 触发方块”,为实心 $1\times1\times1$ 米方块。** 冰块保持静态,承托或阻挡小球;低摩擦与低滚动阻力使球较容易滑行。模型、碰撞与制作源文件位于 [ice](../../assets/blocks/ice/)。 +**冰方块(`ice`)属于“实体 → 触发方块”,为实心 $1\times1\times1$ 米方块。** 冰块保持静态,承托或阻挡小球;低滚动阻力使球能滚得更远。模型、碰撞与制作源文件位于 [ice](../../assets/blocks/ice/)。 -原木、陶瓷、铁球与冰面的接触对统一采用以下已确认数值,保存在 [physics.json](../../assets/collections/storybook/physics.json),不逐块配置: +当前引擎中,原木、陶瓷、铁球与冰面的接触对统一采用以下数值,保存在 [physics.json](../../assets/collections/storybook/physics.json),不逐块配置: -| 静摩擦系数 | 动摩擦系数 | 滚动阻力系数 | 恢复系数 | -| ---: | ---: | ---: | ---: | -| 0.03 | 0.02 | 0.002 | 0.02 | +| 滚动阻力系数 | 恢复系数 | +| ---: | ---: | +| 0.002 | 0.02 | **破碎按单次撞击的法向冲量达到 1000 N·s 判定,同时要求法向接近速度至少为 0.5 m/s。** 冲量是碰撞力对作用时间的积分,用于衡量一次撞击;不用依赖物理步长的单帧力峰值。0.5 m/s 门槛用于排除静态接触及低速噪声。判定不按球的种类或静态质量直接触发,不累计持续承重,也不累计多次未达阈值的撞击损伤。 @@ -194,13 +198,13 @@ $$ **标准墙壁为实心的 $1\times1\times1$ 方块。** 模型与碰撞体都覆盖完整立方体,不包含滑槽或通孔。墙壁沿用实体的资产与物理配置规则,可作为滑槽依附的实体;在关卡工坊中可以不限数量地放置、移动、旋转和删除。 -**所有现用墙壁方块(`wall`)与原木、陶瓷、铁球的接触对均采用高摩擦和高滚动阻力,数值统一配置,不逐块调整:** +当前引擎中,墙壁方块(`wall`)与三种球的接触参数统一配置如下。关卡用墙面的高滚动阻力制动。 -| 静摩擦系数 | 动摩擦系数 | 滚动阻力系数 | 恢复系数 | -| ---: | ---: | ---: | ---: | -| 1.0 | 0.9 | 0.8 | 0.02 | +| 滚动阻力系数 | 恢复系数 | +| ---: | ---: | +| 0.8 | 0.02 | -顶面、侧面及底面共享同一材质规则;接触摩擦制止相对滑动,承受压紧力时的滚动阻力继续消耗滚动能量,使球在墙面上快速减速。该规则不自动扩展到同样采用方块外形的加速方块或球洞,也不覆盖滑槽材质。参数保存在 [physics.json](../../assets/collections/storybook/physics.json) 的 `wall` 接触对中。 +顶面、侧面及底面共享同一材质规则;承受压紧力时的滚动阻力继续消耗滚动能量,使球在墙面上快速减速。该规则不自动扩展到同样采用方块外形的加速方块或球洞,也不覆盖滑槽材质。参数保存在 [physics.json](../../assets/collections/storybook/physics.json) 的 `wall` 接触对中。 **不设计泥土或泥沙方块。** 河床、河岸可直接使用墙壁构成;铁球沉到河床后继续受水流、重力、浮力及墙面接触作用,不锁定位置或强制清零速度。快速减速不表示在任意外力下都不能移动。 @@ -208,7 +212,9 @@ $$ **球洞也归入“实体 → 非触发方块”,在工坊菜单中与标准墙壁一起列入“非交互方块”。** 球洞自身保持静态,不因碰球改变状态;入洞计数由关卡判定处理。洞口带有锥形斜坡,通过真实接触面把球引向较窄的内部喉口,不能使用吸附力或直接改写球坐标替代导引。 -球洞外壳采用与标准墙壁一致的 $1\times1\times1$ 立方体外形与石色材质,顶部平面保留圆形洞口,不再使用杯状外壳。入口半径 0.46、内部锥面下降 0.35 后收窄至半径 0.32 的喉口,整体深度为 1 个单位,内部通道贯通至底部以供落球及入洞判定。0.32 的内部有效净半径保留与当前半径 0.3 的球之间的 0.02 径向余量。球洞模型原点以其上沿为基准,碰撞几何与可见模型一致并保留真实空腔,不能用完整方盒碰撞体封住洞口;工坊坐标栏统一显示底面高度,并自动换算到模型原点。 +球洞外壳采用与标准墙壁一致的 $1\times1\times1$ 立方体外形与石色材质,顶部平面保留圆形洞口,不再使用杯状外壳。入口半径 0.46、内部锥面下降 0.35 后收窄至半径 0.32 的喉口,整体深度为 1 个单位,内部通道贯通至底部。0.32 的内部有效净半径保留与当前半径 0.3 的球之间的 0.02 径向余量。球洞模型原点以其上沿为基准,碰撞几何与可见模型一致并保留真实空腔,不能用完整方盒碰撞体封住洞口;工坊坐标栏统一显示底面高度,并自动换算到模型原点。 + +**球心从上向下进入喉口、且球体满足孔径净空时,关卡立即计入该球一次。** 判定面位于锥面与直孔的交界处(上沿下方 0.35 m)。洞底可以紧贴墙壁或其他方块。擦过洞沿的小球继续参与模拟。 ### 水方块 @@ -216,6 +222,8 @@ $$ **所有水方块的流速固定为 5 m/s,关卡作者、方块实例及运行过程均不可单独修改。** 放置时只配置位置和朝向;模型默认朝向为 0°,沿局部竖直 Z 轴按顺时针 90° 旋转。放置预览和玩家关卡均用水面泡沫显示流向,泡沫在放球前就沿实际水流方向漂动,动画速度单独控制。同向、同高的水块之间连续漂动。球速由物理响应决定;关卡中的额外 `flowSpeed` 字段不会生效,重新保存时不保留。 +水体没有固体滚动面,漂浮和下沉都不产生来自水的滚动阻力。沉底后,只有球接触固体河床并沿床面滚动时,才使用河床材质的滚动阻力。 + 当前水密度为 **1000 kg/m³**,水中阻力系数为 **0.47**。三种球使用同一水作用公式,浮沉取决于真实质量与浸没体积,不按球种类设开关。水流与浮力计算见 [物理系统](physics_system.md#35-水流与浮力)。 水域由作者逐格铺设,相邻水块连接;跨格不会产生固体接缝,接缝或重叠体积不重复提供浮力。水体占格仍参与编辑摆放校验,选取区域不阻挡球。首版不自动扩散水源、不模拟水量守恒或河道流体;没有新增全局水域配置。不同流向交界由物理系统按浸没部分合成作用,当前近似及限制见实验说明。 diff --git a/references/design/game_reference.md b/references/design/game_reference.md index dc9bd89..4f4fec2 100644 --- a/references/design/game_reference.md +++ b/references/design/game_reference.md @@ -1,6 +1,6 @@ # IntoHole 游戏参考与已确认方向 -更新日期:2026-11-17(Asia/Shanghai)。 +更新日期:2026-12-01(Asia/Shanghai)。 本文按当前已确认的项目方向整理。参考游戏仅保留 **Railbound(轨道连结)** 与 **Marble Run**;项目规则以用户确认内容为准,尚未确定的机制列入待明确事项。 @@ -39,9 +39,9 @@ Marble Run 的商店介绍强调使用木质和金属零件构造三维小球轨 场景构件统一称为方块,按 [滑槽](blocks.md#滑槽) 和 [实体](blocks.md#实体) 两章分别记录定义、占用及所属规则;触发方块和非触发方块归入实体章节。 -小球的重力、风力、滚动接触及实时速度计算见 [小球受力与速度计算系统](physics_system.md)。该文档区分已确认规则、技术设计方案与待定参数,不新增未经确认的材质玩法。 +现有引擎的小球受力与实时速度计算见 [小球受力与速度计算系统](physics_system.md)。该文档区分已确认规则、技术设计方案与待定参数,不新增未经确认的材质玩法。 -**小球之间的碰撞默认开启,滑槽及其他接触面的摩擦均参与计算。** 具体碰撞与摩擦系数按材质设计确定。 +小球之间保留碰撞。关卡采用第 4.1 节的滚动摩擦规则。 Marble Run 评价较低是用户在本轮选型中提出的判断;本文不将其整体口碑作为采用依据,也不推定低评价的具体原因。采用依据是上述导球概念和滑槽形态。 @@ -49,7 +49,9 @@ Marble Run 评价较低是用户在本轮选型中提出的判断;本文不将 ### 4.1 定位与目标 -游戏采用**轻量解谜要素**。玩家架设滑槽路线,让小球从高处释放后沿滑槽滚动,最终进入洞中。 +游戏采用轻量解谜。玩家架设滑槽路线,让小球从高处释放后沿滑槽滚动,最终进入洞中。 + +**关卡中只设计一种摩擦机制:小球在固体表面滚动时受到的滚动阻力。** 玩家通过比较材质判断球还能滚多远。坡道高差、重力、支撑和碰撞决定运动路线。进阶关优先组合不同滚动阻力的表面与已有机关;静摩擦、动摩擦、滑滚切换和空气阻力不设为解题条件。风力留作以后讨论。 核心过程为: @@ -73,14 +75,14 @@ Marble Run 评价较低是用户在本轮选型中提出的判断;本文不将 **当前小球半径统一为 0.3 个游戏单位,直径为 0.6 个单位。** 尺寸在模型中制作,物理系统从资产导入;单位换算与校验见 [小球受力与速度计算系统](physics_system.md#23-单位与资产导入)。 -已实现原木球、陶瓷球、铁球,三者体积形状相同。陶瓷球重于原木球,但轻于铁球;当前风场应明显推动木球、只轻微影响陶瓷球;铁球同样受风,但由于质量大,在有接触阻力的滑槽上几乎不移动。三种球均参与正常滚动、入洞和定向加速。当前实现参数及验证见 [三球对照](../../playtest/materials/README.md)。 +已实现原木球、陶瓷球、铁球,三者体积形状相同。陶瓷球重于原木球,但轻于铁球;既有风场实验用于比较同一风场对不同质量小球的影响。三种球均参与正常滚动、入洞和定向加速。当前实现参数及验证见 [三球对照](../../playtest/materials/README.md)。 小球具有多种材质和相应特性。这些差异需要参与谜题,形成玩家在设计滑槽路线时必须考虑的阻碍。 | 已确认的特性方向 | 对谜题的作用 | 尚未确定的细节 | | --- | --- | --- | | **易碎** | 某些球非常容易破碎,路线需要考虑如何让它们成功抵达洞口。 | 具体材质名称、破碎触发条件及阈值。 | -| **轻、容易被风吹跑** | 电风扇等风源可以影响小球;相同空气力下,轻球的加速度更大,路线需要考虑球与风的相互影响。 | 风源的具体方向、风速、作用范围、衰减和遮挡参数。 | +| **浮沉** | 水上路线可运送浮球,沉球需要另铺路线。 | 已有水流与材质实测见第 4.4 节。 | | **其他材质特性** | 后续可用更多差异形成谜题阻碍。 | 原木、陶瓷、铁球已实现;其他材质及额外行为尚待确定。 | 材质特性的设计目标是让玩家理解并应对不同球的行为,而不是仅通过颜色或外观区分球。三种球的当前参数已配置并验证;质量继续通过保留的 playtest 对照场景调整,流程见 [物理系统的质量调校](physics_system.md#25-小球质量的持续调校)。当前质量为原木 60 kg、陶瓷 330 kg、铁球约 890.08 kg;陶瓷球的初步质量已在 2026-11-17 确认并应用。 @@ -92,10 +94,10 @@ Marble Run 评价较低是用户在本轮选型中提出的判断;本文不将 环境因素沿用方块体系。当前已确定以下规则,完整规格与数值统一维护在 [方块文档](blocks.md): - **水方块**属于非触发方块,只提供水体,河道由其他方块构成。所有水流固定 **5 m/s**,水面泡沫在释放小球前就沿着方块所设的流向漂动。小球受到浮力和水流作用,按真实质量与浸没体积浮沉。当前原木球浮起,陶瓷球和铁球下沉;改变质量后重新验证,不按材质名称锁定结果。 -- **冰方块**属于触发方块,具有低摩擦、低滚动阻力,并在足够大的撞击下破碎。当前规则为单次法向冲量 **1000 N·s** 且法向接近速度至少 **0.5 m/s**;重物静置不直接触发破碎。冰方块破碎与小球自身易碎分别定义。 -- **墙壁方块**统一采用已确认的高摩擦和高滚动阻力,使球快速减速,也可作为河床与河岸。**不设计泥土或泥沙方块**;沉底球仍参与正常受力与接触,不强制锁死。 +- **冰方块**属于触发方块,滚动阻力低,并在足够大的撞击下破碎。当前规则为单次法向冲量 **1000 N·s** 且法向接近速度至少 **0.5 m/s**;重物静置不直接触发破碎。冰方块破碎与小球自身易碎分别定义。 +- **墙壁方块**滚动阻力高,使球快速减速,也可作为河床与河岸。**不设计泥土或泥沙方块**;沉底球仍参与正常受力与接触,不强制锁死。 -新增环境风、风方块、全局风道及遮挡配置暂缓。既有空气受力公式与电风扇方向的设计记录保留,已有受风对照用于质量回归,不据此新增本轮环境风配置。 +新增环境风、风方块、全局风道及遮挡配置暂缓。既有空气受力公式与电风扇方向的设计记录保留,现行版本已停用空气作用,历史受风数据仅供对照,不据此新增本轮环境风配置。 **水流、冰块撞击/静置、墙面制动及冰面滑行场景持续保留在 `playtest/environment/`,用于调整每种材质小球的质量。** 当前规则数值已确认,测试场景仍属于非正式实验,不自动成为正式关卡。入口与实测说明见 [环境实验](../../playtest/environment/README.md)。 diff --git a/references/design/physics_system.md b/references/design/physics_system.md index 82c19e0..8931aab 100644 --- a/references/design/physics_system.md +++ b/references/design/physics_system.md @@ -1,10 +1,20 @@ # IntoHole 小球受力与速度计算系统 -更新日期:2026-11-17(Asia/Shanghai)。 +更新日期:2026-12-01(Asia/Shanghai)。 -本系统负责计算所有小球的受力、滚动、飞行和碰撞,使小球在重力、空气作用、水的浮力与流动作用,以及固体接触的共同作用下更新速度与位置。**计算主线是合力与力矩 → 加速度与角加速度 → 速度与角速度 → 位置与姿态。** 重力势能转化为动能是这一过程的能量表现,不能单独代替实时运动计算。 +**当前关卡设计(2026-12-01)**采用单一的表面摩擦机制。球在固体上滚动时按材质消耗动能,腾空时继续受重力作用;水中按浮沉和已有水流规则运动,接触河床后才可能受到来自床面的滚动阻力。静摩擦、动摩擦及滑滚转换不作为谜题机制,风力玩法暂缓。 -玩法依据见 [游戏参考与已确认方向](game_reference.md),场景方块的定义与所属规则分别见 [滑槽](blocks.md#滑槽) 和 [实体](blocks.md#实体) 两章。已确认规则包括:只有小球受力、其他场景对象不受该系统驱动;小球之间的碰撞默认开启;滑槽及其他接触面的摩擦均参与计算。下文的球体模型、计算流程和建议参数构成技术设计方案。首版 playtest 使用 Godot 4.7.2,具体实现与实测范围见 [playtest 验证说明](../../playtest/baseline/README.md)。水方块、冰块及墙面接触的数值现已确认为当前基线,完整规则见方块文档;[水与冰实验](../../playtest/environment/README.md) 持续保留,用于小球质量调校。新增环境风配置暂缓,既有空气计算与受风实验保留。本文区分当前实现、已验证范围与完整验收目标。 +### 当前运行模型 + +工坊、玩家关卡、展示及早期试玩共用 [小球物理脚本](../../assets/balls/shared/physics.gd)。原生接触摩擦与线性、角度阻尼均为零。碰撞体处理支撑、反弹及球间碰撞。重力加速度为 9.81 m/s²。空气中的球保留水平速度。 + +受固体承托时,沿接触面的速度决定滚动方向。阻力大小近似为 $c_{rr}N$,其中 $N$ 来自重力、外载和水作用在承托法线上的压紧分量。槽壁接缝的多个接触点合成为一个承托方向,采用承载分量最大的接触面的系数,每个物理步只施加一次阻力,并限制其大小以避免单靠阻力反向。木槽、冰面、墙面的系数分别为 0.025、0.002、0.8。球在接触面上的转速按切向速度和半径同步。这个玩法近似不通过静摩擦交换平动与转动能量。 + +水体沿用浸没体积浮力与相对水流阻力,接触河床时按床面材质计算滚动阻力。定向加速块仍通过真实接触提供固定 +5 m/s。旧配置中的空气、静摩擦和动摩擦字段保留供历史资料使用,运行时不读取这些系数。 + +### 旧版完整刚体模型与设计记录 + +下列章节保留既有数据约定、旧受力推导、验证记录和候选机制。涉及风、空气阻力、滑滚转换、阻力矩及相应验收目标时,以本页上方的当前运行模型为准。 **后续 Agent 新增或修改任何小球数据时,必须遵循第 2.2.1 节的小球引入清单和第 2.2.2 节的数据编写规范。** 字段分工与数据来源已确定;现有材质数值和资产引用按当前实现读取,新材质再按清单补齐;质量调整遵循第 2.5 节。 @@ -35,7 +45,7 @@ “任何场景下正确计算”的目标是:在下述模型及经过验收的参数范围内,对各种力、接触和状态组合使用一致的方程,并将误差控制在验收容差内。刚体、简化空气阻力和数值积分不能提供对任意现实材料、任意速度都完全精确的模拟。首版不求解球体变形、流体湍流和旋转升力;未来新增机制须显式扩展模型。 -### 1.3 默认碰撞与摩擦规则 +### 1.3 旧版引擎的碰撞与摩擦规则 - **小球之间的碰撞默认开启。** 所有仍在模拟中的小球均参与球间碰撞检测与接触求解,根据双方质量、速度、接触方向和材质参数更新运动;睡眠球被撞击时须唤醒,入洞或其他原因退出模拟的球不再参与。 - **滑槽及其他实体接触面的摩擦均参与计算。** 覆盖滑槽底面、侧壁、实体表面(如墙壁砖块)及球与球的接触面,不能只计算支持力或法向回弹而跳过切向摩擦。纯触发区域本身不产生接触摩擦。 @@ -559,7 +569,7 @@ $$ ## 8. 验收场景 -以下为系统完整验收基准,数字是解析结果或指定样例参数的计算结果。当前可运行 playtest 已覆盖的场景及实际结果见 [验证说明](../../playtest/baseline/README.md),不将该版本的测试结果扩大为本表所有场景均已完成。 +以下为系统完整验收基准,数字是解析结果或指定样例参数的计算结果。当前保留的可运行检查与结果按 [实验索引](../../playtest/README.md) 和各专项说明核对;早期 baseline 三组自动检查已删除,其历史报告不作为当前覆盖证明,也不将任何单组测试结果扩大为本表所有场景均已完成。 标明无摩擦或无耗散的案例是显式设置相应系数为零的解析校验,不代表实际关卡默认关闭摩擦。默认碰撞和摩擦行为还须通过下列常规接触案例验收。 diff --git a/references/design/system_centric_puzzle_design.md b/references/design/system_centric_puzzle_design.md new file mode 100644 index 0000000..32a863d --- /dev/null +++ b/references/design/system_centric_puzzle_design.md @@ -0,0 +1,20 @@ +# 《System-Centric Puzzle Design in Patrick’s Parabox》笔记:从一个规则发现做出一组关卡 + +Patrick Traynor,GDC 2024。按讲者的英文时间戳文本整理,并对照演讲幻灯片中的布局比较。以下时间点可跳回对应案例。[原视频](https://www.youtube.com/watch?v=HAvS-RwkjdA) · [GDC 演讲页](https://www.gdcvault.com/play/1034415/System-Centric-Puzzle-Design-in) · [演讲幻灯片](https://media.gdcvault.com/gdc2024/Slides/GDC%2Bslide%2Bpresentations/Traynor_Patrick_SystemCentricPuzzle.pdf) + +Traynor 在原型中发现,箱子能装进别的箱子,甚至能包含自己。玩家走出一个包含自身的箱子,会发现自己仍在其中。他希望把这些现象逐个交到玩家手里。这也给了他删关和降难度的标准:玩家领会这一次递归之后,还有哪些搬运值得做? + +## 演讲大纲 + +1. **先定每关要展示的现象,再决定保留多少难度。** 一道题原本要求把四个箱子分开,摆位很紧;简化版只有三个箱子,空地更多,仍然要用到同一个递归技巧。作者采用三箱版作主线,四箱版保留为选做。简化过头有时会让人误打误撞过关,他把这看作需要通过试玩权衡的代价。[00:55 递归系统](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=55s) · [04:06 两种布局对照](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=246s) +2. **把教学失败定位到两关之间。** 测试者能解 A、B,到 C 却卡住。作者先插入一关,单独练习从 B 到 C 缺失的那一步;还有人卡在 C,就把 C 改为选做。另一组“无限退出”题原有七关,他一次删了五关,重做初次介绍和巩固练习。关卡顺序值得像单关布局一样反复修改。[06:38 学习曲线](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=398s) · [10:57 同时开放多道题](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=657s) +3. **从盲玩里听出玩家以为规则是什么。** 作者请新玩家录屏并边玩边说出想法,通常每轮看一两人,先看完整段、记下细节,再着手改。两个人在同一格停住,一个可能在计划下一步,另一个可能误以为箱子不能进入;完成时间分不出这两种情况。他在开发期间做了约 15 次这种全流程录制试玩。[11:50 试玩方法](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=710s) +4. **先找到一个有趣的动作,再搭出需要它的情境。** 一排箱子顶住墙,也能给另一个箱子提供进入所需的阻挡。于是可以设计一道题,让玩家为了取出贴墙的箱子,自己构造这排支撑。找动作时,他会列出机制配对,也会造无墙房间、塞满箱子的容器等极端布局。还有一个好来源是玩家“差一点成功”的方案:记下对方想做什么,再另做一关,让这个想法真的成立。[15:37 从交互出题](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=937s) · [18:08 从失败尝试取材](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=1088s) +5. **给同一个发现做变体,也给演示留位置。** 有一关只让玩家连续进入四层箱子再退出,操作本身就足以展示嵌套的趣味。遇到值得深挖的题,作者会另做容易版、困难版或附加一种约束的版本。最终收录 364 关,另有超过 600 个未采用的草稿,其中也包括正式关的旧版。[19:02 展示关](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=1142s) · [19:45 变体与取舍](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=1185s) +6. **修改底层规则时,把玩家今后的推理成本也算进去。** 一个箱子的同一侧可以有几个开口。作者试过中心堵住时自动寻找最近的入口,虽然能做出更多布局,玩家却得一直记着系统如何搜索、如何处理平局。最后保留了只检查中心的规则。另一些自然但会干扰主线的规则变体,被做成通关后的独立区域。[21:27 入口选择实验](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=1287s) · [25:09 通关后的规则变体](https://www.youtube.com/watch?v=HAvS-RwkjdA&t=1509s) + +## 用在 IntoHole:把水第 5 关当成一次设计实验 + +现有标准解分别给木球接河尾、给铁球接两段下降坡,两条路线在洞口会合。可以从“共用一段轨道”这个动作反向出题:先在工坊做一个小布局,只验证同一截槽能否稳定接到从不同方向或高度到达的两颗球。这个动作成立后,再测试怎样的地形和库存会让玩家自己想到共用。[当前标准解](../../playtest/water/solutions/05.json) + +值得并排试玩两个草案:一个把共用段的入口露得很清楚,用来教会这个动作;另一个把入口留给玩家选择,用来考察能否迁移。请第一次玩的玩家在放球前分别预测两球的路线。即使两版都一次通关,玩家能否解释为什么这一截槽可以用两次,仍能帮助判断它适合放在教学段还是挑战段。 diff --git a/references/design/what_makes_a_good_puzzle.md b/references/design/what_makes_a_good_puzzle.md new file mode 100644 index 0000000..1d1ed49 --- /dev/null +++ b/references/design/what_makes_a_good_puzzle.md @@ -0,0 +1,22 @@ +# 《What Makes a Good Puzzle?》笔记:玩家在哪一步改变了想法? + +Mark Brown,Game Maker’s Toolkit,2018。按原片六个章节整理,案例依据带时间戳的英文讲解。本文涉及示例关卡的解法。[原视频](https://www.youtube.com/watch?v=zsjC6fa_YBg) + +Brown 用三个问题剖开一道题:**玩家起初有理由相信什么?这个想法会在哪里碰壁?哪条已知规则还有一个他没想到的用途?** 视频先从设计者一侧寻找矛盾和解法,再回到玩家一侧,解释怎样摆出一个让人愿意尝试的开局。 + +## 原片大纲 + +| 回看 | 主题 | 值得记住的例子与判断 | +| --- | --- | --- | +| [01:00](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=60s) | 规则和限制提供题材 | 《Cosmic Express》的轨道不能交叉。同一条窄路,去程一旦占用,回程就要另想办法。玩家知道要把乘客送到哪里,值得思考的是行程怎么安排。 | +| [02:37](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=157s) | 两个合理要求发生冲突(catch) | 站在按钮上能开门,走向门却会松开按钮。这个极简例子把矛盾说得很清楚。《塔洛斯的法则》把同一结构藏进光路里:想腾出一个连接器,就得先打开另一扇门,而开门又依赖即将被拆掉的光路。 | +| [04:28](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=268s) | 解法揭示规则的另一层后果(revelation) | 上例中,门挡住了光束,玩家仍可以预先指定连接目标。红光开门的一刻,预设的蓝光线路便会接通,这时才可撤走多余的连接器。玩家学到的是一种今后还能用的布置顺序。Brown 也举了《Braid》的反例:一个交互即使合乎规则,如果只有极窄的时机能试出来,发现它也容易像猜暗招。 | +| [08:01](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=481s) | 用布局引出自然的第一种猜想(assumption) | 《Snakebird》第 10 关中,身体太短,够不到下方的水果,于是先吃左边那颗很合理。长长之后却转不回来。第一次尝试让玩家亲自发现,变长既是到达水果的条件,也可能堵住退路。[例题从 10:09 开始](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=609s) | +| [11:03](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=663s) | 摆法决定玩家能发现多少(presentation) | 《Portal 2》里,方块先在光桥上挡住激光。玩家站上升降台再撤桥,方块下落,激光恢复,同时方块压住开门按钮。《The Turing Test》的相近布局已经把光桥摆在按钮上方,玩家少做了一次关键推理。初始位置可以给线索,也可以直接替玩家做决定。 | +| [14:49](https://www.youtube.com/watch?v=zsjC6fa_YBg&t=889s) | 把领悟排进难度曲线 | 前一关费力发现的技巧,可以成为后一关的一步。Brown 转述 GO 系列团队排难度时看的四项:可行解有多少、解需要几步、每步有多少选择、玩家要先懂哪些机制。反复重置时才显得漫长的铺垫动作,尤其值得删。 | + +## 用在 IntoHole:评审水第 4 关 + +当前目标文字已经告诉玩家让木球随流转弯、让铁球避开深水。复盘时可以先遮住这句话,只保留“两颗球都入洞”,观察玩家从地图上会得出什么结论。[当前关卡配置](../../playtest/water/data/04.json) + +一个可试的草案是给河道两个接球位置。第一个出口很显眼,用弯槽能立刻接住木球;铺完铁球路线才会发现,那块弯槽也用在铁球避水的转角。此时再看河道,玩家有理由问:“如果我让木球继续漂,能不能在下游用直槽接它?”验证这个草案时,记录玩家第一次把弯槽给了谁、看见什么后改了主意,以及换法后能否预测两颗球的去向。这个观察比通关用了多少秒更能判断这道题是否成立。 diff --git a/scripts/README.md b/scripts/README.md index 03e9cca..53cdabc 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -6,7 +6,7 @@ | --- | --- | | [workshop.zsh](workshop.zsh) | 关卡工坊。 | | [showcase.zsh](showcase.zsh) | 展示关卡。 | -| [materials.zsh](materials.zsh) | 三种球的入洞、同风场和加速对照。 | +| [materials.zsh](materials.zsh) | 三种球的入洞和加速对照。 | | [environment.zsh](environment.zsh) | 水流、冰块与墙面实验;双击入口 `Environment.command`。 | | [tutorial.zsh](tutorial.zsh) | 五个教学关;`--lesson 1–5` 供作者直接检查指定关。 | | [playtest.zsh](playtest.zsh) | 早期试玩。 | @@ -30,7 +30,7 @@ 弯槽合并专项:`./scripts/run.zsh test-turn-merge`,检查统一菜单/配额、四个朝向的通行,以及旧 V1/V2 存档转换后的路线、球心和来向。 -按需构建、检查和截图:`./scripts/run.zsh build`、`test`、`capture`;基础集合使用 `baseline-build` / `baseline-test`。普通启动不执行整套实验,仅导入变化的资源。 +按需构建、检查和截图:`./scripts/run.zsh build`、`test`、`capture`;基础集合使用 `baseline-build`。早期 `baseline-test` 及其三组过时检查已删除,不再提供运行入口。普通启动不执行整套实验,仅导入变化的资源。 使用已有 `.venv`,不调整 uv 配置。引擎与 Blender 可分别用 `INTOHOLE_GODOT`、`INTOHOLE_BLENDER` 指定。日志写入 `playtest/artifacts/`。 diff --git a/scripts/python/baseline.py b/scripts/python/baseline.py index 59bcfb9..e3604d5 100644 --- a/scripts/python/baseline.py +++ b/scripts/python/baseline.py @@ -71,7 +71,7 @@ def ensure_imported(godot: Path) -> None: def main() -> None: parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('command', nargs='?', default='play', choices=['doctor','build','play','merge','test','capture']) + parser.add_argument('command', nargs='?', default='play', choices=['doctor','build','play','merge','capture']) args = parser.parse_args() godot = executable('godot') if args.command == 'doctor': @@ -92,12 +92,6 @@ def main() -> None: scenarios = json.loads((ROOT/'playtest/baseline/data/scenarios.json').read_text()) index = next(i for i, scenario in enumerate(scenarios) if scenario['id'] == 'dual_merge') run(common+['--scene','res://playtest/baseline/scenes/main.tscn','--',f'--scenario={index}'],'merge',live=True) - elif args.command == 'test': - import_assets(godot) - run(common+['--headless','--fixed-fps','120','--script','res://playtest/baseline/checks/validate_physics.gd'],'physics_test') - run(common+['--headless','--fixed-fps','120','--script','res://playtest/baseline/checks/validate_playtest.gd'],'playtest_test') - run(common+['--headless','--fixed-fps','120','--script','res://playtest/baseline/checks/validate_merge.gd'],'merge_test') - print('Validation reports:', VALIDATION) else: run(common+['--scene','res://playtest/baseline/scenes/main.tscn','--',f'--capture={VALIDATION / "playtest_preview.png"}'],'capture') print('Preview:', VALIDATION/'playtest_preview.png') diff --git a/scripts/run.zsh b/scripts/run.zsh index 2a8a17d..ae768db 100755 --- a/scripts/run.zsh +++ b/scripts/run.zsh @@ -5,7 +5,7 @@ cd "$INTOHOLE_ROOT" export PYTHONDONTWRITEBYTECODE=1 case "${1:-workshop}" in -h|--help) - print 'Usage: ./scripts/run.zsh [workshop|showcase|materials|environment|test-environment|capture-environment|water|ice|test-elements|tutorial|playtest|merge|doctor|build|test|test-balls|test-tutorial|test-player-controls|test-turn-merge|test-floating|test-alignment|capture-tutorial|capture|baseline-build|baseline-test]' + print 'Usage: ./scripts/run.zsh [workshop|showcase|materials|environment|test-environment|capture-environment|water|ice|test-elements|tutorial|playtest|merge|doctor|build|test|test-balls|test-tutorial|test-player-controls|test-turn-merge|test-floating|test-alignment|capture-tutorial|capture|baseline-build]' exit 0 ;; esac INTOHOLE_ACTION="${1:-workshop}" @@ -19,7 +19,6 @@ case "$INTOHOLE_ACTION" in playtest) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py play "$@" ;; merge|doctor) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py "$INTOHOLE_ACTION" "$@" ;; baseline-build) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py build "$@" ;; - baseline-test) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py test "$@" ;; workshop|showcase|materials|environment|test-environment|capture-environment|water|ice|test-elements|tutorial|build|test|test-balls|test-tutorial|test-player-controls|test-turn-merge|test-floating|test-alignment|capture-tutorial|capture) exec "$INTOHOLE_PYTHON" scripts/python/studio.py "$INTOHOLE_ACTION" "$@" ;; *) print -u2 "Unknown action: $INTOHOLE_ACTION"; exit 2 ;;