Compare commits

...

33 Commits

Author SHA1 Message Date
Codex d0e3a8d551 Reset phone-game progress on every launch 2026-10-30 17:31:47 +02:00
Codex b572e0bf50 Connect the spare-key story and add flashlight-dependent stair descent 2026-10-30 14:59:20 +02:00
Codex d1c1375395 Establish mother's letter request in the first call 2026-10-30 14:23:05 +02:00
Codex 69d608765c Gate phone dialogue on heard discoveries and fix memory display 2026-10-30 13:39:50 +02:00
Codex b437475b75 Normalize bundled font license whitespace 2026-10-30 13:11:59 +02:00
Codex c60ba40e9b Polish phone typography and add black-screen redial epilogue 2026-10-30 13:11:25 +02:00
Codex aa45c6c0bd Remove request cancellation and protect the final mother dialogue 2026-10-30 12:49:18 +02:00
Codex 2476242d27 Remove marked menu captions and audio credits text 2026-10-30 12:35:31 +02:00
Codex 2df499ab7a Add centered main menu with bokeh backdrop and Escape navigation 2026-10-30 12:31:52 +02:00
Codex 1a90e1ad21 Raise siren volume and simplify the call screen 2026-10-30 12:26:10 +02:00
Codex 5b8d60b1f6 Extend pre-impact pause and synchronize both call timers 2026-10-30 01:49:04 +02:00
Codex 56d9af9d2e Redesign phone calls with a responsive word cloud and user siren 2026-10-30 01:38:31 +02:00
Codex 6549ba9308 Improve phone ambience and dialogue flow; keep stairwell intact 2026-10-30 01:03:42 +02:00
Codex eaefde2e07 Voice mother with Carol and synchronize all call events 2026-10-30 00:43:57 +02:00
Codex 23d4e49468 Complete Jessica voiceover for Katya and build DoOtboy 0.2.1 2026-10-30 00:23:30 +02:00
Codex b36d5acc8b Preserve Jessica voice samples and pending Katya voiceover 2026-10-29 22:45:42 +02:00
Codex 39f9af7b53 Add timed friend messages before and after the call breaks 2026-10-29 22:36:22 +02:00
Codex 2b2cc8686a Build ten-call DoOtboy phone narrative with draft Russian voices 2026-10-29 22:31:17 +02:00
JariKo 3bb991ae8f Revert idle arcade experiment and restore previous gameplay 2026-10-29 21:45:14 +02:00
JariKo 92f5135f9d Merge remote-tracking branch 'origin/main' 2026-10-29 21:39:41 +02:00
JariKo d7514e2f14 Add click-powered idle arcade abilities and roaming helpers 2026-10-29 21:39:15 +02:00
Codex 59cc83c552 Fix DoOtboy timed choices, validate UI endings and rename Katya 2026-10-29 21:36:20 +02:00
JariKo 7906dc6cec Record refreshed Windows build and verified Meshy apparatus 2026-10-29 21:16:30 +02:00
JariKo c843263c0a Add Do Otboy Godot apartment time-loop prototype 2026-10-29 17:27:47 +02:00
JariKo 12a360c0ea Document Meshy apparatus provenance and verified Windows build 2026-10-29 16:34:18 +02:00
JariKo 4ca0c2a899 Integrate five Meshy apparatus with fitted soul poses and anchored restraints 2026-10-29 16:31:02 +02:00
JariKo 4a8bcd13f1 Add matching multiview concepts for remaining five apparatus 2026-10-29 15:38:33 +02:00
JariKo b9751f3b52 Record verified Windows build with halved walking arm swing 2026-10-29 13:31:54 +02:00
JariKo 078cc5bb24 Halve walking arm swing for heroine and helpers 2026-10-29 13:29:58 +02:00
JariKo f60b87e725 Record packaged 65-second performance verification and soak commands 2026-10-29 13:20:20 +02:00
JariKo f4a01058d6 Fix delayed FPS collapse from dense imp collision recovery and repeated routing 2026-10-29 13:16:22 +02:00
JariKo e031595dc4 Record verified Windows build with incremental F5 and maiden optimizations 2026-10-29 12:48:58 +02:00
JariKo c48761ef20 Make F5 incremental and reduce iron maiden geometry, physics and idle updates 2026-10-29 12:47:09 +02:00
309 changed files with 20473 additions and 110 deletions
+1
View File
@@ -7,6 +7,7 @@
!/AGENTS.md !/AGENTS.md
!/PROJECT_NOTES.md !/PROJECT_NOTES.md
!/Demon_v0.19/ !/Demon_v0.19/
!/DoOtboy/
!/tools/ !/tools/
# Godot generated state, local exports and test output. # Godot generated state, local exports and test output.
+10
View File
@@ -1,5 +1,15 @@
# Succubus model credits # Succubus model credits
## Five apparatus models v01 (2026-10-29)
Pillory, stretching rack, wheel with water vat, musical chair and cauldron:
generated through Meshy image-to-3d from project concept art corrected using
built-in image_gen. Source GLBs retain PBR 4K; local Blender preparation sets
game scale, splits moving parts and exports PBR 2K. Water, effects, live cuffs,
chains, mechanical axes and final soul poses are implemented in the project.
Task IDs, original assets, previews, prompts and reproduction details:
tools/model_sources/equipment_meshy_v01/README.md and generation.json.
## Iron maiden v01 (2026-10-28) ## Iron maiden v01 (2026-10-28)
Generated using Meshy from the user-approved project concept art. Resource: Generated using Meshy from the user-approved project concept art. Resource:
+9 -1
View File
@@ -1,5 +1,13 @@
# Demon 0.19 — уровень и экономика # Demon 0.19 — уровень и экономика
## Орудия Meshy — 29 октября
Колодки, дыба, колесо с чаном, музыкальный стул и котёл получили новые
текстурированные модели. Динамики стула направлены к голове, ноги стоят на
опоре. Колесо и валики вращаются отдельно от корпуса, вода остаётся в ёмкостях.
На каждом из шести орудий манжеты и цепи закрепляют кисти и лодыжки души.
Посадка проверена на всех десяти персонажах, включая контакт стоп и бёдер.
## Рабочие изменения 28 октября ## Рабочие изменения 28 октября
- Пробел пропускает вступительную кат-сцену: останавливает голос и возвращает игровую камеру и управление. - Пробел пропускает вступительную кат-сцену: останавливает голос и возвращает игровую камеру и управление.
@@ -18,7 +26,7 @@
Запуск: Demon.exe. Godot для игры устанавливать не нужно. Запуск: Demon.exe. Godot для игры устанавливать не нужно.
F5 — добавить 1000 золота, выставить максимальный опыт (уровень 10) и заполнить запас душ до 10 000 000. Повторные нажатия не дублируют очки навыков. F5 — добавить 1000 золота, 1000 душ и один уровень (до уровня 10). За новый уровень даётся одно очко навыков; на максимальном уровне добавляются только валюты. Удержание клавиши не повторяет бонус.
- Внизу появилась полоса опыта с уровнем и свободными очками навыков. - Внизу появилась полоса опыта с уровнем и свободными очками навыков.
- За золото покупаются новые типы орудий и их экземпляры. Улучшения, закалка и ранги орудий удалены из гримуара, строительства и расчёта наград. - За золото покупаются новые типы орудий и их экземпляры. Улучшения, закалка и ранги орудий удалены из гримуара, строительства и расчёта наград.
+6
View File
@@ -1,5 +1,11 @@
# Визуальные референсы 0.17 # Визуальные референсы 0.17
Обновление 29 октября 2026: рабочие модели всех шести орудий теперь используют
Meshy-геометрию и PBR из игровых концептов. Подготовленные референсы, задачи
и игровые кадры: tools/model_sources/equipment_meshy_v01/README.md.
Вода, эффекты и живые крепления добавлены отдельно. Ниже сохранена история
визуальных исследований прежних процедурных моделей.
Изображения изучены как референсы конструкции и пропорций. В сборку не включены чужие фотографии или текстуры: модели, геометрия, вода и эффекты созданы кодом проекта. Изображения изучены как референсы конструкции и пропорций. В сборку не включены чужие фотографии или текстуры: модели, геометрия, вода и эффекты созданы кодом проекта.
- [Science Museum Group: Ecclesiastical pillory, 1601–1800](https://collection.sciencemuseumgroup.org.uk/objects/co155179/ecclesiastical-pillory) — шарнирная деревянная доска с отверстиями для головы и кистей, железные крепления. - [Science Museum Group: Ecclesiastical pillory, 1601–1800](https://collection.sciencemuseumgroup.org.uk/objects/co155179/ecclesiastical-pillory) — шарнирная деревянная доска с отверстиями для головы и кистей, железные крепления.
+31 -5
View File
@@ -6,13 +6,23 @@ var ropes=[]
var heat_materials=[] var heat_materials=[]
var heat_light: OmniLight3D var heat_light: OmniLight3D
var heat=0.0 var heat=0.0
var applied_heat=-1.0
var tension=0.0 var tension=0.0
var submerged=false var submerged=false
var splash_count=0 var splash_count=0
var drops=[] var drops=[]
var wheel_cuffs=[] var wheel_cuffs=[]
var restraints
func setup(game,development): func setup(game,development):
g=game;d=development g=game;d=development
if d.device.get_meta("apparatus_model","")=="meshy_equipment_v01":
restraints=preload("res://apparatus_restraints.gd").new();restraints.setup(g,d)
if d.selected==2:
water=preload("res://water_surface.gd").new().build(g,d.device,1.29,Vector3(0,.87,.18),false)
water.scale.z=.76
for i in range(14):
var drop=g.ball(d.device,Vector3.ZERO,Vector3(.035,.075,.035),Color("9cbab9"));drop.hide();drops.append(drop)
return
if d.selected==1: if d.selected==1:
for x in [-0.42,0.42]: for x in [-0.42,0.42]:
for z in [-1.42,1.42]: for z in [-1.42,1.42]:
@@ -54,12 +64,32 @@ func setup(game,development):
if n.material_override is StandardMaterial3D:mat.set_shader_parameter("tint",n.material_override.albedo_color) if n.material_override is StandardMaterial3D:mat.set_shader_parameter("tint",n.material_override.albedo_color)
n.material_override=mat;heat_materials.append(mat) n.material_override=mat;heat_materials.append(mat)
heat_light=OmniLight3D.new();d.device.add_child(heat_light);heat_light.position=Vector3(0,1,0.8);heat_light.light_color=Color("ff5819");heat_light.omni_range=3;heat_light.light_energy=0 heat_light=OmniLight3D.new();d.device.add_child(heat_light);heat_light.position=Vector3(0,1,0.8);heat_light.light_color=Color("ff5819");heat_light.omni_range=3;heat_light.light_energy=0
restraints=preload("res://apparatus_restraints.gd").new();restraints.setup(g,d)
func reset(): func reset():
tension=0;heat=0;submerged=false tension=0;heat=0;submerged=false
if d.selected==3:apply_heat()
func apply_heat():
if is_equal_approx(heat,applied_heat):return
applied_heat=heat
for mat in heat_materials:mat.set_shader_parameter("heat",heat)
heat_light.visible=heat>.001
if d.device.get_meta("apparatus_model","")=="iron_maiden_v01":
heat_light.light_color=Color("ff2510").lerp(Color("ffad48"),smoothstep(.55,1.0,heat))
heat_light.light_energy=pow(heat,1.5)*3.2
else:heat_light.light_energy=heat*0.9
func update(dt,active): func update(dt,active):
var i=g.index_of(g.working) var i=g.index_of(g.working)
if restraints:restraints.update(g.souls[i].visual if i>=0 else null)
if d.device.has_meta("handle_rotor"):
var rotor=d.device.get_meta("handle_rotor")
if d.selected==2:rotor.rotation.z=d.crank.rotation.z
elif d.selected==1:
for part_name in ["HeadRoller","FootRoller"]:
var roller=d.device.find_child(part_name,true,false)
if roller:roller.rotation.x=d.crank.rotation.z
if d.selected==1 and i>=0: if d.selected==1 and i>=0:
tension=move_toward(tension,clampf(d.elapsed,0,1) if d.stage==0 else 1.0,dt*2) tension=move_toward(tension,clampf(d.elapsed,0,1) if d.stage==0 else 1.0,dt*2)
var s=g.souls[i] var s=g.souls[i]
@@ -88,8 +118,4 @@ func update(dt,active):
var target=clampf(d.elapsed/3.0,0,1) if i>=0 and d.stage>0 else 0.0 var target=clampf(d.elapsed/3.0,0,1) if i>=0 and d.stage>0 else 0.0
if d.release_clock>0:target=heat if d.release_clock>0:target=heat
heat=move_toward(heat,target,dt*(1.5 if target>heat else 0.3)) heat=move_toward(heat,target,dt*(1.5 if target>heat else 0.3))
for mat in heat_materials:mat.set_shader_parameter("heat",heat) apply_heat()
if d.device.get_meta("apparatus_model","")=="iron_maiden_v01":
heat_light.light_color=Color("ff2510").lerp(Color("ffad48"),smoothstep(.55,1.0,heat))
heat_light.light_energy=pow(heat,1.5)*3.2
else:heat_light.light_energy=heat*0.9
+78
View File
@@ -0,0 +1,78 @@
extends Node3D
# Every live restraint has a body endpoint and an apparatus endpoint.
var g
var d
var bindings=[]
static var link_mesh: TorusMesh
static var link_material: StandardMaterial3D
func setup(game,state):
g=game;d=state;name="LiveRestraints"
d.device.add_child(self)
if link_mesh==null:
link_mesh=TorusMesh.new();link_mesh.inner_radius=.017;link_mesh.outer_radius=.027;link_mesh.rings=8;link_mesh.ring_segments=6
link_material=StandardMaterial3D.new();link_material.albedo_color=Color("605342");link_material.metallic=.85;link_material.roughness=.43
for side in ["L","R"]:
var sx=1.0 if side=="L" else -1.0
for wrist in [true,false]:
var bone=("wrist." if wrist else "foot.")+side
var parent_bone=("lowerarm01." if wrist else "lowerleg01.")+side
var cuff=preload("res://leather_cuff.gd").make(g,self,Vector3.ZERO,.080 if wrist else .095)
cuff.name="WristCuff"+side if wrist else "AnkleCuff"+side
var anchor=Marker3D.new();anchor.name="Anchor"+bone.replace(".","")
var support=d.crank if d.selected==2 else d.device
support.add_child(anchor)
anchor.position=anchor_at(d.selected,sx,wrist)
var eye=MeshInstance3D.new();eye.mesh=link_mesh;eye.material_override=link_material;support.add_child(eye);eye.position=anchor.position;eye.scale=Vector3.ONE*2
eye.rotation.x=PI/2
eye.set_meta("no_walk_collision",true)
eye.set_meta("apparatus_restraint",true);eye.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
var chain=MultiMeshInstance3D.new();add_child(chain);chain.name="Chain"+bone.replace(".","")
var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=link_mesh;mm.instance_count=24;chain.multimesh=mm;chain.material_override=link_material
chain.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
bindings.append({"bone":bone,"parent_bone":parent_bone,"cuff":cuff,"anchor":anchor,"chain":chain,"eye":eye,"start":Vector3.ZERO,"end":Vector3.ZERO})
# No restraint geometry participates in NPC walking physics.
for mesh in find_children("*","MeshInstance3D",true,false):
mesh.set_meta("no_walk_collision",true);mesh.set_meta("apparatus_restraint",true);mesh.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
hide()
func anchor_at(kind,sx,wrist):
match kind:
0:return Vector3(sx*.59,1.70,0) if wrist else Vector3(sx*.35,.14,-.55)
1:return Vector3(sx*.42,1.16,-1.42 if wrist else 1.42)
2:return Vector3(sx*.74,.74 if wrist else -.74,.10)
3:return Vector3(sx*.40,1.40,-.30) if wrist else Vector3(sx*.25,.35,-.25)
4:return Vector3(sx*.61,1.06,.20) if wrist else Vector3(sx*.23,.30,.48)
return Vector3(sx*1.25,1.65,.15) if wrist else Vector3(sx*.35,.45,-.35)
func update(soul):
visible=soul!=null
for binding in bindings:
binding.eye.visible=visible
if not visible:continue
var at=to_local(soul.bone_world(binding.bone))
var toward=to_local(soul.bone_world(binding.parent_bone))-at
var axis=toward.normalized()
binding.cuff.position=at+axis*.045
binding.cuff.quaternion=Quaternion(Vector3.UP,axis)
var start=binding.cuff.position
var end=to_local(binding.anchor.global_position)
binding.start=start;binding.end=end
var length=start.distance_to(end)
var count=clampi(ceili(length/.043),2,24)
binding.chain.multimesh.visible_instance_count=count
var down=global_basis.inverse()*Vector3.DOWN
var sag=minf(.10,length*.10)
for j in range(count):
var t=(j+.5)/float(count)
var point=start.lerp(end,t)+down*sin(t*PI)*sag
var tangent=(end-start+down*cos(t*PI)*sag*PI).normalized()
if tangent.length_squared()<.001:tangent=Vector3.UP
var q=Quaternion(Vector3.FORWARD,tangent)*Quaternion(Vector3.FORWARD,PI/2 if j%2 else 0.0)
var scale_z=maxf(.65,length/maxi(count,1)/.047)
binding.chain.multimesh.set_instance_transform(j,Transform3D(Basis(q).scaled(Vector3(.70,1,scale_z)),point))
func _process(_dt):
if g==null or d==null or g.paused:return
var soul_id=d.get("soul",-1) if d is Dictionary else g.working
var placement=d.get("placement",0.0) if d is Dictionary else d.placement_clock
var i=g.index_of(soul_id)
update(g.souls[i].visual if i>=0 and placement<=0 else null)
func _exit_tree():
g=null;d=null
@@ -0,0 +1,23 @@
# Iron maiden physics mesh
The visible Meshy model is unchanged. These three concave shapes retain the hollow
body and the two separate moving doors, with small surface detail removed from
physics using a 12 cm world-space vertex grid and duplicate-triangle removal.
| Part | Render triangles | Collision triangles |
| --- | ---: | ---: |
| Body | 63,260 | 2,308 |
| Left door | 13,921 | 579 |
| Right door | 13,895 | 592 |
Generated from the committed `iron_maiden.glb` with
`tools/bake_maiden_collision.gd`. Run from the repository root:
```powershell
& tools/godot/Godot_v4.3-stable_win64_console.exe --path Demon_v0.19 --script "$PWD/tools/bake_maiden_collision.gd"
```
`iron_maiden.gd` attaches these shapes to the corresponding visible mesh nodes.
`mesh_walking.gd` uses them in the playable room; door transforms move the shapes
with their hinges. Background rooms use separate mesh-derived convex pieces to
avoid costly triangle contact recovery for decorative imps.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,36 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://drlakfturx763"
path="res://.godot/imported/cauldron.glb-69377aa72ab7e693d61fe8d785e2c7dd.scn"
[deps]
source_file="res://art/equipment/meshy_v01/cauldron.glb"
dest_files=["res://.godot/imported/cauldron.glb-69377aa72ab7e693d61fe8d785e2c7dd.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 626 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfkvm1rx3tylp"
path="res://.godot/imported/cauldron_Image_0.jpg-82af0cd9433e9561d24468926485625b.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "6ee5dc18888323a6375f02276d279650"
}
[deps]
source_file="res://art/equipment/meshy_v01/cauldron_Image_0.jpg"
dest_files=["res://.godot/imported/cauldron_Image_0.jpg-82af0cd9433e9561d24468926485625b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cios14t5t1hw4"
path="res://.godot/imported/cauldron_Image_1.jpg-e99b360e5d3d18a76559bcc70d11c9d6.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "8bb9e79b81725f84506c60cfee598d4a"
}
[deps]
source_file="res://art/equipment/meshy_v01/cauldron_Image_1.jpg"
dest_files=["res://.godot/imported/cauldron_Image_1.jpg-e99b360e5d3d18a76559bcc70d11c9d6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1bmb44kdd73e"
path="res://.godot/imported/cauldron_Image_2.jpg-5f648f294b1219d92b9678b0b8d5933d.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "b756803f20db251c2ba4d0dc3b6e7cf7"
}
[deps]
source_file="res://art/equipment/meshy_v01/cauldron_Image_2.jpg"
dest_files=["res://.godot/imported/cauldron_Image_2.jpg-5f648f294b1219d92b9678b0b8d5933d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
@@ -0,0 +1,106 @@
{
"pillory": {
"source_sha256": "551d87b892e8e8cc67906791de5d0f8cb95640227f78aaed5e4bf38bc5b27d93",
"game_sha256": "72bb7ea9c5220236e7133773254e8f5a7d0efff97d2258f6966a01cc88e257d3",
"triangles": 15210,
"blender_bounds": [
[
-0.989691972732544,
-0.9544674754142761,
-0.000264640839304775
],
[
0.9891226291656494,
0.9544674754142761,
2.479335308074951
]
],
"parts": [
"Body",
"UpperYoke"
]
},
"rack": {
"source_sha256": "d5554a28bb812fd8aa0f0492204319f278f05d5024352cc63f393c08cef273df",
"game_sha256": "a1171784e85b1d4dff67d61fe633b797f19b52160f578b1683501afdbc0a4408",
"triangles": 7768,
"blender_bounds": [
[
-0.7920066118240356,
-1.5920144319534302,
-4.083245949004777e-05
],
[
0.7941781878471375,
1.8529947996139526,
1.3078043460845947
]
],
"parts": [
"Body",
"FootRoller",
"HeadRoller"
]
},
"wheel_vat": {
"source_sha256": "44370539c7ed35dea9027c1ed5546cb6f3b9e6cde01a99e837509d2db294051c",
"game_sha256": "b5405b2655ba65855a2c9d0b4988cfead813e91708fe775b2b05dcebaba0f576",
"triangles": 8791,
"blender_bounds": [
[
-1.870709776878357,
-1.6211438179016113,
-0.001041287905536592
],
[
1.8681535720825195,
1.6145036220550537,
2.9022161960601807
]
],
"parts": [
"Body",
"Wheel"
]
},
"musical_chair": {
"source_sha256": "14260d90cc5551932835b7b81e99d3396135435bb85d1c2ce1191f531801d727",
"game_sha256": "cc3c3e54837d51b7baa87bf5d9672f69720c3341c0fe50f76bf8b2bc6cce3e20",
"triangles": 13360,
"blender_bounds": [
[
-1.2581496238708496,
-0.8997828960418701,
0.00028335212846286595
],
[
1.259320855140686,
0.6499825119972229,
2.6508123874664307
]
],
"parts": [
"Body"
]
},
"cauldron": {
"source_sha256": "56a22608fb70daa6ef66b73fea1ab0fe28785f86dcee15a564c49d43a2d1596b",
"game_sha256": "05fc87f954a998865835c143b413ec3467701e284c97b0d2399972e2155531a5",
"triangles": 15207,
"blender_bounds": [
[
-1.7284685373306274,
-1.7284685373306274,
-7.974684558575973e-05
],
[
1.7284685373306274,
1.7284685373306274,
1.8782514333724976
]
],
"parts": [
"Body"
]
}
}
Binary file not shown.
@@ -0,0 +1,36 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b3doll1hqe7ig"
path="res://.godot/imported/musical_chair.glb-44ddcd0732b9d52b2fa32e427c5d5480.scn"
[deps]
source_file="res://art/equipment/meshy_v01/musical_chair.glb"
dest_files=["res://.godot/imported/musical_chair.glb-44ddcd0732b9d52b2fa32e427c5d5480.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 735 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b40cr237vbv8n"
path="res://.godot/imported/musical_chair_Image_0.jpg-053de38e3ebeed52d81ac5ed8dac7806.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "086406385e61b0f206b195b8894c4b93"
}
[deps]
source_file="res://art/equipment/meshy_v01/musical_chair_Image_0.jpg"
dest_files=["res://.godot/imported/musical_chair_Image_0.jpg-053de38e3ebeed52d81ac5ed8dac7806.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bf8pgswa0oskd"
path="res://.godot/imported/musical_chair_Image_1.jpg-bc02f0ce5eaec79fe69ebffcaeeef0ca.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "f36c93dfc34dfd7c851abdd909a223bc"
}
[deps]
source_file="res://art/equipment/meshy_v01/musical_chair_Image_1.jpg"
dest_files=["res://.godot/imported/musical_chair_Image_1.jpg-bc02f0ce5eaec79fe69ebffcaeeef0ca.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bmvoet4vx8fjb"
path="res://.godot/imported/musical_chair_Image_2.jpg-f34858caf80958636f5d5dbe10ae09eb.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "8857baf43123e06660221c508ce26750"
}
[deps]
source_file="res://art/equipment/meshy_v01/musical_chair_Image_2.jpg"
dest_files=["res://.godot/imported/musical_chair_Image_2.jpg-f34858caf80958636f5d5dbe10ae09eb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
@@ -0,0 +1,36 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://crvrmwu5h8o4l"
path="res://.godot/imported/pillory.glb-3dcbfc4dcba47871a6c80e600341d667.scn"
[deps]
source_file="res://art/equipment/meshy_v01/pillory.glb"
dest_files=["res://.godot/imported/pillory.glb-3dcbfc4dcba47871a6c80e600341d667.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7worlr2b0lpb"
path="res://.godot/imported/pillory_Image_0.jpg-f12800529c7e9abdaadf80f66c4f5095.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "2797b7ab3249206940e9e30deea71f63"
}
[deps]
source_file="res://art/equipment/meshy_v01/pillory_Image_0.jpg"
dest_files=["res://.godot/imported/pillory_Image_0.jpg-f12800529c7e9abdaadf80f66c4f5095.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://miub4jdgd3ct"
path="res://.godot/imported/pillory_Image_1.jpg-df6eed64384ef131ad02abf65497ffba.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "ff11e9ab6c4a5a1cbb15907e0bb4ebab"
}
[deps]
source_file="res://art/equipment/meshy_v01/pillory_Image_1.jpg"
dest_files=["res://.godot/imported/pillory_Image_1.jpg-df6eed64384ef131ad02abf65497ffba.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djrjxks4ryfmh"
path="res://.godot/imported/pillory_Image_2.jpg-d892275a93da1cf049a85939b9d04ab3.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "bb1f882658b98ec12602f9f919a3e74e"
}
[deps]
source_file="res://art/equipment/meshy_v01/pillory_Image_2.jpg"
dest_files=["res://.godot/imported/pillory_Image_2.jpg-d892275a93da1cf049a85939b9d04ab3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
@@ -0,0 +1,36 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cg81un3gx8vu"
path="res://.godot/imported/rack.glb-989e29f95696746d85e72a29495d739c.scn"
[deps]
source_file="res://art/equipment/meshy_v01/rack.glb"
dest_files=["res://.godot/imported/rack.glb-989e29f95696746d85e72a29495d739c.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bb1im4sv73m4b"
path="res://.godot/imported/rack_Image_0.jpg-fad20199066b9d751e3f57917fe3afdb.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "b9968a01354976592dc664f40c5c65af"
}
[deps]
source_file="res://art/equipment/meshy_v01/rack_Image_0.jpg"
dest_files=["res://.godot/imported/rack_Image_0.jpg-fad20199066b9d751e3f57917fe3afdb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgkmfche66oq8"
path="res://.godot/imported/rack_Image_1.jpg-8514a5d44e4dbb4fde8b0c443373b417.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "818512251bccd984a81a5ae35d9a67f9"
}
[deps]
source_file="res://art/equipment/meshy_v01/rack_Image_1.jpg"
dest_files=["res://.godot/imported/rack_Image_1.jpg-8514a5d44e4dbb4fde8b0c443373b417.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://brvfilnf78g2q"
path="res://.godot/imported/rack_Image_2.jpg-a8cc7dbd72e863807a3d40c2370bf828.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "81d3f27df087e35e15e145abec941b98"
}
[deps]
source_file="res://art/equipment/meshy_v01/rack_Image_2.jpg"
dest_files=["res://.godot/imported/rack_Image_2.jpg-a8cc7dbd72e863807a3d40c2370bf828.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
@@ -0,0 +1,36 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cj05be3eovqpi"
path="res://.godot/imported/wheel_vat.glb-5ad411385cf592451d7717ff095a7c8a.scn"
[deps]
source_file="res://art/equipment/meshy_v01/wheel_vat.glb"
dest_files=["res://.godot/imported/wheel_vat.glb-5ad411385cf592451d7717ff095a7c8a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 743 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dxxywvhhscsd5"
path="res://.godot/imported/wheel_vat_Image_0.jpg-977680068d04ba05c89d52364f16bba1.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "0704f24e6ab18d8042532693a0adeb5f"
}
[deps]
source_file="res://art/equipment/meshy_v01/wheel_vat_Image_0.jpg"
dest_files=["res://.godot/imported/wheel_vat_Image_0.jpg-977680068d04ba05c89d52364f16bba1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0mndbbij1ad5"
path="res://.godot/imported/wheel_vat_Image_1.jpg-20e9df67cdc82171578c564c93d7671a.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "897efcbe541ea93de7d8d6e9f668b427"
}
[deps]
source_file="res://art/equipment/meshy_v01/wheel_vat_Image_1.jpg"
dest_files=["res://.godot/imported/wheel_vat_Image_1.jpg-20e9df67cdc82171578c564c93d7671a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cx5cnmxxhmljc"
path="res://.godot/imported/wheel_vat_Image_2.jpg-6316f58d34b1a98c8f038e640237e212.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "e847bf4c95eb5e3728c81cdbeb4be2c8"
}
[deps]
source_file="res://art/equipment/meshy_v01/wheel_vat_Image_2.jpg"
dest_files=["res://.godot/imported/wheel_vat_Image_2.jpg-6316f58d34b1a98c8f038e640237e212.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
+3 -3
View File
@@ -119,9 +119,9 @@ func reward(amount=20):
func test_boost(): func test_boost():
g.coins+=1000 g.coins+=1000
g.essence=preload("res://progression.gd").MAX_RESOURCE g.essence+=1000
xp=Economy.XP_THRESHOLDS.back() var current=Economy.level(xp)
points=maxi(0,Economy.XP_THRESHOLDS.size()-1-g.speed_level-action_level-leadership) if current<Economy.XP_THRESHOLDS.size():reward(Economy.XP_THRESHOLDS[current]-xp)
g.refresh_ui() g.refresh_ui()
g.save_progress() g.save_progress()
g.say("Казна одобрила внеплановое финансирование.") g.say("Казна одобрила внеплановое финансирование.")
+13 -8
View File
@@ -85,20 +85,25 @@ func run(g):
Input.parse_input_event(key) Input.parse_input_event(key)
await g.get_tree().process_frame await g.get_tree().process_frame
check(g.coins==cash+2000,"F5 adds exactly 1000 per key press") check(g.coins==cash+2000,"F5 adds exactly 1000 per key press")
check(g.essence==g.Progression.MAX_RESOURCE and dev.xp==E.XP_THRESHOLDS.back() and E.level(dev.xp)==10,"F5 fills souls and maximum experience") check(g.essence==2000 and dev.xp==210 and E.level(dev.xp)==3,"two F5 presses add 2000 souls and exactly two levels")
check(dev.points==9,"F5 grants maximum available skill points") check(dev.points==2,"one skill point granted per gained level")
w.upgrade("speed");w.upgrade("power");w.upgrade("leadership") w.upgrade("speed");w.upgrade("power")
check(dev.points==6,"three learned skills consume three points") check(dev.points==0,"learned skills consume earned points")
g.essence=12;cash=g.coins;dev.test_boost() g.essence=12;cash=g.coins;dev.xp=250;dev.test_boost()
check(g.coins==cash+1000 and g.essence==g.Progression.MAX_RESOURCE and dev.points==6,"repeat boost refills souls without duplicating skill points") check(g.coins==cash+1000 and g.essence==1012 and dev.xp==370 and dev.points==1,"partial-level progress advances to next level; souls are added")
w.upgrade("leadership")
for i in range(10):dev.test_boost()
check(E.level(dev.xp)==10 and dev.points==6,"repeated boosts stop at maximum level without duplicate points")
var soul_cash=g.essence;cash=g.coins;dev.test_boost()
check(g.coins==cash+1000 and g.essence==soul_cash+1000 and dev.points==6,"at level cap both wallets still gain 1000 and points stay fixed")
var repeat=InputEventKey.new();repeat.keycode=KEY_F5;repeat.physical_keycode=KEY_F5;repeat.pressed=true;repeat.echo=true var repeat=InputEventKey.new();repeat.keycode=KEY_F5;repeat.physical_keycode=KEY_F5;repeat.pressed=true;repeat.echo=true
cash=g.coins;Input.parse_input_event(repeat);await g.get_tree().process_frame cash=g.coins;Input.parse_input_event(repeat);await g.get_tree().process_frame
check(g.coins==cash,"holding F5 does not repeatedly grant gold") check(g.coins==cash,"holding F5 does not repeatedly grant gold")
snap=g.progress_snapshot();path="user://qa_f5_v019.json" snap=g.progress_snapshot();path="user://qa_f5_v019.json"
check(g.Progression.write_save(path,snap)==OK,"F5 bonus save written") check(g.Progression.write_save(path,snap)==OK,"F5 bonus save written")
saved=g.Progression.read_save(path,g.build_id);DirAccess.remove_absolute(ProjectSettings.globalize_path(path)) saved=g.Progression.read_save(path,g.build_id);DirAccess.remove_absolute(ProjectSettings.globalize_path(path))
check(saved.essence==g.Progression.MAX_RESOURCE and saved.development.xp==E.XP_THRESHOLDS.back() and saved.development.points==6,"maximum souls, experience and remaining points survive save reload") check(saved.essence==g.essence and saved.development.xp==E.XP_THRESHOLDS.back() and saved.development.points==6,"added souls, experience and remaining points survive save reload")
check(g.gold_value.text==str(g.coins) and g.souls_value.text==str(g.essence),"F5 refreshes both resource counters") check(g.gold_value.text==str(g.coins) and g.souls_value.text==str(g.essence),"F5 refreshes both resource counters")
print("PASS: F5 +1000 gold per press, 10 million souls, maximum experience, no duplicate skill points, held-key protection and save round trip") print("PASS: F5 +1000 gold, +1000 souls, +one level per press, level cap, no duplicate skill points, held-key protection and save round trip")
print("ALL ECONOMY TESTS PASSED — DEMON 0.19 (%d checks)"%checks) print("ALL ECONOMY TESTS PASSED — DEMON 0.19 (%d checks)"%checks)
g.get_tree().quit() g.get_tree().quit()
+6 -1
View File
@@ -168,11 +168,16 @@ func bake_repeated(root,locations):
var n=queue.pop_back() var n=queue.pop_back()
for child in n.get_children():queue.append(child) for child in n.get_children():queue.append(child)
if n is CollisionShape3D: if n is CollisionShape3D:
# Bokeh rooms need solid silhouettes, not triangle-level ornament contact.
# Convex pieces avoid expensive capsule recovery when an imp gets stuck.
var collision=n.shape
var source_mesh=n.get_parent().get_parent()
if source_mesh is MeshInstance3D:collision=source_mesh.mesh.create_convex_shape(true,true)
for location in locations: for location in locations:
if absf(location.y)>.1 or absf(location.z)>20.1 or location.x< -22.1 or location.x>40.1:continue if absf(location.y)>.1 or absf(location.z)>20.1 or location.x< -22.1 or location.x>40.1:continue
var body=StaticBody3D.new();body.collision_layer=2;body.collision_mask=0;g.add_child(body) var body=StaticBody3D.new();body.collision_layer=2;body.collision_mask=0;g.add_child(body)
var tr=n.global_transform;tr.origin+=location;body.transform=tr var tr=n.global_transform;tr.origin+=location;body.transform=tr
var shape=CollisionShape3D.new();shape.shape=n.shape;body.add_child(shape) var shape=CollisionShape3D.new();shape.shape=collision;body.add_child(shape)
if not n is MeshInstance3D or not n.visible:continue if not n is MeshInstance3D or not n.visible:continue
var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=n.mesh;mm.instance_count=locations.size() var mm=MultiMesh.new();mm.transform_format=MultiMesh.TRANSFORM_3D;mm.mesh=n.mesh;mm.instance_count=locations.size()
for i in range(locations.size()): for i in range(locations.size()):
+3
View File
@@ -24,6 +24,9 @@ func build(game,d):
preload("res://new_equipment.gd").new().build(g,d) preload("res://new_equipment.gd").new().build(g,d)
return return
var root=d.device var root=d.device
if d.selected in [0,1,2]:
preload("res://meshy_equipment.gd").new().build(g,d)
return
if d.selected==3: if d.selected==3:
preload("res://iron_maiden.gd").new().build(g,d) preload("res://iron_maiden.gd").new().build(g,d)
return return
+157
View File
@@ -0,0 +1,157 @@
extends RefCounted
var failures=0
var checks=0
var folder=""
func check(ok,label):
checks+=1
if not ok:failures+=1;push_error("EQUIPMENT QA: "+label)
func shot(g,name):
if DisplayServer.get_name()=="headless":return
await g.get_tree().process_frame
await g.get_tree().process_frame
await RenderingServer.frame_post_draw
g.get_viewport().get_texture().get_image().save_png(folder+"/"+name+".png")
func triangles(d):
var faces=PackedVector3Array()
for mesh in d.device.find_children("*","MeshInstance3D",true,false):
if mesh.get_parent().name=="LiveRestraints" or mesh.get_meta("no_walk_collision",false) or not mesh.is_visible_in_tree() or mesh.mesh is QuadMesh:continue
if mesh.mesh is ArrayMesh:
for v in mesh.mesh.get_faces():faces.append(d.device.to_local(mesh.to_global(v)))
return faces
func clear_ray(faces,a,b):
for j in range(0,faces.size(),3):
if Geometry3D.segment_intersects_triangle(a,b,faces[j],faces[j+1],faces[j+2])!=null:return false
return true
func skin_contacts(actor,d):
var feet=PackedVector3Array()
var thighs=PackedVector3Array()
for mesh in actor.model.find_children("*","MeshInstance3D",true,false):
if mesh.skin==null:continue
var matrices=[];var names=[]
for bind in range(mesh.skin.get_bind_count()):
var index=actor.skeleton.find_bone(mesh.skin.get_bind_name(bind))
if index<0:index=mesh.skin.get_bind_bone(bind)
matrices.append(actor.skeleton.get_bone_global_pose(index)*mesh.skin.get_bind_pose(bind))
names.append(actor.skeleton.get_bone_name(index))
for surface in range(mesh.mesh.get_surface_count()):
var arrays=mesh.mesh.surface_get_arrays(surface)
var vertices=arrays[Mesh.ARRAY_VERTEX];var bones=arrays[Mesh.ARRAY_BONES];var weights=arrays[Mesh.ARRAY_WEIGHTS]
for j in range(vertices.size()):
var max_weight=0.0;var dominant=0
for k in range(4):
if weights[j*4+k]>max_weight:max_weight=weights[j*4+k];dominant=bones[j*4+k]
var bone=names[dominant]
var is_foot=bone.begins_with("foot.") or bone.begins_with("toe")
var is_thigh=bone.begins_with("upperleg")
if not is_foot and not is_thigh:continue
var p=Vector3.ZERO
for k in range(4):
if weights[j*4+k]>0:p+=(matrices[bones[j*4+k]]*vertices[j])*weights[j*4+k]
p=d.device.to_local(actor.skeleton.to_global(p))
if is_foot:feet.append(p)
else:thighs.append(p)
return {"feet":feet,"thighs":thighs}
func run(g):
await g.get_tree().create_timer(.3).timeout
g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false
g.hud.hide();g.menu.show_page("")
for imp in g.life.imps+g.life.neighbours:imp.root.hide()
folder="res://captures/equipment-meshy" if OS.has_feature("editor") else OS.get_executable_path().get_base_dir()+"/captures/equipment-meshy"
DirAccess.make_dir_recursive_absolute(folder)
var w=g.workshop
for kind in range(6):
if "--equipment-only=4" in OS.get_cmdline_user_args() and kind!=4:continue
var d=w.add_station(kind,Vector3(3,0,0))
d.motion.restraints.set_process(false)
var original_faces=triangles(d)
check(d.device.get_meta("apparatus_model","") in ["meshy_equipment_v01","iron_maiden_v01"],"prepared model %d"%kind)
if kind==2:
check(absf(d.crank.position.y-1.62)<.01,"wheel origin at axle")
check(d.motion.water!=null and d.motion.water.get_parent()!=d.crank,"water independent from wheel")
var water_before=d.motion.water.transform
d.crank.rotation.z=PI/2
check(d.motion.water.transform==water_before,"turning wheel leaves water stationary")
d.crank.rotation.z=0
if kind==5:
check(d.special.liquid.position.y<1.65 and d.special.liquid.position.y>.5,"liquid below rim above hollow floor")
for soul_kind in range(10):
var actor=g.make_person(false,soul_kind);g.add_child(actor);g.make_ghost(actor,soul_kind);g.set_soul_reveal(actor,1);actor.mount_station(kind)
actor.position=d.device.position;actor.rotation=Vector3.ZERO
if kind==1:actor.rotation.x=-PI/2;actor.position+=Vector3(0,1.04,1.13)
elif kind==2:actor.position+=Vector3(0,.47,.27)
elif kind==3:actor.position+=Vector3(0,.22,0)
elif kind==5:actor.position+=Vector3(0,.45,0);actor.scale=Vector3.ONE*.85
actor.update_torture(.01,false)
d.motion.restraints.update(actor)
check(d.motion.restraints.bindings.size()==4,"four live restraints %d/%d"%[kind,soul_kind])
for binding in d.motion.restraints.bindings:
var body_point=d.motion.restraints.to_local(actor.bone_world(binding.bone))
check(binding.cuff.position.distance_to(body_point)<.06,"cuff follows bone %d/%d/%s"%[kind,soul_kind,binding.bone])
check(binding.end.distance_to(d.motion.restraints.to_local(binding.anchor.global_position))<.001,"chain ends at apparatus")
check(binding.chain.multimesh.visible_instance_count>=2,"chain links visible")
var head=d.device.to_local(actor.bone_world("head"))
if kind in [0,4,5]:
var contacts=skin_contacts(actor,d)
var sole=INF
for p in contacts.feet:sole=minf(sole,p.y)
var floor_y=.10 if kind==0 else (.33 if kind==4 else .40)
check(sole>=floor_y-.01,"actual foot vertices clear base %d/%d min=%f"%[kind,soul_kind,sole])
if kind==4:
if soul_kind==0:print("SEAT_GEOMETRY hip=",actor.bone_local("upperleg01.L")," knee=",actor.bone_local("lowerleg01.L")," ankle=",actor.bone_local("foot.L"))
var penetration=0
for p in contacts.thighs:
if absf(p.x)<.46 and p.z>-.43 and p.z<.125 and p.y<.69:penetration+=1
check(penetration==0,"actual thigh vertices clear cushion %d count=%d"%[soul_kind,penetration])
if kind==0:
for bone in ["head","wrist.L","wrist.R"]:
var at=d.device.to_local(actor.bone_world(bone))
for offset in [-.035,0,.035]:
check(clear_ray(original_faces,Vector3(at.x+offset,at.y,-.3),Vector3(at.x+offset,at.y,.3)),"open aperture clears %d/%s"%[soul_kind,bone])
elif kind==1:
for bone in ["root","spine01","spine02","head"]:
var at=d.device.to_local(actor.bone_world(bone))
check(at.y>.94 and absf(at.z)<1.65,"lying torso above bed %d/%s %s"%[soul_kind,bone,str(at)])
elif kind==2:
check(Vector2(head.x,head.y-1.62).length()<1.28,"head within wheel radius")
for angle in [0.0,PI/2,PI,PI*1.5]:
d.crank.rotation.z=angle
actor.rotation.z=angle;actor.position=d.device.position+Vector3(sin(angle)*1.15,1.62-cos(angle)*1.15,.27)
actor.update_torture(.01,false);d.motion.restraints.update(actor)
var torso=d.device.to_local(actor.bone_world("spine02"))
check(Vector2(torso.x,torso.y-1.62).length()<1.28 and torso.z>.18,"body follows front of wheel through full turn")
if soul_kind==7 and angle in [PI/2,PI]:await shot(g,"wheel-angle-%d"%roundi(rad_to_deg(angle)))
d.crank.rotation.z=0;actor.rotation.z=0;actor.position=d.device.position+Vector3(0,.47,.27);actor.update_torture(0,false)
elif kind==4:
for bone in ["root","upperleg01.L","upperleg01.R"]:
var at=d.device.to_local(actor.bone_world(bone))
check(at.y>.76 and absf(at.x)<.48,"hips clear seat and fit width")
for speaker in d.special.speaker_roots:
var target=d.device.to_local(actor.bone_world("head"))-speaker.position
check(speaker.basis.z.dot(target.normalized())>.92,"speaker points toward actual head")
elif kind==5:
for bone in ["root","spine01","upperleg01.L","upperleg01.R","foot.L","foot.R"]:
var at=d.device.to_local(actor.bone_world(bone))
check(Vector2(at.x,at.z).length()<1.15 and at.y>.40,"submerged body fits cavity %d/%s %s"%[soul_kind,bone,str(at)])
if soul_kind in [0,7]:
d.motion.restraints.update(actor)
g.camera.position=d.device.position+Vector3(4.0,2.8,4.8);g.camera.look_at(d.device.position+Vector3(0,1.25,0));g.camera.size=4.7
await shot(g,"%d-soul-%d"%( [kind,soul_kind] ))
# All four quarter-turns keep body, anchors and cuffs in the same frame.
d.motion.restraints.update(actor)
var before=[]
for binding in d.motion.restraints.bindings:before.append(binding.cuff.global_position-d.device.position)
var initial=actor.transform
for turn in range(4):
d.device.rotation.y=turn*PI/2
actor.transform=Transform3D(Basis(Vector3.UP,turn*PI/2),d.device.position)*Transform3D(initial.basis,initial.origin-d.device.position)
d.motion.restraints.update(actor)
for j in range(4):check(d.motion.restraints.bindings[j].cuff.global_position.distance_to(d.device.position+before[j].rotated(Vector3.UP,turn*PI/2))<.002,"rotation preserves attachment sides")
d.device.rotation.y=0;actor.transform=initial
actor.queue_free()
await g.get_tree().process_frame
d.motion.restraints.update(null)
check(not d.motion.restraints.visible,"empty apparatus hides live cuffs and chains")
w.dispose_station(d);w.stations.erase(d);w.bars.clear()
await g.get_tree().process_frame
if failures==0:print("ALL EQUIPMENT TESTS PASSED (%d): 6 apparatus, 10 souls, apertures, cavities, seat, inward speakers, moving wheel, four rotations, four anchored restraints"%checks)
g.get_tree().quit(1 if failures else 0)
+4 -4
View File
@@ -50,8 +50,8 @@ func run(g):
var forearm=actor.gait.point("wrist."+side)-actor.gait.point("lowerarm01."+side) var forearm=actor.gait.point("wrist."+side)-actor.gait.point("lowerarm01."+side)
var angle=upper.angle_to(forearm);elbow_min=minf(elbow_min,angle);elbow_max=maxf(elbow_max,angle) var angle=upper.angle_to(forearm);elbow_min=minf(elbow_min,angle);elbow_max=maxf(elbow_max,angle)
var swing_direction=upper.normalized().dot(actor.global_basis.z.normalized()) var swing_direction=upper.normalized().dot(actor.global_basis.z.normalized())
if swing_direction>.12:forward_angles+=angle;forward_samples+=1 if swing_direction>.05:forward_angles+=angle;forward_samples+=1
if swing_direction<-.12:back_angles+=angle;back_samples+=1 if swing_direction<-.05:back_angles+=angle;back_samples+=1
cross_sum+=hand_offsets.x*hand_offsets.y;hand_sum+=hand_offsets;samples+=1 cross_sum+=hand_offsets.x*hand_offsets.y;hand_sum+=hand_offsets;samples+=1
for i in range(2): for i in range(2):
var f=actor.gait.feet[i];var actual=actor.gait.point("foot."+f.side) var f=actor.gait.feet[i];var actual=actor.gait.point("foot."+f.side)
@@ -66,8 +66,8 @@ func run(g):
check(max_lift>.08 and planted_frames>150,"alternating lift/support") check(max_lift>.08 and planted_frames>150,"alternating lift/support")
check(hand_max.x-hand_min.x>.12 and hand_max.y-hand_min.y>.12,"both hands swing during locomotion") check(hand_max.x-hand_min.x>.12 and hand_max.y-hand_min.y>.12,"both hands swing during locomotion")
check(cross_sum/samples-(hand_sum.x/samples)*(hand_sum.y/samples)<0,"opposing left/right arm swing") check(cross_sum/samples-(hand_sum.x/samples)*(hand_sum.y/samples)<0,"opposing left/right arm swing")
check(elbow_min<deg_to_rad(23) and elbow_max>deg_to_rad(43) and elbow_max<deg_to_rad(59),"reduced swing still extends beside body and flexes forward") check(elbow_min<deg_to_rad(23) and elbow_max>deg_to_rad(28) and elbow_max<deg_to_rad(39),"half swing still extends beside body and flexes forward")
check(forward_samples>0 and back_samples>0 and forward_angles/maxi(1,forward_samples)>back_angles/maxi(1,back_samples)+deg_to_rad(20),"elbow flexion follows actual forward/backward shoulder swing") check(forward_samples>0 and back_samples>0 and forward_angles/maxi(1,forward_samples)>back_angles/maxi(1,back_samples)+deg_to_rad(9),"elbow flexion follows actual forward/backward shoulder swing")
print("GAIT_METRICS ",JSON.stringify({"scale":actor.scale.x,"speed":speed,"max_slide":max_slide,"max_target_error":max_error,"max_lift":max_lift,"min_contact":min_contact})) print("GAIT_METRICS ",JSON.stringify({"scale":actor.scale.x,"speed":speed,"max_slide":max_slide,"max_target_error":max_error,"max_lift":max_lift,"min_contact":min_contact}))
var phase=actor.gait.phase var phase=actor.gait.phase
for frame in range(30):actor._process(1.0/60) for frame in range(30):actor._process(1.0/60)
+6
View File
@@ -1,6 +1,10 @@
extends RefCounted extends RefCounted
# Meshy shell is split locally at the actual hinge plane, not from the open concept. # Meshy shell is split locally at the actual hinge plane, not from the open concept.
const MODEL=preload("res://art/equipment/iron_maiden_v01/iron_maiden.glb") const MODEL=preload("res://art/equipment/iron_maiden_v01/iron_maiden.glb")
const COLLISIONS={
"Body":preload("res://art/equipment/iron_maiden_v01/collision/body.tres"),
"LeftDoorSurface":preload("res://art/equipment/iron_maiden_v01/collision/left_door_surface.tres"),
"RightDoorSurface":preload("res://art/equipment/iron_maiden_v01/collision/right_door_surface.tres")}
func build(g,d): func build(g,d):
var root=d.device var root=d.device
var model=MODEL.instantiate();root.add_child(model) var model=MODEL.instantiate();root.add_child(model)
@@ -8,7 +12,9 @@ func build(g,d):
d.door=model.find_child("LeftDoor",true,false) d.door=model.find_child("LeftDoor",true,false)
d.second_door=model.find_child("RightDoor",true,false) d.second_door=model.find_child("RightDoor",true,false)
assert(d.door!=null and d.second_door!=null,"Iron maiden requires two independent hinge nodes") assert(d.door!=null and d.second_door!=null,"Iron maiden requires two independent hinge nodes")
for name in COLLISIONS:model.find_child(name,true,false).set_meta("walk_collision_shape",COLLISIONS[name])
preload("res://maiden_interior.gd").new().build(g,model,d.door,d.second_door) preload("res://maiden_interior.gd").new().build(g,model,d.door,d.second_door)
d.door.rotation.y=-1.8;d.second_door.rotation.y=1.8 d.door.rotation.y=-1.8;d.second_door.rotation.y=1.8
d.flame=g.ball(root,Vector3(0,.20,0),Vector3(1.15,.25,.85),Color("ff8735")) d.flame=g.ball(root,Vector3(0,.20,0),Vector3(1.15,.25,.85),Color("ff8735"))
d.flame.material_override=g.mat(Color("ff8735"),true);d.flame.hide() d.flame.material_override=g.mat(Color("ff8735"),true);d.flame.hide()
d.flame.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
+30
View File
@@ -6,6 +6,22 @@ func check(ok,label):
func shot(g,name): func shot(g,name):
await RenderingServer.frame_post_draw await RenderingServer.frame_post_draw
g.get_viewport().get_texture().get_image().save_png(capture_folder+"/"+name+".png") g.get_viewport().get_texture().get_image().save_png(capture_folder+"/"+name+".png")
func collision_check(g,d):
var subject=Node3D.new();g.add_child(subject)
await g.get_tree().physics_frame;await g.get_tree().physics_frame
subject.position=d.device.position+Vector3(0,.35,-3)
g.workshop.mesh_walking.move_actor(subject,Vector3(0,0,5),.25,1.18)
check(subject.position.z<d.device.position.z-.2,"simplified back shell blocks a swept capsule")
subject.position=d.device.position+Vector3(0,.35,2.5)
g.workshop.mesh_walking.move_actor(subject,Vector3(0,0,-2.5),.25,1.18)
check(absf(subject.position.z-d.device.position.z)<.15,"open doors preserve the hollow entrance above the base")
d.door.rotation.y=0;d.second_door.rotation.y=0
await g.get_tree().physics_frame;await g.get_tree().physics_frame
subject.position=d.device.position+Vector3(0,.35,2.5)
g.workshop.mesh_walking.move_actor(subject,Vector3(0,0,-3),.25,1.18)
check(subject.position.z>d.device.position.z+.2,"closed moving doors block entry")
d.door.rotation.y=-1.8;d.second_door.rotation.y=1.8
await g.get_tree().physics_frame;subject.queue_free()
func run(g): func run(g):
await g.get_tree().create_timer(.3).timeout await g.get_tree().create_timer(.3).timeout
g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false
@@ -21,7 +37,11 @@ func run(g):
var surfaces=d.device.find_children("*","MeshInstance3D",true,false) var surfaces=d.device.find_children("*","MeshInstance3D",true,false)
var textured=0 var textured=0
for mesh in surfaces: for mesh in surfaces:
if mesh.get_meta("apparatus_restraint",false):continue
if mesh==d.flame:continue if mesh==d.flame:continue
if mesh.get_meta("no_walk_collision",false):
check(not mesh.has_node("MeshWalkingCollider"),"internal detail does not duplicate shell physics")
check(mesh.cast_shadow==GeometryInstance3D.SHADOW_CASTING_SETTING_OFF,"internal detail skips redundant shadows")
for i in range(mesh.mesh.get_surface_count()): for i in range(mesh.mesh.get_surface_count()):
var mat=mesh.mesh.surface_get_material(i) var mat=mesh.mesh.surface_get_material(i)
if mat is StandardMaterial3D and mat.albedo_texture!=null:textured+=1 if mat is StandardMaterial3D and mat.albedo_texture!=null:textured+=1
@@ -35,6 +55,7 @@ func run(g):
check(outer.get_shader_parameter(map_name)==inner.get_shader_parameter(map_name),"inner and outer share original PBR "+map_name) check(outer.get_shader_parameter(map_name)==inner.get_shader_parameter(map_name),"inner and outer share original PBR "+map_name)
g.camera.position=Vector3(5.8,3.5,3);g.camera.look_at(d.device.position+Vector3(0,1.5,0));g.camera.size=4.5 g.camera.position=Vector3(5.8,3.5,3);g.camera.look_at(d.device.position+Vector3(0,1.5,0));g.camera.size=4.5
await shot(g,"open") await shot(g,"open")
await collision_check(g,d)
for k in range(19): for k in range(19):
d.door.rotation.y=-1.8+float(k)*.1;d.second_door.rotation.y=1.8-float(k)*.1 d.door.rotation.y=-1.8+float(k)*.1;d.second_door.rotation.y=1.8-float(k)*.1
check(d.door.transform.is_finite() and d.second_door.transform.is_finite(),"finite hinge sweep") check(d.door.transform.is_finite() and d.second_door.transform.is_finite(),"finite hinge sweep")
@@ -59,6 +80,15 @@ func run(g):
check(is_equal_approx(d.door.rotation.y,-1.8) and is_equal_approx(d.second_door.rotation.y,1.8),"doors reopen after cooldown") check(is_equal_approx(d.door.rotation.y,-1.8) and is_equal_approx(d.second_door.rotation.y,1.8),"doors reopen after cooldown")
for k in range(25):w.step_station(d,.1,false) for k in range(25):w.step_station(d,.1,false)
check(d.motion.heat<.01 and d.motion.heat_light.light_energy<.01,"incandescence cools back to original metal") check(d.motion.heat<.01 and d.motion.heat_light.light_energy<.01,"incandescence cools back to original metal")
check(not d.motion.heat_light.visible,"cooled heat light leaves rendering")
await shot(g,"cooled") await shot(g,"cooled")
var other=w.add_station(3,Vector3(8,0,0))
var first_detail=d.device.find_child("InnerBackDetail",true,false).get_child(0)
var second_detail=other.device.find_child("InnerBackDetail",true,false).get_child(0)
check(first_detail.mesh==second_detail.mesh,"repeated devices reuse cached detail geometry")
check(first_detail.get_active_material(0)!=second_detail.get_active_material(0),"each device has independent heat material")
var before=other.motion.heat_materials[0].get_shader_parameter("heat")
d.motion.heat=.8;d.motion.apply_heat()
check(other.motion.heat_materials[0].get_shader_parameter("heat")==before,"heating one cached device does not heat its neighbour")
print("IRON MAIDEN QA ","PASSED" if failures==0 else "FAILED",": textured model, hinges, sweep, close/heat/reward/reopen") print("IRON MAIDEN QA ","PASSED" if failures==0 else "FAILED",": textured model, hinges, sweep, close/heat/reward/reopen")
g.get_tree().quit(1 if failures else 0) g.get_tree().quit(1 if failures else 0)
+27 -2
View File
@@ -73,16 +73,32 @@ func burn(s):
burns.append({"root":s.node,"fx":fx,"materials":materials,"t":0.0,"sparks":sparks,"light":light}) burns.append({"root":s.node,"fx":fx,"materials":materials,"t":0.0,"sparks":sparks,"light":light})
func update(dt): func update(dt):
var profiling=g.get_meta("profile_life",false)
var activity_us=0;var movement_us=0;var gait_us=0
var worst={"total_us":0} if profiling else null
activities.update_marks(dt) activities.update_marks(dt)
for imp in imps+neighbours: for imp in imps+neighbours:
if profiling:imp["path_us"]=0;imp["collision_us"]=0
var tick=Time.get_ticks_usec() if profiling else 0
var busy=activities.update(imp,dt) var busy=activities.update(imp,dt)
var activity_cost=Time.get_ticks_usec()-tick if profiling else 0
if profiling:activity_us+=activity_cost;tick=Time.get_ticks_usec()
if not busy: if not busy:
imp.patrol_age+=dt imp.patrol_age+=dt
if imp.root.position.distance_to(imp.patrol_target)<.25 or imp.patrol_age>9: if imp.root.position.distance_to(imp.patrol_target)<.25 or imp.patrol_age>9:
imp.patrol_angle+=1.05;imp.patrol_age=0;imp.patrol_target=patrol_point(imp) imp.patrol_angle+=1.05;imp.patrol_age=0;imp.patrol_target=patrol_point(imp)
if imp.has("origin"):move_neighbour(imp,imp.patrol_target,dt) if imp.has("origin"):move_neighbour(imp,imp.patrol_target,dt)
else:move_imp(imp,imp.patrol_target,dt) else:move_imp(imp,imp.patrol_target,dt)
var movement_cost=Time.get_ticks_usec()-tick if profiling else 0
if profiling:
movement_us+=movement_cost;tick=Time.get_ticks_usec()
if activity_cost+movement_cost>worst.total_us:
worst={"total_us":activity_cost+movement_cost,"number":imp.activity_number,"activity":imp.activity,
"path_us":imp.path_us,"collision_us":imp.collision_us,"position":str(imp.root.position),
"target":str(imp.get("activity_target",imp.patrol_target))}
imp.gait.update(dt,busy and imp.activity_time>0) imp.gait.update(dt,busy and imp.activity_time>0)
if profiling:gait_us+=Time.get_ticks_usec()-tick
if profiling:g.set_meta("life_profile",Vector3(activity_us,movement_us,gait_us));g.set_meta("life_worst",worst)
for i in range(burns.size()-1,-1,-1): for i in range(burns.size()-1,-1,-1):
var b=burns[i];b.t+=dt var b=burns[i];b.t+=dt
for mat in b.materials:mat.set_shader_parameter("progress",b.t/1.7) for mat in b.materials:mat.set_shader_parameter("progress",b.t/1.7)
@@ -102,7 +118,11 @@ func update(dt):
func move_imp(imp,target,dt): func move_imp(imp,target,dt):
var w=g.workshop var w=g.workshop
var destination=w.cell(w.free_floor(target)) var profile_tick=Time.get_ticks_usec() if g.get_meta("profile_life",false) else 0
if imp.get("requested_target")!=target or imp.revision!=w.revision:
imp["requested_target"]=target
imp["resolved_target"]=w.free_floor(target,.36)
var destination=w.cell(imp.resolved_target)
if imp.destination!=destination or imp.revision!=w.revision: if imp.destination!=destination or imp.revision!=w.revision:
imp.destination=destination;imp.revision=w.revision imp.destination=destination;imp.revision=w.revision
var start=w.cell(imp.root.position) var start=w.cell(imp.root.position)
@@ -110,7 +130,8 @@ func move_imp(imp,target,dt):
imp.root.position=w.free_floor(imp.root.position);start=w.cell(imp.root.position);imp.velocity=Vector3.ZERO;imp.gait.reset() imp.root.position=w.free_floor(imp.root.position);start=w.cell(imp.root.position);imp.velocity=Vector3.ZERO;imp.gait.reset()
imp.path=w.nav.get_point_path(start,destination) imp.path=w.nav.get_point_path(start,destination)
if not imp.path.is_empty():imp.path.remove_at(0) if not imp.path.is_empty():imp.path.remove_at(0)
var next=target if profile_tick>0:imp.path_us+=Time.get_ticks_usec()-profile_tick
var next=imp.resolved_target
if not imp.path.is_empty():next=Vector3(imp.path[0].x,0,imp.path[0].y) if not imp.path.is_empty():next=Vector3(imp.path[0].x,0,imp.path[0].y)
var step_dt=minf(dt,.05) var step_dt=minf(dt,.05)
var desired_velocity=(next-imp.root.position).normalized()*1.25 var desired_velocity=(next-imp.root.position).normalized()*1.25
@@ -127,7 +148,9 @@ func move_imp(imp,target,dt):
desired_velocity+=(delta.normalized() if delta.length_squared()>.0001 else Vector3.RIGHT)*1.4*(1-delta.length()/.72) desired_velocity+=(delta.normalized() if delta.length_squared()>.0001 else Vector3.RIGHT)*1.4*(1-delta.length()/.72)
imp.velocity=imp.get("velocity",Vector3.ZERO).move_toward(desired_velocity.limit_length(1.35),step_dt*5) imp.velocity=imp.get("velocity",Vector3.ZERO).move_toward(desired_velocity.limit_length(1.35),step_dt*5)
var before=imp.root.position;var desired=before+imp.velocity*step_dt var before=imp.root.position;var desired=before+imp.velocity*step_dt
if profile_tick>0:profile_tick=Time.get_ticks_usec()
w.mesh_walking.move_actor(imp.root,desired-imp.root.position,.34,1.18) w.mesh_walking.move_actor(imp.root,desired-imp.root.position,.34,1.18)
if profile_tick>0:imp.collision_us+=Time.get_ticks_usec()-profile_tick
imp.root.position.x=clampf(imp.root.position.x,-7.1,w.walk_right());imp.root.position.z=clampf(imp.root.position.z,-4.8,5.6) imp.root.position.x=clampf(imp.root.position.x,-7.1,w.walk_right());imp.root.position.z=clampf(imp.root.position.z,-4.8,5.6)
face_motion(imp,imp.root.position-before,step_dt) face_motion(imp,imp.root.position-before,step_dt)
if imp.root.position.distance_to(next)<.12 and not imp.path.is_empty():imp.path.remove_at(0) if imp.root.position.distance_to(next)<.12 and not imp.path.is_empty():imp.path.remove_at(0)
@@ -147,7 +170,9 @@ func move_neighbour(imp,target,dt):
var desired=(target-imp.root.position).normalized()*1.15;desired.y=0 var desired=(target-imp.root.position).normalized()*1.15;desired.y=0
imp.velocity=imp.velocity.move_toward(desired,dt*4) imp.velocity=imp.velocity.move_toward(desired,dt*4)
var before=imp.root.position var before=imp.root.position
var profile_tick=Time.get_ticks_usec() if g.get_meta("profile_life",false) else 0
g.workshop.mesh_walking.move_actor(imp.root,imp.velocity*dt,.34,1.18) g.workshop.mesh_walking.move_actor(imp.root,imp.velocity*dt,.34,1.18)
if profile_tick>0:imp.collision_us+=Time.get_ticks_usec()-profile_tick
imp.root.position.x=clampf(imp.root.position.x,imp.origin.x-7.1,imp.origin.x+7.1) imp.root.position.x=clampf(imp.root.position.x,imp.origin.x-7.1,imp.origin.x+7.1)
imp.root.position.z=clampf(imp.root.position.z,imp.origin.z-5.5,imp.origin.z+5.5) imp.root.position.z=clampf(imp.root.position.z,imp.origin.z-5.5,imp.origin.z+5.5)
face_motion(imp,imp.root.position-before,dt) face_motion(imp,imp.root.position-before,dt)
+42 -13
View File
@@ -6,6 +6,8 @@ const BRASS=Color("8b6842")
const DARK=Color("14171c") const DARK=Color("14171c")
var g var g
var outer_metal var outer_metal
static var detail_cache={}
static var lining_cache={}
# Regions of the existing Meshy atlas: bare iron and aged brass, with matching PBR maps. # Regions of the existing Meshy atlas: bare iron and aged brass, with matching PBR maps.
const IRON_REGION=Vector4(.41015625,.1875,.0234375,.0234375) const IRON_REGION=Vector4(.41015625,.1875,.0234375,.0234375)
const BRASS_REGION=Vector4(.6796875,.5859375,.0234375,.0234375) const BRASS_REGION=Vector4(.6796875,.5859375,.0234375,.0234375)
@@ -16,6 +18,9 @@ func metal(brass=false):
return material return material
func line_lining(model): func line_lining(model):
for node in model.find_children("*Lining","MeshInstance3D",true,false): for node in model.find_children("*Lining","MeshInstance3D",true,false):
node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
node.set_meta("no_walk_collision",true)
if lining_cache.has(node.name):node.mesh=lining_cache[node.name];continue
var mesh=ArrayMesh.new();var transform=model.global_transform.affine_inverse()*node.global_transform var mesh=ArrayMesh.new();var transform=model.global_transform.affine_inverse()*node.global_transform
for surface in range(node.mesh.get_surface_count()): for surface in range(node.mesh.get_surface_count()):
var arrays=node.mesh.surface_get_arrays(surface);var uv=PackedVector2Array() var arrays=node.mesh.surface_get_arrays(surface);var uv=PackedVector2Array()
@@ -26,6 +31,27 @@ func line_lining(model):
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES,arrays) mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES,arrays)
mesh.surface_set_material(surface,metal()) mesh.surface_set_material(surface,metal())
node.mesh=mesh node.mesh=mesh
lining_cache[node.name]=mesh
func tube(root,a,b,radius,color):
var mesh=CylinderMesh.new();mesh.top_radius=radius;mesh.bottom_radius=radius;mesh.height=a.distance_to(b)
mesh.radial_segments=8;mesh.rings=0
var node=g.mesh_node(root,mesh,(a+b)*.5,color)
node.quaternion=Quaternion(Vector3.UP,(b-a).normalized())
func rivet(root,p,size,color):
var mesh=SphereMesh.new();mesh.radius=.5;mesh.height=1;mesh.radial_segments=8;mesh.rings=4
var node=g.mesh_node(root,mesh,p,color);node.scale=size
func restore_detail(root,title):
if not detail_cache.has(title):return false
for record in detail_cache[title]:
var node=MeshInstance3D.new();node.mesh=record.mesh;node.transform=record.transform
node.set_meta("no_walk_collision",true)
node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF;root.add_child(node)
return true
func remember_detail(root,title):
var meshes=[]
for node in root.get_children():
if node is MeshInstance3D:meshes.append({"mesh":node.mesh,"transform":node.transform})
detail_cache[title]=meshes
func point(height,angle,inset=.012): func point(height,angle,inset=.012):
var shape=PROFILE[0] var shape=PROFILE[0]
for j in range(PROFILE.size()-1): for j in range(PROFILE.size()-1):
@@ -33,25 +59,26 @@ func point(height,angle,inset=.012):
shape=PROFILE[j].lerp(PROFILE[j+1],inverse_lerp(PROFILE[j].x,PROFILE[j+1].x,height));break shape=PROFILE[j].lerp(PROFILE[j+1],inverse_lerp(PROFILE[j].x,PROFILE[j+1].x,height));break
return Vector3(cos(angle)*(shape.y*.86-inset),height,-sin(angle)*(shape.z*.70-inset)) return Vector3(cos(angle)*(shape.y*.86-inset),height,-sin(angle)*(shape.z*.70-inset))
func arc(root,height,a,b,radius,color,inset=.012): func arc(root,height,a,b,radius,color,inset=.012):
for k in range(20):g.line(root,point(height,lerpf(a,b,float(k)/20),inset),point(height,lerpf(a,b,float(k+1)/20),inset),radius,color) for k in range(20):tube(root,point(height,lerpf(a,b,float(k)/20),inset),point(height,lerpf(a,b,float(k+1)/20),inset),radius,color)
func section(parent,origin,a,b,title): func section(parent,origin,a,b,title):
var root=Node3D.new();parent.add_child(root);root.name=title;root.position=-origin var root=Node3D.new();parent.add_child(root);root.name=title;root.position=-origin
if restore_detail(root,title):return root
# Raised steel perimeter, inset brass seams and small round rivets. # Raised steel perimeter, inset brass seams and small round rivets.
for h in [.31,.76,1.28,1.80,2.16]: for h in [.31,.76,1.28,1.80,2.16]:
arc(root,h,a+.035,b-.035,.013,IRON) arc(root,h,a+.035,b-.035,.013,IRON)
arc(root,h+.027,a+.06,b-.06,.006,BRASS,.018) arc(root,h+.027,a+.06,b-.06,.006,BRASS,.018)
for k in range(7):g.ball(root,point(h,lerpf(a+.08,b-.08,float(k)/6),.027),Vector3.ONE*.035,BRASS) for k in range(7):rivet(root,point(h,lerpf(a+.08,b-.08,float(k)/6),.027),Vector3.ONE*.035,BRASS)
for k in range(1,5): for k in range(1,5):
var angle=lerpf(a,b,float(k)/5) var angle=lerpf(a,b,float(k)/5)
for j in range(12): for j in range(12):
var h=.32+j*.151 var h=.32+j*.151
g.line(root,point(h,angle,.025),point(h+.151,angle,.025),.010,IRON) tube(root,point(h,angle,.025),point(h+.151,angle,.025),.010,IRON)
# Shallow embossed diamonds on each panel; decoration stays close to the lining. # Shallow embossed diamonds on each panel; decoration stays close to the lining.
for h in [1.02,1.55,2.00]: for h in [1.02,1.55,2.00]:
var angle=(a+b)*.5;var spread=(b-a)*.13 var angle=(a+b)*.5;var spread=(b-a)*.13
var corners=[point(h+.11,angle,.035),point(h,angle+spread,.035),point(h-.11,angle,.035),point(h,angle-spread,.035)] var corners=[point(h+.11,angle,.035),point(h,angle+spread,.035),point(h-.11,angle,.035),point(h,angle-spread,.035)]
for k in range(4):g.line(root,corners[k],corners[(k+1)%4],.008,BRASS) for k in range(4):tube(root,corners[k],corners[(k+1)%4],.008,BRASS)
g.ball(root,point(h,angle,.039),Vector3.ONE*.043,BRASS) rivet(root,point(h,angle,.039),Vector3.ONE*.043,BRASS)
for side in [-1,1]: for side in [-1,1]:
for k in range(24): for k in range(24):
var u=float(k)/24;var v=float(k+1)/24 var u=float(k)/24;var v=float(k+1)/24
@@ -59,8 +86,9 @@ func section(parent,origin,a,b,title):
var radius=.115*(1-u)+.018;var next_radius=.115*(1-v)+.018 var radius=.115*(1-u)+.018;var next_radius=.115*(1-v)+.018
var p=point(h+sin(t)*radius,angle+side*(spread*.62+cos(t)*radius*spread/.13),.045) var p=point(h+sin(t)*radius,angle+side*(spread*.62+cos(t)*radius*spread/.13),.045)
var q=point(h+sin(next)*next_radius,angle+side*(spread*.62+cos(next)*next_radius*spread/.13),.045) var q=point(h+sin(next)*next_radius,angle+side*(spread*.62+cos(next)*next_radius*spread/.13),.045)
g.line(root,p,q,.007,BRASS) tube(root,p,q,.007,BRASS)
merge(root) merge(root)
remember_detail(root,title)
return root return root
func merge(root): func merge(root):
# Batch fixed decorations by metal, separately for the body and each moving leaf. # Batch fixed decorations by metal, separately for the body and each moving leaf.
@@ -76,7 +104,7 @@ func merge(root):
for key in batches: for key in batches:
var mesh=batches[key].tool.commit();var mat=metal(batches[key].color==BRASS) var mesh=batches[key].tool.commit();var mat=metal(batches[key].color==BRASS)
mesh.surface_set_material(0,mat) mesh.surface_set_material(0,mat)
var node=MeshInstance3D.new();node.mesh=mesh;root.add_child(node) var node=MeshInstance3D.new();node.mesh=mesh;node.set_meta("no_walk_collision",true);node.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF;root.add_child(node)
func build(game,model,left,right): func build(game,model,left,right):
g=game g=game
outer_metal=model.find_child("Body",true,false).mesh.surface_get_material(0) outer_metal=model.find_child("Body",true,false).mesh.surface_get_material(0)
@@ -85,12 +113,13 @@ func build(game,model,left,right):
section(left,left.position,PI,PI*1.5,"InnerLeftDetail") section(left,left.position,PI,PI*1.5,"InnerLeftDetail")
section(right,right.position,PI*1.5,TAU,"InnerRightDetail") section(right,right.position,PI*1.5,TAU,"InnerRightDetail")
var floor_root=Node3D.new();model.add_child(floor_root);floor_root.name="InnerGrate" var floor_root=Node3D.new();model.add_child(floor_root);floor_root.name="InnerGrate"
var plate=g.cylinder(floor_root,Vector3(0,.24,0),.61,.035,DARK);plate.scale.z=.61 if not restore_detail(floor_root,"InnerGrate"):
for j in range(-7,8): var plate=g.cylinder(floor_root,Vector3(0,.24,0),.61,.035,DARK);plate.scale.z=.61
var x=j*.072;var reach=sqrt(maxf(0,1-pow(x/.58,2)))*.34 for j in range(-7,8):
g.box(floor_root,Vector3(x,.268,0),Vector3(.026,.027,reach*2),IRON) var x=j*.072;var reach=sqrt(maxf(0,1-pow(x/.58,2)))*.34
for z in [-.23,0,.23]:g.box(floor_root,Vector3(0,.259,z),Vector3(1.02,.018,.022),BRASS) g.box(floor_root,Vector3(x,.268,0),Vector3(.026,.027,reach*2),IRON)
merge(floor_root) for z in [-.23,0,.23]:g.box(floor_root,Vector3(0,.259,z),Vector3(1.02,.018,.022),BRASS)
merge(floor_root);remember_detail(floor_root,"InnerGrate")
var bounce=OmniLight3D.new();model.add_child(bounce);bounce.name="InteriorBounce" var bounce=OmniLight3D.new();model.add_child(bounce);bounce.name="InteriorBounce"
bounce.position=Vector3(0,1.35,.06);bounce.omni_range=1.65;bounce.light_color=Color("d7ae7d");bounce.light_energy=.32 bounce.position=Vector3(0,1.35,.06);bounce.omni_range=1.65;bounce.light_color=Color("d7ae7d");bounce.light_energy=.32
model.set_meta("interior_detail",true) model.set_meta("interior_detail",true)
+88
View File
@@ -0,0 +1,88 @@
extends RefCounted
var failures=0
var records=[]
func check(ok,label):
if not ok:failures+=1;push_error("MAIDEN PERFORMANCE QA: "+label)
func sample(g,label,frames=120):
var times=[]
var life_cost=Vector3.ZERO
g.set_meta("profile_life",true)
for frame in range(frames+30):
g.workshop.spawn_clock=-100.0
var start=Time.get_ticks_usec()
await g.get_tree().process_frame
await RenderingServer.frame_post_draw
if frame>=30:
times.append(float(Time.get_ticks_usec()-start)/1000.0)
life_cost+=g.get_meta("life_profile",Vector3.ZERO)
times.sort()
var record={"phase":label,"median_ms":times[times.size()/2],"p95_ms":times[int(times.size()*.95)],
"process_ms":Performance.get_monitor(Performance.TIME_PROCESS)*1000,
"physics_ms":Performance.get_monitor(Performance.TIME_PHYSICS_PROCESS)*1000,
"nodes":Performance.get_monitor(Performance.OBJECT_NODE_COUNT),
"objects":Performance.get_monitor(Performance.OBJECT_COUNT),
"draws":Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME),
"primitives":Performance.get_monitor(Performance.RENDER_TOTAL_PRIMITIVES_IN_FRAME),
"video_mb":Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED)/1048576.0,
"burns":g.life.burns.size(),"heat":g.workshop.stations[0].motion.heat if not g.workshop.stations.is_empty() else 0.0,
"imp_activity_ms":life_cost.x/frames/1000,"imp_movement_ms":life_cost.y/frames/1000,"imp_gait_ms":life_cost.z/frames/1000}
records.append(record);print("MAIDEN_PROFILE ",JSON.stringify(record))
return record
func run(g):
await g.get_tree().create_timer(.3).timeout
g.start_game();g.reset_shift();g.game_started=true;g.paused=false;g.menu.show_page("")
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED);Engine.max_fps=0
var w=g.workshop;g.player.position=Vector3(1,0,2);g.camera.size=17
await sample(g,"empty_room")
var started=Time.get_ticks_usec();var d=w.add_station(3,Vector3(3,0,0))
w.rebuild_nav()
print("MAIDEN_BUILD_MS ",float(Time.get_ticks_usec()-started)/1000.0)
for mesh in d.device.find_children("*","MeshInstance3D",true,false):
var triangles=0
for surface in range(mesh.mesh.get_surface_count()):
var arrays=mesh.mesh.surface_get_arrays(surface)
var indices=arrays[Mesh.ARRAY_INDEX]
triangles+=(indices.size() if indices!=null and indices.size()>0 else arrays[Mesh.ARRAY_VERTEX].size())/3
print("MAIDEN_GEOMETRY ",mesh.get_parent().name,"/",mesh.name," triangles=",triangles)
g.player.position=w.approach(d);g.avatar.reset_gait()
var baseline=await sample(g,"maiden_idle")
var station_nodes=d.device.find_children("*","",true,false).size()
for cycle in range(3):
w.spawn();var soul=g.souls.back();soul.required=[3];soul.entering=false;soul.entry_time=1
g.set_soul_reveal(soul.visual,1);w.attach(soul,0)
var root=soul.node;var target=g.done+1
for step in range(24):
w.step_station(d,.1,true)
await g.get_tree().process_frame
if cycle==0:await sample(g,"maiden_hot",45)
for step in range(60):
if d.soul<0:break
w.step_station(d,.1,true)
await g.get_tree().process_frame
check(g.done==target and d.soul<0,"cycle completes once")
# Cleanup must run through the normal game process, including life.update.
w.spawn_clock=-100.0
await g.get_tree().create_timer(6.5).timeout
check(not is_instance_valid(root) and g.life.burns.is_empty(),"normal frames remove soul and burn effects")
var cooled=await sample(g,"cooled_%d"%cycle)
check(d.motion.heat<.001 and d.motion.heat_light.light_energy<.001,"heat and light return to idle")
check(d.device.find_children("*","",true,false).size()==station_nodes and g.souls.is_empty(),"no accumulating station nodes or souls after repeated cycles")
# Timings are diagnostic: imp activities and thermal clocks change over time.
check(cooled.video_mb<baseline.video_mb+8,"video memory returns near idle baseline after cleanup")
var local_imps=g.life.imps;var neighbours=g.life.neighbours
g.life.imps=[];g.life.neighbours=[]
await sample(g,"after_cycles_frozen_imps")
g.life.imps=local_imps;g.life.neighbours=neighbours
for x in [6.0,9.0,0.0]:
started=Time.get_ticks_usec();w.add_station(3,Vector3(x,0,-2))
print("MAIDEN_REPEAT_BUILD_MS ",float(Time.get_ticks_usec()-started)/1000.0)
w.rebuild_nav()
await sample(g,"four_maidens_idle")
DirAccess.make_dir_recursive_absolute("res://captures/maiden-performance")
var tag="current"
for arg in OS.get_cmdline_user_args():
if arg.begins_with("--maiden-profile="):tag=arg.get_slice("=",1).validate_filename()
var file=FileAccess.open("res://captures/maiden-performance/"+tag+".json",FileAccess.WRITE)
file.store_string(JSON.stringify(records,"\t"));file.close()
print("MAIDEN PERFORMANCE QA ","PASSED" if failures==0 else "FAILED",": rendered timings, repeated cycles, normal-loop cleanup and stable station resources")
g.get_tree().quit(1 if failures else 0)
+17 -1
View File
@@ -86,8 +86,10 @@ var quips = ["Ещё один. Наверху сегодня скидки на
func _ready(): func _ready():
var args=OS.get_cmdline_user_args() var args=OS.get_cmdline_user_args()
if "--test-equipment-models" in args:args.append("--test-mesh")
test_mode="--test-iron-maiden" in args or "--test-intro" in args or "--test-room-decor" in args or "--test-camera-controls" in args or "--test-rubies" in args or "--test-runtime-burn" in args or "--test-single-punishment" in args or "--test-expansion" in args or "--test-imps" in args or "--test-flight-camera" in args or "--test-maintenance" in args or "--test-castle" in args or "--test-building" in args or "--test-workflow" in args or "--test-roster" in args or "--test-priority" in args or "--test-mesh" in args or "--test-economy" in args or "--test-posture" in args or "--test-gait" in args or "--test-visuals" in args or "--test-mode" in args or "--test-exit" in args or "--test-ui" in args or "--test-audio" in args or "--test-sentences" in args or "--test-hud" in args test_mode="--test-iron-maiden" in args or "--test-intro" in args or "--test-room-decor" in args or "--test-camera-controls" in args or "--test-rubies" in args or "--test-runtime-burn" in args or "--test-single-punishment" in args or "--test-expansion" in args or "--test-imps" in args or "--test-flight-camera" in args or "--test-maintenance" in args or "--test-castle" in args or "--test-building" in args or "--test-workflow" in args or "--test-roster" in args or "--test-priority" in args or "--test-mesh" in args or "--test-economy" in args or "--test-posture" in args or "--test-gait" in args or "--test-visuals" in args or "--test-mode" in args or "--test-exit" in args or "--test-ui" in args or "--test-audio" in args or "--test-sentences" in args or "--test-hud" in args
capture_mode="--capture-workflow" in args or "--capture-roster" in args or "--capture-economy" in args or "--capture-posture" in args or "--capture-gait" in args or "--capture" in args or "--capture-workshop" in args capture_mode="--capture-workflow" in args or "--capture-roster" in args or "--capture-economy" in args or "--capture-posture" in args or "--capture-gait" in args or "--capture" in args or "--capture-workshop" in args
test_mode=test_mode or "--test-maiden-performance" in args or "--test-performance-soak" in args
if FileAccess.file_exists("res://build_info.json"): if FileAccess.file_exists("res://build_info.json"):
var stamp=JSON.parse_string(FileAccess.get_file_as_string("res://build_info.json")) var stamp=JSON.parse_string(FileAccess.get_file_as_string("res://build_info.json"))
if stamp is Dictionary: build_id=str(stamp.get("id",build_id)) if stamp is Dictionary: build_id=str(stamp.get("id",build_id))
@@ -144,7 +146,9 @@ func _ready():
say("Первый день. Последняя надежда на отпуск.") say("Первый день. Последняя надежда на отпуск.")
refresh_ui() refresh_ui()
if automatic: build_auto_arm() if automatic: build_auto_arm()
if "--test-iron-maiden" in args:call_deferred("run_iron_maiden_tests") if "--test-performance-soak" in args:call_deferred("run_performance_soak_tests")
elif "--test-maiden-performance" in args:call_deferred("run_maiden_performance_tests")
elif "--test-iron-maiden" in args:call_deferred("run_iron_maiden_tests")
elif "--test-intro" in args:call_deferred("run_intro_tests") elif "--test-intro" in args:call_deferred("run_intro_tests")
elif "--test-exit" in args: call_deferred("test_exit") elif "--test-exit" in args: call_deferred("test_exit")
elif "--test-audio" in args: call_deferred("run_audio_tests") elif "--test-audio" in args: call_deferred("run_audio_tests")
@@ -163,6 +167,7 @@ func _ready():
elif "--test-workflow" in args:call_deferred("run_workflow_tests") elif "--test-workflow" in args:call_deferred("run_workflow_tests")
elif "--test-roster" in args:call_deferred("run_roster_tests") elif "--test-roster" in args:call_deferred("run_roster_tests")
elif "--test-priority" in args:call_deferred("run_delivery_priority_tests") elif "--test-priority" in args:call_deferred("run_delivery_priority_tests")
elif "--test-equipment-models" in args:call_deferred("run_equipment_model_tests")
elif "--test-mesh" in args:call_deferred("run_mesh_tests") elif "--test-mesh" in args:call_deferred("run_mesh_tests")
elif "--test-sentences" in args:call_deferred("run_sentence_tests") elif "--test-sentences" in args:call_deferred("run_sentence_tests")
elif "--test-economy" in args:call_deferred("run_economy_tests") elif "--test-economy" in args:call_deferred("run_economy_tests")
@@ -575,7 +580,9 @@ func _process(delta):
time+=dt time+=dt
for gear in moving_gears: gear.rotation.z+=dt*0.65 for gear in moving_gears: gear.rotation.z+=dt*0.65
if workshop: if workshop:
var profile_tick=Time.get_ticks_usec() if get_meta("profile_life",false) else 0
workshop.update(dt) workshop.update(dt)
if profile_tick>0:set_meta("workshop_cpu_us",Time.get_ticks_usec()-profile_tick)
return return
if paused or not game_started: return if paused or not game_started: return
advance_spawns(dt) advance_spawns(dt)
@@ -964,6 +971,9 @@ func capture_economy():
func run_mesh_tests(): func run_mesh_tests():
await preload("res://mesh_walking_tests.gd").new().run(self) await preload("res://mesh_walking_tests.gd").new().run(self)
func run_equipment_model_tests():
await preload("res://equipment_model_tests.gd").new().run(self)
func run_delivery_priority_tests(): func run_delivery_priority_tests():
await preload("res://delivery_priority_tests.gd").new().run(self) await preload("res://delivery_priority_tests.gd").new().run(self)
@@ -1017,3 +1027,9 @@ func run_intro_tests():
func run_iron_maiden_tests(): func run_iron_maiden_tests():
await preload("res://iron_maiden_tests.gd").new().run(self) await preload("res://iron_maiden_tests.gd").new().run(self)
func run_maiden_performance_tests():
await preload("res://maiden_performance_tests.gd").new().run(self)
func run_performance_soak_tests():
await preload("res://performance_soak_tests.gd").new().run(self)
+19 -3
View File
@@ -14,6 +14,8 @@ func setup(game):
shape_node=CollisionShape3D.new();shape_node.shape=shape;shape_node.position.y=1.02;probe.add_child(shape_node) shape_node=CollisionShape3D.new();shape_node.shape=shape;shape_node.position.y=1.02;probe.add_child(shape_node)
func build(root): func build(root):
for mesh in root.find_children("*","MeshInstance3D",true,false): for mesh in root.find_children("*","MeshInstance3D",true,false):
# Internal lining/embossing is enclosed by the real exterior shell.
if mesh.get_meta("no_walk_collision",false):continue
if not mesh.is_visible_in_tree() or mesh.mesh==null:continue if not mesh.is_visible_in_tree() or mesh.mesh==null:continue
if mesh.mesh is QuadMesh:continue if mesh.mesh is QuadMesh:continue
if mesh.material_override is ShaderMaterial and mesh.material_override.shader in [preload("res://surface_water.gdshader"),preload("res://boiling.gdshader"),preload("res://leather.gdshader")]:continue if mesh.material_override is ShaderMaterial and mesh.material_override.shader in [preload("res://surface_water.gdshader"),preload("res://boiling.gdshader"),preload("res://leather.gdshader")]:continue
@@ -21,14 +23,23 @@ func build(root):
if bounds.size.length()<.24:continue if bounds.size.length()<.24:continue
var body=StaticBody3D.new();body.name="MeshWalkingCollider";body.collision_layer=2;body.collision_mask=0 var body=StaticBody3D.new();body.name="MeshWalkingCollider";body.collision_layer=2;body.collision_mask=0
mesh.add_child(body) mesh.add_child(body)
var collider=CollisionShape3D.new();collider.shape=mesh.mesh.create_trimesh_shape();body.add_child(collider) var collider=CollisionShape3D.new()
collider.shape.backface_collision=true collider.shape=mesh.get_meta("walk_collision_shape") if mesh.has_meta("walk_collision_shape") else mesh.mesh.create_trimesh_shape()
body.add_child(collider)
if collider.shape is ConcavePolygonShape3D:collider.shape.backface_collision=true
func rebuild(stations): func rebuild(stations):
outlines.clear() outlines.clear()
for s in stations: for s in stations:
for mesh in s.device.find_children("*","MeshInstance3D",true,false): for mesh in s.device.find_children("*","MeshInstance3D",true,false):
if not mesh.has_node("MeshWalkingCollider"):continue if not mesh.has_node("MeshWalkingCollider"):continue
var points=PackedVector2Array() var points=PackedVector2Array()
var collider=mesh.get_node("MeshWalkingCollider").get_child(0) as CollisionShape3D
if collider.shape is ConvexPolygonShape3D:
# The route planner must use the same hull as the swept capsule.
for v in collider.shape.points:
var point=mesh.global_transform*v;points.append(Vector2(point.x,point.z))
if points.size()>2:outlines.append(Geometry2D.convex_hull(points))
continue
var faces=mesh.mesh.get_faces() var faces=mesh.mesh.get_faces()
for i in range(0,faces.size(),3): for i in range(0,faces.size(),3):
var a=mesh.global_transform*faces[i];var b=mesh.global_transform*faces[i+1];var c=mesh.global_transform*faces[i+2] var a=mesh.global_transform*faces[i];var b=mesh.global_transform*faces[i+1];var c=mesh.global_transform*faces[i+2]
@@ -42,7 +53,12 @@ func blocked(point,radius=.32):
if point.distance_to(Geometry2D.get_closest_point_to_segment(point,polygon[i],polygon[i+1]))<radius:return true if point.distance_to(Geometry2D.get_closest_point_to_segment(point,polygon[i],polygon[i+1]))<radius:return true
return false return false
func move_actor(node,motion,radius=.30,height=1.65): func move_actor(node,motion,radius=.30,height=1.65):
shape.radius=radius;shape.height=maxf(height,2*radius);shape_node.position.y=(.195 if height>1.4 else .10)+height/2 if motion.length_squared()<.0000001:return
if not is_equal_approx(shape.radius,radius):shape.radius=radius
var capsule_height=maxf(height,2*radius)
if not is_equal_approx(shape.height,capsule_height):shape.height=capsule_height
var offset=(.195 if height>1.4 else .10)+height/2
if not is_equal_approx(shape_node.position.y,offset):shape_node.position.y=offset
probe.position=node.position;probe.force_update_transform() probe.position=node.position;probe.force_update_transform()
var remaining=motion var remaining=motion
for i in range(4): for i in range(4):
+1 -1
View File
@@ -31,7 +31,7 @@ func run(g):
for n in w.node_buttons: for n in w.node_buttons:
if n.key in ["speed","auto"]:check(n.button.modulate==Color.WHITE and n.gems.filled==1,"learned upgrades stay bright and show a ruby") if n.key in ["speed","auto"]:check(n.button.modulate==Color.WHITE and n.gems.filled==1,"learned upgrades stay bright and show a ruby")
g.say("Проверка диалога");check(g.life.hero_bubble.find_children("*","Polygon2D",true,false).is_empty(),"hero dialogue has no arrow") g.say("Проверка диалога");check(g.life.hero_bubble.find_children("*","Polygon2D",true,false).is_empty(),"hero dialogue has no arrow")
w.spawn();var soul=g.souls.back();soul.entering=false;g.set_soul_reveal(soul.visual,1) w.add_station(0,Vector3(2,0,0));w.spawn();var soul=g.souls.back();soul.entering=false;g.set_soul_reveal(soul.visual,1)
g.development.speak(soul,"Проверка") g.development.speak(soul,"Проверка")
check(not is_instance_valid(g.development.bubble),"soul dialogue disabled") check(not is_instance_valid(g.development.bubble),"soul dialogue disabled")
if failures==0:print("ALL MESH WALKING TESTS PASSED: mesh clearance, sweep, slide, rotation, removal, learned UI and arrowless dialogue") if failures==0:print("ALL MESH WALKING TESTS PASSED: mesh clearance, sweep, slide, rotation, removal, learned UI and arrowless dialogue")
+50
View File
@@ -0,0 +1,50 @@
extends RefCounted
# Water, restraints and moving controls stay independent of the Meshy surfaces.
const MODELS={
0:preload("res://art/equipment/meshy_v01/pillory.glb"),
1:preload("res://art/equipment/meshy_v01/rack.glb"),
2:preload("res://art/equipment/meshy_v01/wheel_vat.glb"),
4:preload("res://art/equipment/meshy_v01/musical_chair.glb"),
5:preload("res://art/equipment/meshy_v01/cauldron.glb")}
static var collisions={}
func build(g,d):
var root=d.device
var model=MODELS[d.selected].instantiate();root.add_child(model)
root.set_meta("apparatus_model","meshy_equipment_v01")
for mesh in model.find_children("*","MeshInstance3D",true,false):
var key=str(d.selected)+"/"+str(mesh.name)
if not collisions.has(key):collisions[key]=mesh.mesh.create_convex_shape(true,true)
mesh.set_meta("walk_collision_shape",collisions[key])
if d.selected==0:root.set_meta("pillory_apertures",3)
if d.selected==2:
d.crank=model.find_child("Wheel",true,false)
assert(d.crank!=null,"The wheel requires a separate axle pivot")
root.set_meta("wheel_radius",1.28)
# Central axle is perpendicular to the wheel; the frame stays behind it.
var axle=g.cylinder(root,Vector3(0,1.62,-.31),.12,.52,Color("332e28"));axle.rotation.x=PI/2
g.line(root,Vector3(-1.34,1.62,-.53),Vector3(1.34,1.62,-.53),.085,Color("453124"))
for side in [-1,1]:
g.box(root,Vector3(side*1.35,1.62,-.25),Vector3(.28,.28,.28),Color("332e28"))
for y in [1.53,1.71]:g.ball(root,Vector3(side*1.35,y,-.09),Vector3.ONE*.045,Color("89734b"))
if d.selected in [1,2]:
var handle=Node3D.new();root.add_child(handle);handle.name="WindingHandle"
handle.position=Vector3(1.0,1.08,-1.34) if d.selected==1 else Vector3(1.48,1.62,0)
handle.rotation.y=PI/2
var pivot=Node3D.new();handle.add_child(pivot);pivot.name="HandleRotor"
g.line(pivot,Vector3.ZERO,Vector3(.25,0,0),.035,Color("38332c"))
g.line(pivot,Vector3(.25,0,0),Vector3(.25,0,.20),.04,Color("61432b"))
for mesh in handle.find_children("*","MeshInstance3D",true,false):mesh.set_meta("no_walk_collision",true)
if d.selected==1:d.crank=pivot
root.set_meta("handle_rotor",pivot)
if d.selected==4:
for side in [-1,1]:
var speaker=Node3D.new();root.add_child(speaker);speaker.name="InwardFacingSpeaker"
speaker.position=Vector3(side*.90,1.75,-.18)
var direction=Vector3(0,1.75,-.12)-speaker.position
speaker.rotation.y=atan2(direction.x,direction.z)
d.special.speaker_roots.append(speaker)
# Invisible measured contact proxy for the upholstered seat surface.
var seat=MeshInstance3D.new();root.add_child(seat);seat.name="ChairSeat";seat.position=Vector3(0,.64,-.12)
var contact=BoxMesh.new();contact.size=Vector3(.96,.12,.48);seat.mesh=contact;seat.hide();seat.set_meta("no_walk_collision",true)
d.special["seat"]=seat
var rest=g.box(root,Vector3(0,.29,.53),Vector3(.85,.08,.38),Color("3e3028"));rest.name="ChairFootrest"
+1 -1
View File
@@ -1,6 +1,6 @@
extends "res://infernal_gait.gd" extends "res://infernal_gait.gd"
# Grounded idle breathing layered after the approved locomotion. # Grounded idle breathing layered after the approved locomotion.
const ARM_WALK_AMPLITUDE=0.8 const ARM_WALK_AMPLITUDE=0.4
var idle_time=0.0 var idle_time=0.0
var idle_weight=0.0 var idle_weight=0.0
var relaxed_weight=0.0 var relaxed_weight=0.0
+11 -40
View File
@@ -1,54 +1,25 @@
extends RefCounted extends RefCounted
const POP=preload("res://audio/infernal_pop.wav") const POP=preload("res://audio/infernal_pop.wav")
func build(g,d): func build(g,d):
var root=d.device var root=d.device
var wood=Color("48302f");var iron=Color("292d35");var brass=Color("a58b59")
d["special"]={"bubbles":[],"notes":[],"liquid":null,"music":null,"players":[],"speaker_roots":[],"heat":0.0} d["special"]={"bubbles":[],"notes":[],"liquid":null,"music":null,"players":[],"speaker_roots":[],"heat":0.0}
preload("res://meshy_equipment.gd").new().build(g,d)
if d.selected==4: if d.selected==4:
d.special["seat"]=g.box(root,Vector3(0,.62,-.23),Vector3(1.05,.16,.42),wood);d.special.seat.name="ChairSeat" for speaker in d.special.speaker_roots:
g.box(root,Vector3(0,.025,.71),Vector3(.85,.05,.45),iron) var music=AudioStreamPlayer3D.new();speaker.add_child(music);music.unit_size=4;music.max_distance=16
g.box(root,Vector3(0,1.45,-.48),Vector3(1.15,1.55,.18),wood)
for x in [-.47,.47]:
for z in [-.40,.20]:g.cylinder(root,Vector3(x,.29,z),.075,.58,iron)
g.box(root,Vector3(x*1.3,1.06,.05),Vector3(.16,.14,.96),wood)
for z in [-.32,.42]:g.line(root,Vector3(x*1.3,.68,z),Vector3(x*1.3,1.05,z),.045,iron)
var cuff=preload("res://leather_cuff.gd").make(g,root,Vector3(x*1.3,1.15,.2),.13);cuff.rotation.x=PI/2
for link_index in range(4):
var link=g.torus(root,Vector3(x*1.3,1.04-link_index*.12,.2),.12,iron)
link.scale=Vector3.ONE*.5;link.rotation.x=PI/2 if link_index%2==0 else 0
for x in [-.23,.23]:
var ankle=preload("res://leather_cuff.gd").make(g,root,Vector3(x,.13,.66),.095);ankle.rotation.x=PI/2
g.line(root,Vector3(x,.13,.66),Vector3(x,.35,.38),.025,iron)
g.box(root,Vector3(0,1.45,-.34),Vector3(1.08,.075,.04),Color("33241e"))
g.box(root,Vector3(0,.91,.12),Vector3(1.08,.075,.045),Color("33241e"))
for side in [-1,1]:
var speaker_root=Node3D.new();root.add_child(speaker_root);speaker_root.name="InwardFacingSpeaker";speaker_root.position=Vector3(side*1.05,1.05,-.45)
var direction=Vector3(0,1.05,.10)-speaker_root.position;speaker_root.rotation.y=atan2(direction.x,direction.z);d.special.speaker_roots.append(speaker_root)
g.box(speaker_root,Vector3.ZERO,Vector3(.50,1.20,.50),iron)
for y in [-.30,.26]:
var speaker=g.cylinder(speaker_root,Vector3(0,y,.27),.19,.045,Color("14141c"));speaker.rotation.x=PI/2
var rim=g.torus(speaker_root,Vector3(0,y,.30),.19,brass);rim.rotation.x=PI/2
g.ball(speaker_root,Vector3(0,y,.31),Vector3(.12,.12,.04),Color("6c4f7d"))
for j in range(9):g.line(speaker_root,Vector3(-.15+j*.038,y-.14,.325),Vector3(-.15+j*.038,y+.14,.325),.004,Color("4b4b52"))
for j in range(3):
var note=g.torus(root,Vector3(side*(.95+j*.10),2.0+j*.18,-.35),.07,Color("b38bd5"));note.hide();d.special.notes.append(note)
var music=AudioStreamPlayer3D.new();speaker_root.add_child(music);music.position.z=.31;music.unit_size=4;music.max_distance=16
music.stream=POP.duplicate();music.stream.loop_mode=AudioStreamWAV.LOOP_FORWARD;music.stream.loop_end=int(music.stream.get_length()*music.stream.mix_rate) music.stream=POP.duplicate();music.stream.loop_mode=AudioStreamWAV.LOOP_FORWARD;music.stream.loop_end=int(music.stream.get_length()*music.stream.mix_rate)
d.special.players.append(music) d.special.players.append(music)
for j in range(3):
var note=g.torus(root,speaker.position+Vector3(0,.25+j*.18,0),.07,Color("b38bd5"));note.hide();note.set_meta("no_walk_collision",true);d.special.notes.append(note)
d.special.music=d.special.players[0] d.special.music=d.special.players[0]
else: else:
preload("res://cauldron_shell.gd").new().build(g,root) d.special.liquid=preload("res://water_surface.gd").new().build(g,root,1.24,Vector3(0,1.55,0),true)
var liquid=preload("res://water_surface.gd").new().build(g,root,1.24,Vector3(0,1.55,0),true)
d.special.liquid=liquid
g.torus(root,Vector3(0,1.65,0),1.32,brass)
for side in [-1,1]:
var handle=g.torus(root,Vector3(side*1.48,1.15,0),.30,iron);handle.rotation.z=PI/2
for i in range(12):
var a=i*TAU/12
g.ball(root,Vector3(cos(a)*1.38,1.4,sin(a)*1.38),Vector3.ONE*.07,brass)
for i in range(16): for i in range(16):
var bubble=g.ball(root,Vector3.ZERO,Vector3.ONE*.07,Color("c2ddd9"));bubble.hide();d.special.bubbles.append(bubble) var bubble=g.ball(root,Vector3.ZERO,Vector3.ONE*.07,Color("c2ddd9"));bubble.hide();bubble.set_meta("no_walk_collision",true);d.special.bubbles.append(bubble)
for i in range(10):
var mist=MeshInstance3D.new();root.add_child(mist);var quad=QuadMesh.new();quad.size=Vector2(.38,.8);mist.mesh=quad
var material=ShaderMaterial.new();material.shader=preload("res://steam.gdshader");material.render_priority=111;material.set_shader_parameter("phase",i*.63);mist.material_override=material
mist.position=Vector3(sin(i*2.4)*.85,1.9,cos(i*2.4)*.85)
d.flame=Node3D.new();root.add_child(d.flame) d.flame=Node3D.new();root.add_child(d.flame)
for i in range(6): for i in range(6):
var quad=QuadMesh.new();quad.size=Vector2(.8,.6) var quad=QuadMesh.new();quad.size=Vector2(.8,.6)
+70
View File
@@ -0,0 +1,70 @@
extends RefCounted
var failures=0
func check(ok,label):
if not ok:failures+=1;push_error("PERFORMANCE SOAK: "+label)
func contact_probe(g):
g.set_process(false)
await g.get_tree().physics_frame;await g.get_tree().physics_frame
var subject=Node3D.new();g.add_child(subject)
for point in [Vector3(41.30359,0,-20.25188),Vector3(5.30359,0,-2.25188)]:
var samples=[]
for i in range(40):
subject.position=point
var start=Time.get_ticks_usec()
g.workshop.mesh_walking.move_actor(subject,Vector3(-.03,0,.02),.34,1.18)
samples.append(float(Time.get_ticks_usec()-start)/1000.0)
samples.sort()
print("SOAK_CONTACT ",point," median_ms=",samples[20]," p95_ms=",samples[38])
check(samples[38]<8.0,"known dense-maiden collision hotspot stays below 8 ms")
subject.queue_free();g.set_process(true)
func run(g):
await g.get_tree().create_timer(.3).timeout
g.start_game();g.reset_shift();g.game_started=true;g.paused=false;g.menu.show_page("")
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED);Engine.max_fps=0
var w=g.workshop;w.unlock=5;g.coins=50000;g.essence=5000
w.add_station(0,Vector3(0,0,-2));w.add_station(3,Vector3(4,0,-2));w.rebuild_nav()
var mode="queue"
for arg in OS.get_cmdline_user_args():
if arg.begins_with("--soak-mode="):mode=arg.get_slice("=",1)
if mode=="auto":
w.add_station(1,Vector3(8,0,-2));w.add_station(2,Vector3(0,0,3))
w.add_station(4,Vector3(4,0,3));w.add_station(5,Vector3(8,0,3));w.rebuild_nav()
for i in range(3):w.add_helper()
w.automation=true;g.development.xp=370
g.player.position=Vector3(-3,0,2.5);g.avatar.reset_gait();g.camera.size=20
await contact_probe(g)
g.set_meta("profile_life",true)
var start=Time.get_ticks_msec();var last=start;var times=[];var records=[]
var life=Vector3.ZERO;var soul_us=0.0;var workshop_us=0.0
var worst={"total_us":0}
while Time.get_ticks_msec()-start<65000:
g.set_meta("soul_cpu_us",0)
var tick=Time.get_ticks_usec()
await g.get_tree().process_frame;await RenderingServer.frame_post_draw
times.append(float(Time.get_ticks_usec()-tick)/1000)
life+=g.get_meta("life_profile",Vector3.ZERO)
var imp=g.get_meta("life_worst",{})
if imp.get("total_us",0)>worst.total_us:worst=imp
soul_us+=g.get_meta("soul_cpu_us",0);workshop_us+=g.get_meta("workshop_cpu_us",0)
if Time.get_ticks_msec()-last>=5000:
var count=times.size();times.sort()
var record={"seconds":(Time.get_ticks_msec()-start)/1000.0,"sim_time":g.time,"mode":mode,
"median_ms":times[count/2],"p95_ms":times[int(count*.95)],"max_ms":times.back(),
"soul_ms":soul_us/count/1000,"workshop_ms":workshop_us/count/1000,
"imp_activity_ms":life.x/count/1000,"imp_movement_ms":life.y/count/1000,"imp_gait_ms":life.z/count/1000,
"souls":g.souls.size(),"departures":w.losses.departures.size(),"burns":g.life.burns.size(),"done":g.done,
"nodes":Performance.get_monitor(Performance.OBJECT_NODE_COUNT),"objects":Performance.get_monitor(Performance.OBJECT_COUNT),
"video_mb":Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED)/1048576.0,
"draws":Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME),"worst_imp":worst}
records.append(record);print("SOAK_PROFILE ",JSON.stringify(record))
last=Time.get_ticks_msec();times.clear();life=Vector3.ZERO;soul_us=0.0;workshop_us=0.0
worst={"total_us":0}
check(w.queue_load()<=7 and w.losses.departures.size()<=2,"queue/departures remain bounded")
for record in records:
if record.seconds>=30:check(record.median_ms<records[0].median_ms*2.5+8,"no sustained late frame-time collapse")
var capture_root="res://captures/performance-soak" if OS.has_feature("editor") else OS.get_executable_path().get_base_dir()+"/captures/performance-soak"
DirAccess.make_dir_recursive_absolute(capture_root)
var file=FileAccess.open(capture_root+"/"+mode+".json",FileAccess.WRITE)
file.store_string(JSON.stringify(records,"\t"));file.close()
print("PERFORMANCE SOAK ","PASSED" if failures==0 else "FAILED",": 65s of normal spawns, queue losses and real game frames; timings recorded")
g.get_tree().quit(1 if failures else 0)
+7 -3
View File
@@ -113,8 +113,8 @@ func update_torture(dt,active):
model.position=Vector3(0,.90,-.12)-bone_local("root");skeleton.force_update_all_bone_transforms() model.position=Vector3(0,.90,-.12)-bone_local("root");skeleton.force_update_all_bone_transforms()
for side in ["L","R"]: for side in ["L","R"]:
var sign_x=1 if side=="L" else -1 var sign_x=1 if side=="L" else -1
limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.23,.13,.66),Vector3.FORWARD*-1) limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.23,.42,.48),Vector3.FORWARD*-1)
align_bone("foot."+side,"toe2-1."+side,bone_local("foot."+side)+Vector3(0,-.045,.18)) align_bone("foot."+side,"toe2-1."+side,bone_local("foot."+side)+Vector3(0,0,.18))
limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.61,1.15,.2),Vector3(0,0,-1)) limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.61,1.15,.2),Vector3(0,0,-1))
turn("head",Vector3.UP,wave*.13);turn("spine02",Vector3.RIGHT,sin(pose_clock*5)*.025*struggle) turn("head",Vector3.UP,wave*.13);turn("spine02",Vector3.RIGHT,sin(pose_clock*5)*.025*struggle)
elif station_kind==0: elif station_kind==0:
@@ -123,7 +123,8 @@ func update_torture(dt,active):
for side in ["L","R"]: for side in ["L","R"]:
var sign_x=1 if side=="L" else -1 var sign_x=1 if side=="L" else -1
limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.59,1.70,.08),Vector3(0,0,-1)) limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*.59,1.70,.08),Vector3(0,0,-1))
limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.25,.1,-.4),Vector3(0,0,1)) limb("upperleg01."+side,"lowerleg01."+side,"foot."+side,Vector3(sign_x*.25,.18,-.4),Vector3(0,0,1))
align_bone("foot."+side,"toe2-1."+side,bone_local("foot."+side)+Vector3(0,0,.18))
turn("head",Vector3.RIGHT,impulse*.11) turn("head",Vector3.RIGHT,impulse*.11)
elif station_kind==1: elif station_kind==1:
for side in ["L","R"]: for side in ["L","R"]:
@@ -133,6 +134,7 @@ func update_torture(dt,active):
elif station_kind==5: elif station_kind==5:
for side in ["L","R"]: for side in ["L","R"]:
var sign_x=1 if side=="L" else -1 var sign_x=1 if side=="L" else -1
align_bone("foot."+side,"toe2-1."+side,bone_local("foot."+side)+Vector3(0,0,.18))
limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*(.72+sin(pose_clock*5)*.12),1.65+sin(pose_clock*6+sign_x)*.2,.32),Vector3(sign_x,0,1)) limb("upperarm01."+side,"lowerarm01."+side,"wrist."+side,Vector3(sign_x*(.72+sin(pose_clock*5)*.12),1.65+sin(pose_clock*6+sign_x)*.2,.32),Vector3(sign_x,0,1))
turn("head",Vector3.UP,wave*.16) turn("head",Vector3.UP,wave*.16)
else:turn("head",Vector3.UP,wave*.10) else:turn("head",Vector3.UP,wave*.10)
@@ -145,6 +147,7 @@ func update_torture(dt,active):
if cry.playing and cry.get_playback_position()>.48:cry.stop() if cry.playing and cry.get_playback_position()>.48:cry.stop()
func _process(_delta): func _process(_delta):
var profile_tick=Time.get_ticks_usec() if game and game.get_meta("profile_life",false) else 0
if game: if game:
animator.speed_scale=0.0 if game.paused else 1.0 animator.speed_scale=0.0 if game.paused else 1.0
if cry: if cry:
@@ -162,6 +165,7 @@ func _process(_delta):
turn("neck",Vector3.RIGHT,.06);turn("head",Vector3.RIGHT,-.08) turn("neck",Vector3.RIGHT,.06);turn("head",Vector3.RIGHT,-.08)
relax_flight_arms() relax_flight_arms()
cloth.update(self,minf(_delta,.05)) cloth.update(self,minf(_delta,.05))
if profile_tick>0:game.set_meta("soul_cpu_us",game.get_meta("soul_cpu_us",0)+Time.get_ticks_usec()-profile_tick)
func restore_flight_pose(): func restore_flight_pose():
for i in range(flight_pose.size()):skeleton.set_bone_pose(i,flight_pose[i]) for i in range(flight_pose.size()):skeleton.set_bone_pose(i,flight_pose[i])
+9 -4
View File
@@ -357,19 +357,24 @@ func run_ui(g):
check(g.life.burns.is_empty()) check(g.life.burns.is_empty())
print("PASS: pentagram opens/closes modal tree; E does nothing; actual held RMB completes rack; burn effect cleans up") print("PASS: pentagram opens/closes modal tree; E does nothing; actual held RMB completes rack; burn effect cleans up")
var cash=g.coins var cash=g.coins
var previous_level=g.workshop.Economy.level(g.development.xp)
var previous_points=g.development.points
for i in range(2): for i in range(2):
for down in [true,false]: for down in [true,false]:
var boost=InputEventKey.new();boost.keycode=KEY_F5;boost.physical_keycode=KEY_F5;boost.pressed=down var boost=InputEventKey.new();boost.keycode=KEY_F5;boost.physical_keycode=KEY_F5;boost.pressed=down
Input.parse_input_event(boost) Input.parse_input_event(boost)
await g.get_tree().process_frame await g.get_tree().process_frame
check(g.coins==cash+2000 and g.development.xp==600 and g.development.points==6) var boosted_level=mini(10,previous_level+2)
check(g.coins==cash+2000 and g.workshop.Economy.level(g.development.xp)==boosted_level and g.development.points==previous_points+boosted_level-previous_level)
g.development.purchase_skill("speed") g.development.purchase_skill("speed")
var spent_points=g.development.points
g.development.test_boost() g.development.test_boost()
check(g.speed_level==1 and g.development.points==5 and g.development.xp==600) check(g.speed_level==1 and g.development.points==spent_points+(1 if boosted_level<10 else 0))
var boosted_xp=g.development.xp;var boosted_points=g.development.points
g.development.reward() g.development.reward()
check(g.development.xp==600 and g.development.points==5) check(g.development.xp==mini(g.workshop.Economy.XP_THRESHOLDS.back(),boosted_xp+20) and g.development.points==boosted_points)
check(g.Progression.decode(g.progress_snapshot(),g.build_id)==g.progress_snapshot()) check(g.Progression.decode(g.progress_snapshot(),g.build_id)==g.progress_snapshot())
print("PASS: F5 adds 1000 per press, caps level at 7, preserves skills, avoids duplicate points, persists save") print("PASS: F5 adds 1000 gold and souls plus one level per press, caps level at 10, preserves skills and persists save")
var key=InputEventKey.new() var key=InputEventKey.new()
key.keycode=KEY_ESCAPE key.keycode=KEY_ESCAPE
key.pressed=true key.pressed=true
+1 -1
View File
@@ -13,7 +13,7 @@ func run(g):
for side in ["L","R"]: for side in ["L","R"]:
var x=1 if side=="L" else -1 var x=1 if side=="L" else -1
print("CHAIR ",kind," ",side," foot=",actor.bone_local("foot."+side)," wrist=",actor.bone_local("wrist."+side)) print("CHAIR ",kind," ",side," foot=",actor.bone_local("foot."+side)," wrist=",actor.bone_local("wrist."+side))
check(actor.bone_local("foot."+side).distance_to(Vector3(x*.23,.13,.66))<.13,"chair ankle %d"%kind) check(actor.bone_local("foot."+side).distance_to(Vector3(x*.23,.42,.48))<.13,"chair ankle on raised footrest %d"%kind)
check(actor.bone_local("wrist."+side).distance_to(Vector3(x*.61,1.15,.2))<.12,"chair wrist %d"%kind) check(actor.bone_local("wrist."+side).distance_to(Vector3(x*.61,1.15,.2))<.12,"chair wrist %d"%kind)
var before=actor.bone_world("head");actor.update_torture(.2,true) var before=actor.bone_world("head");actor.update_torture(.2,true)
check(actor.bone_world("head").distance_to(before)>.001,"chair reaction") check(actor.bone_world("head").distance_to(before)>.001,"chair reaction")
+1 -1
View File
@@ -65,7 +65,7 @@ func run(g):
w.reset();check(w.expansion_level==0 and is_equal_approx(g.architecture.growth.right_edge(),12),"new game restores original room bounds") w.reset();check(w.expansion_level==0 and is_equal_approx(g.architecture.growth.right_edge(),12),"new game restores original room bounds")
g.paused=false;d=w.add_station(4,Vector3(3,0,0)) g.paused=false;d=w.add_station(4,Vector3(3,0,0))
for speaker in d.special.speaker_roots: for speaker in d.special.speaker_roots:
var target=(Vector3(0,1.05,.10)-speaker.position).normalized() var target=(Vector3(0,1.75,-.12)-speaker.position).normalized()
check(speaker.basis.z.dot(target)>.99,"speaker faces seated soul") check(speaker.basis.z.dot(target)>.99,"speaker faces seated soul")
for kind in range(10): for kind in range(10):
var actor=g.make_person(false,kind);g.add_child(actor);actor.mount_station(4);actor.update_torture(0,false) var actor=g.make_person(false,kind);g.add_child(actor);actor.mount_station(4);actor.update_torture(0,false)
+15 -17
View File
@@ -68,6 +68,7 @@ var buy_buttons=[]
var bars=[] var bars=[]
var notice_time=0.0 var notice_time=0.0
var nav=AStarGrid2D.new() var nav=AStarGrid2D.new()
var free_floor_points=PackedVector3Array()
var revision=0 var revision=0
var mesh_walking=preload("res://mesh_walking.gd").new() var mesh_walking=preload("res://mesh_walking.gd").new()
@@ -304,11 +305,9 @@ func cancel_placement(show_catalogue=true):
if is_instance_valid(catalogue):catalogue.visible=show_catalogue and build_mode if is_instance_valid(catalogue):catalogue.visible=show_catalogue and build_mode
func make_ghost(): func make_ghost():
if moving>=0: # A placement preview needs only fresh visuals, not live restraint scripts,
ghost=stations[moving].device.duplicate() # station dictionaries or references to the original moving nodes.
g.add_child(ghost) ghost=make_device(pending,Vector3.ZERO).device
else:
ghost=make_device(pending,Vector3.ZERO).device
ghost.name="PlacementGhost";ghost.show() ghost.name="PlacementGhost";ghost.show()
ghost_material=StandardMaterial3D.new() ghost_material=StandardMaterial3D.new()
ghost_material.transparency=BaseMaterial3D.TRANSPARENCY_ALPHA ghost_material.transparency=BaseMaterial3D.TRANSPARENCY_ALPHA
@@ -500,13 +499,16 @@ func cell(p):
func rebuild_nav(): func rebuild_nav():
mesh_walking.rebuild(stations) mesh_walking.rebuild(stations)
free_floor_points.clear()
nav.region=Rect2i(0,0,38+ceili(g.architecture.growth.extra_width(expansion_level)*2),22);nav.cell_size=Vector2(.5,.5);nav.offset=Vector2(-7.5,-5) nav.region=Rect2i(0,0,38+ceili(g.architecture.growth.extra_width(expansion_level)*2),22);nav.cell_size=Vector2(.5,.5);nav.offset=Vector2(-7.5,-5)
nav.diagonal_mode=AStarGrid2D.DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES;nav.update() nav.diagonal_mode=AStarGrid2D.DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES;nav.update()
for x in range(nav.region.size.x): for x in range(nav.region.size.x):
for z in range(22): for z in range(22):
var p=Vector2(-7.5+x*.5,-5+z*.5) var p=Vector2(-7.5+x*.5,-5+z*.5)
var blocked=mesh_walking.blocked(p) or p.x>walk_right() var blocked=mesh_walking.blocked(p,.42) or p.x>walk_right()
nav.set_point_solid(Vector2i(x,z),blocked) nav.set_point_solid(Vector2i(x,z),blocked)
if not blocked and p.x>=-7.1 and p.x<=walk_right() and p.y>=-4.8 and p.y<=5.6:
free_floor_points.append(Vector3(p.x,0,p.y))
revision+=1 revision+=1
func accessible(): func accessible():
@@ -1086,15 +1088,11 @@ func station_at_screen(point):
if station_rect(stations[i]).has_point(Vector2(p.x,p.z)):return i if station_rect(stations[i]).has_point(Vector2(p.x,p.z)):return i
return -1 return -1
func free_floor(position): func free_floor(position,radius=.24):
var point=Vector2(position.x,position.z) var point=Vector2(position.x,position.z)
if not mesh_walking.blocked(point,.24):return position if not mesh_walking.blocked(point,radius):return position
var nearest=Vector3(-5.3,0,0);var best=INF var candidates=Array(free_floor_points)
for x in range(nav.region.size.x): candidates.sort_custom(func(a,b):return a.distance_squared_to(position)<b.distance_squared_to(position))
for z in range(nav.region.size.y): for p in candidates:
if nav.is_point_solid(Vector2i(x,z)):continue if not mesh_walking.blocked(Vector2(p.x,p.z),radius):return p
var p=Vector3(-7.5+x*.5,0,-5+z*.5) return Vector3(-5.3,0,0)
if p.x< -7.1 or p.x>walk_right() or p.z< -4.8 or p.z>5.6:continue
var distance=p.distance_squared_to(position)
if distance<best:best=distance;nearest=p
return nearest
+11
View File
@@ -0,0 +1,11 @@
.godot/
tools/godot/
tools/templates/
profile/
.userdata/
builds/
*.log
*.tmp
qa/*.png
qa/*.json
*.import
+114
View File
@@ -0,0 +1,114 @@
# Аудио — До отбоя 0.2.9
## Скачанный бесплатный эффект
- Название: **Synthesized explosion**.
- Автор: **qubodup / Iwan Gabovitch**.
- Страница и указанная автором лицензия CC0:
https://opengameart.org/content/synthesized-explosion
- Оригинал: https://opengameart.org/sites/default/files/synthetic_explosion_1.flac
- Лицензия: Creative Commons CC0 1.0 Universal:
https://creativecommons.org/publicdomain/zero/1.0/
- Проверено и скачано: 2026-10-29.
- В игре: `assets/audio/impact_cc0.wav`, преобразование FLAC → PCM16 WAV
без монтажа; громкость уменьшается при воспроизведении.
Это синтезированный эффект, не запись реального обстрела.
## Оригинальные эффекты проекта
`room.wav`, `siren.wav`, `phone.wav`, `knock.wav`, `click.wav`, `impact.wav`
созданы процедурно `tools/make_audio.py` в предыдущем прототипе.
`approach.wav` создан для телефонной версии `tools/make_phone_effects.py`.
Его длина следует партитуре: 9 секунд от начала гула на 81-й секунде до удара.
В текущей сцене используются approach, click (пуши) и скачанный impact_cc0.
Прежний синтезированный siren.wav заменён записью пользователя.
Прежний room.wav заменён отдельными слоями окружения.
Пакет Kenney Interface Sounds был найден с лицензией CC0, но сервер вернул 403
при скачивании. Его файлы в билд не включены; указание Kenney не означает
использование его материалов.
## Реплики
110 текстов созданы для этого сценария; исходник — `data/phone_story.json`.
Реплики созданы через ElevenLabs, модель `eleven_v4`. К озвучке 0.2.2 добавлены
восемь коротких фраз и обновлены три реплики о целой тёмной лестнице:
- Катя: 52 реплики, Jessica — Playful, Bright, Warm, `cgSgspJ2msm6clMCkdW9`.
- Мама: 58 реплик, Carol — Relatable, Real, Likeable Grandma,
`5u41aNhyCU6hXOcjPPv0`.
Оба голоса выбраны пользователем. Интонационные задачи, теги подачи,
паузы, смысловые акценты и точечные IPA-подсказки ударений сохранены в
`voiceover/performance.json`. Субтитры остаются обычным русским текстом.
Общая запись разделена на отдельные реплики по временным меткам провайдера.
Разметка удаляет служебные теги и сопоставляет IPA со словами сценария.
Такая проверка не заменяет оценку интонаций на слух.
WAV — моно PCM16; у нарезанных реплик края сглажены за 5 мс. Скорость и
высота не изменены. Новый вопрос Кати о лестнице записан отдельным клипом.
В Godot голос мамы проходит телефонный фильтр 220–3600 Гц. Старые Windows
Speech / Microsoft Irina в этой версии не используются.
Происхождение, ID генераций, длительности и хеши — `data/voice_manifest.json`.
Подробности монтажа — `voiceover/README_RU.md` и `voiceover/alignment.json`.
CC0 скачанного эффекта не распространяется на голоса ElevenLabs.
Проект ElevenLabs: https://elevenlabs.io/app/flows/lJwPcdr17VgI2AfUx50D
В репозитории нет API-ключей, подписанных ссылок или токенов подключения.
## Телефонный эмбиент и бытовые звуки — 0.2.3
14 отдельных звуков созданы ElevenLabs Sound Effects v2:
room, fridge, tv, kettle, cloth, keys, drawer, keyboard, safe, door,
footsteps, knock, paper, phone. Это синтезированные материалы для игры,
не записи реального обстрела или чужого разговора. Телевизор — неразборчивый
приглушённый фон без новостных цитат. Они не объявлены CC0.
line (шум линии) и switch (щелчок) созданы процедурно с фиксированным seed.
Исходник монтажа и синтеза — tools/prepare_soundscape.py; данные происхождения,
ID генераций, параметры, длительности, RMS, пики и SHA256 —
data/sound_manifest.json. Рабочие MP3 хранятся только в builds/soundscape.
Игровые файлы — assets/audio/call/, моно PCM16. Петли имеют склейку 0.2 с,
разовые звуки — сглаженные края. Пики исходных слоёв ограничены до -6.9 дБFS.
Тихие голоса не усилены: фон дополнительно приглушается под их уровень.
## Запись тревоги пользователя — 0.2.4
Источник: videoplayback.m4a, предоставлен пользователем 2026-10-30.
По уточнению пользователя взят фрагмент с 0:08 до конца записи. Это отметка
в исходном файле; тревога по-прежнему начинается на 24-й секунде каждого звонка.
Отдельная лицензия источника не указана; запись не объявляется CC0.
Игровой файл: assets/audio/siren_user.wav, моно PCM16 / 22050 Гц.
Петля сглажена склейкой 0.35 с. Первые шесть секунд звучания уровень плавно
растёт от -70 до -8 дБ (на 15 дБ громче, чем в 0.2.5); повтор петли не повторяет
нарастание. Голос дополнительно приглушает тревогу через общую шину окружения.
Монтаж — tools/prepare_user_alarm.py; длительность, исходная отметка, уровни
и SHA256 — data/alarm_manifest.json. Сырой M4A и конвертер остаются в builds/.
## Исправленные разговоры — 0.2.11
18 реплик перезаписаны через ElevenLabs eleven_v4: 11 голосом Jessica —
Playful, Bright, Warm и 7 голосом Carol — Relatable, Real, Likeable Grandma.
Проект: https://elevenlabs.io/app/flows/4QRiJZBnBe1AqWhPbCJo.
Тексты, ID генераций и расшифровок, границы монтажа, длительности и SHA256
сохранены в data/voice_manifest.json и voiceover/alignment.json.
Все 167 слов сверены перед нарезкой. Остальные 92 записи сохранены.
## Просьба о письме в первом разговоре — 0.2.12
Пять реплик перезаписаны через ElevenLabs eleven_v4: три Jessica и две Carol.
Проект: https://elevenlabs.io/app/flows/UXHRA54DQ1G1wtb5XwwC.
Все 55 нормализованных слов сверены перед нарезкой; 105 других записей сохранены.
Происхождение, границы монтажа и SHA256 — в data/voice_manifest.json;
проверка слов — в voiceover/alignment.json.
## История ключа и спуск по лестнице — 0.2.13
17 записей через ElevenLabs eleven_v4: 8 Jessica и 9 Carol (11 замен и 6 новых).
Проект: https://elevenlabs.io/app/flows/ZYCyC1cKnDwET5c0RTm2.
Дубли v3ncxRkyCDR4ooJtbyIb и R00qNE9VobcPFgbddiUp; расшифровки
S0RbU1qUdwm0OZIxAHOW и 7reN7ymVWq11eW1NHciw. Совпали все 76 + 110 слов.
Другие 99 записей сохранены. Всего 116 реплик: 55 Jessica и 61 Carol.
Происхождение и монтаж сохранены в манифестах; используются прежние звуки шагов.
+93
View File
@@ -0,0 +1,93 @@
Copyright 2026 The Arimo Project Authors (https://github.com/googlefonts/arimo)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+23
View File
@@ -0,0 +1,23 @@
Godot Engine
Copyright (c) 2014-present Godot Engine contributors.
Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Third-party notices: https://godotengine.org/license/#thirdparty
+213
View File
@@ -0,0 +1,213 @@
# До отбоя — Не клади трубку · прототип 0.2.14
Откройте `DoOtboy.exe` в папке Windows-билда. Интернет, Godot и аккаунт
ElevenLabs для игры не нужны. ZIP сначала распакуйте. Полная последовательность
из десяти звонков занимает примерно 15–20 минут.
Каждый запуск игры начинает прохождение заново, с первого звонка и пустой
памятью. Между звонками внутри одного запуска подсказки сохраняются.
Вы — Катя, взрослая дочь. Мама Нина вечером одна в квартире. Первый звонок —
обычный разговор на 90 секунд. После гула и взрыва связь обрывается. При повторном
звонке мама произносит ту же фразу. Она не помнит предыдущую попытку; вы помните.
## Как играть
Игра открывается отдельным главным меню: элементы по центру, тёмный
розово-фиолетовый фон с медленно плывущими мягкими кругами боке. Телефоны
и диалог скрыты. Здесь доступны продолжение, проверка сцен, звук и выход.
В меню оставлены основной заголовок и описание; верхняя надпись «До отбоя»,
нижняя подсказка Esc и строка версии с именами голосов убраны.
В настройках звука убран блок с перечнем голосов и источников аудио.
Весь интерфейс использует Arimo Bold — гротеск, близкий к шрифту из
референса облака тегов. Шрифт включён в игру: меню, телефоны, диалоги,
пуши, ответы и журнал выглядят одинаково на любом компьютере. Колонки
телефонов симметричны, диалог и облако выровнены по центру экрана.
Нажмите «Позвонить маме». На смартфоне Кати слева появится анимация вызова,
на кнопочном телефоне мамы справа — входящий звонок от «Доченьки».
Подписи имён и местоположений под корпусами телефонов убраны.
Верхний логотип на экране звонка убран. Основной фон почти чёрный;
розовое и фиолетовое свечение с эквалайзером сохранено.
Соединение занимает 2.4 секунды и не отнимает время из 90 секунд разговора.
Реплики появляются сверху по центру, полный разговор можно прокрутить.
В первом звонке выборов нет. Со второго выбирайте просьбы в облаке текстовых
ответов снизу по центру. У ответов нет рамок и плашек. Время на кнопках не показывается. Облако медленно
вращается в объёме: дальние ответы меньше и темнее, ближние крупнее.
Положение мыши меняет направление вращения. Под курсором ответ
останавливается, увеличивается и становится розовым.
Мама выполняет одну просьбу за раз. Варианты включаются
только после окончания реплики и выполнения выбранной просьбы. Изменить
или отменить просьбу нельзя. При большом числе вариантов облако прокручивается.
Катя опирается только на услышанное. Знания появляются после полной реплики
мамы и сохраняются между звонками. Номер попытки сам по себе ничего не открывает:
если письмо или код ещё не найдены, вступление не упоминает их как известные.
В первом спокойном разговоре мама упоминает письмо от соседки: где ключ
от тамбура. Она не может открыть письмо и просит помочь при встрече.
Со следующего звонка появляется «Помочь с письмом». Мама объясняет: соседка
уехала и оставила ей свой сейф с запасным ключом, а код прислала письмом.
Катя объясняет, как открыть письмо, и просит прочитать вслух. В письме код
и пояснение про ключ со схемой тамбура. Первая просьба не раскрывает код. Только полный
ответ с четырьмя цифрами открывает сейф. Прерванный ответ кода не даёт.
Осмотр прихожей сообщает лишь предположение о куртке; точный карман Катя
узнаёт после поиска ключей. Вопросы о плане, лестнице и двери зависят также
от текущего места мамы и вещей в её руках.
«Память» показывает все полученные подсказки, обновляется при открытом окне
и прокручивается. Пока открытий нет, вместо пустого окна показано объяснение.
Розовое свечение соответствует голосу Кати, фиолетовое — голосу мамы.
Мягкие полосы реагируют на голос и плавно затихают. Находки доступны по кнопке
«Память» сверху. Под телефоном мамы показаны взятые предметы.
Кнопки «Меню» на сцене нет: Esc открывает главное меню и возвращает
к звонку. В настройках и выборе сцен Esc возвращает в главное меню.
Звонок продолжается, пока открыто меню. После взрыва экран полностью чёрный:
нет телефонов, субтитров и свечения. Через две секунды звучит последняя
реплика Кати. В исходе с ответом мамы сначала слышно «Катя?..», затем Катя:
«Я здесь, мам. Я тебя слышу». После окончания записи по центру появляется
одна надпись «Позвонить Маме». Она медленно плавает, увеличивается и розовеет
под курсором. Нажатие начинает следующую попытку; до конца реплики оно недоступно.
Esc по-прежнему открывает меню. В нём доступны «Итоги звонка», переписка
и полный текст разговора; «Вернуться» возвращает на чёрный экран.
В каждом звонке подруга Аня присылает пять пушей: на 17-й, 34-й, 56-й,
76-й и 92-й секундах. Четвёртый: «Ты читала новости? Там переговоры, походу
скоро все закончится». Последний приходит через две секунды после удара:
«Кать в твой дом походу попали...». Первые четыре пуша появляются на смартфоне Кати.
Нажмите на пуш, чтобы прочитать переписку на экране телефона.
Отдельной кнопки «Сообщения» на смартфоне нет.
Чтение не останавливает часы и не отменяет просьбу маме.
Крестик скрывает баннер; само сообщение остаётся непрочитанным. После обрыва
пятый текст сохраняется без баннера и сигнала, чтобы оставить экран полностью
чёрным. Вся переписка доступна через Esc → «Сообщения от подруги», а новый
звонок начинает её заново.
В каждой попытке есть **90 реальных секунд**. Меню и потеря фокуса не ставят
звонок на паузу. На обоих телефонах с первого звонка показана длительность
соединения: от 00:00 после ответа до 01:30 при обрыве. При новом наборе
счётчики скрыты, а при соединении начинают заново. На 45-й секунде отключается свет, на 81-й слышен гул, на 90-й — удар.
На 81-й секунде мама всегда произносит «Подожди. Что-то гудит. Ты слышишь?».
Эта фраза может прервать Катю. Незавершённая просьба останавливается,
не даёт предметов или знаний; новые ответы больше не предлагаются.
Ответ мамы на просьбу не начинается, если он не успеет закончиться до финальной
фразы. После неё остаётся около 5.4 секунды гула до удара на 90-й секунде.
Сирена начинается на 24-й секунде во всех звонках и нарастает плавно за 6 секунд.
Её уровень поднят на 15 дБ: до -8 дБ на проигрывателе; во время речи
сохраняется автоматическое приглушение окружения.
Использована присланная запись тревоги, начиная с отметки 0:08 самого файла. Внешние события всегда
совпадают, включая первый разговор. Мама замечает отключение света и в прологе;
после него в квартире остаётся темно. События не ждут окончания просьбы игрока.
Предметы и положение мамы сбрасываются. Знания остаются: ключи можно найти
быстрее, неисправный фонарь сразу починить, сейф открыть уже известным кодом.
В темноте поиск без фонаря занимает на 7 секунд дольше. Письмо с кодом нужно
успеть прочитать до отключения ноутбука. Длительность просьбы учитывает обе
озвученные реплики, поэтому действие иногда занимает больше базового времени
в сценарии. Если удар прерывает действие, незаконченная находка не выдаётся.
Номера звонков меняют разговор, но не запирают команды. Нужные сведения можно
обнаружить раньше или позже предложенной драматургии. После десятого звонка
можно продолжить попытки. Есть шесть исходов: квартира, внутренний коридор,
площадка, спуск по лестнице, тамбур без связи, ответ мамы после удара. Последний не обещает, что
опасность закончилась. Игра не оценивает человека за то, что он не успел всё.
В «Звук и титры» доступны громкость, отключение озвучки и источники звуков.
Все 55 реплик Кати озвучены выбранным голосом **Jessica — Playful, Bright,
Warm** через ElevenLabs. Все 61 реплика мамы озвучена **Carol — Relatable,
Real, Likeable Grandma** с телефонным фильтром. Для обеих героинь обновлены
интонации, паузы, смысловые акценты и произношение сложных слов.
Все записи включены в билд и играют без интернета.
Первый разговор стал плотнее: добавлены восемь коротких реплик, а паузы
между обычными фразами составляют около 0.2 с. Моменты общих событий сохранены.
Лестница целая; лампы в подъезде давно не работают, ещё до общего отключения.
Без фонаря мама остаётся на площадке. Можно вернуться в квартиру за фонарём.
С исправным фонарём вместо проверки темноты появляется «Спускаться с фонарём»:
мама действительно начинает спуск с пятого этажа. Дальше доступно «Продолжить
спуск»; каждый этап занимает 20 секунд. Пока мама идёт, время продолжается.
После ухода с этажа его двери недоступны. Обрыв во время движения даёт исход
«На лестнице»: Катя не знает, успела ли мама дойти вниз. Маршрут в тамбур
остаётся отдельной возможностью, а фонарь нужно брать в каждом звонке.
Фон включает комнату, телефонный шум, холодильник, приглушённый телевизор и
чайник. Поиск и движение сопровождаются шорохами, ключами, ящиком, шагами,
клавиатурой, сейфом, дверью, бумагой, стуком и перекладыванием телефона.
Звуки соответствуют действиям; при вынужденном прерывании просьбы её звуки останавливаются.
На 45 с телевизор и холодильник замолкают, а шум комнаты и линии остаётся.
Во время голоса фон приглушается на 12–24 дБ, сильнее для тихих реплик,
и плавно возвращается после них. В «Звук и титры» есть отдельный ползунок
«Фон и звуки окружения»; он не меняет громкость диалогов.
## Быстрая проверка
«Проверка сцен» позволяет выбрать любой из десяти звонков и начать с пустой,
накопленной или полной памятью. Этот режим не меняет память обычного прохождения.
Предметы всё равно нужно брать заново. Между повторными тестовыми звонками
знания сохраняются до выхода из тестовой последовательности.
С пустой памятью просьба о письме появится только после первого разговора.
Полный сценарий, все реплики и алгоритмы шести исходов — в `SCENARIO_RU.md`.
Самый полный маршрут с известными подсказками: ключи из куртки → исправить
фонарь → сейф 0417 → площадка → поднять ручку боковой двери и повернуть ключ →
найти место, где ловит телефон → поставить его на полку. С текущей озвучкой
это около 80 секунд с ожиданием вступительного обмена репликами. В следующих
попытках поиск сигнала уже можно пропустить. В начале игры эти команды
открываются через находки.
## Прогресс текущего запуска
При каждом запуске сбрасываются знания, пройденные звонки и открытые исходы.
Старый `phone_memory.cfg` не загружается и не используется для записи прогресса.
Переименовывать или удалять файлы вручную не нужно. Память наполняется только
после услышанных реплик и сохраняется между попытками, пока игра открыта.
«Проверка сцен» использует отдельную память; её полные знания не переходят
в обычное прохождение. Для полного сброса достаточно закрыть и открыть игру.
## Исходники и сборка
Откройте `do-otboy/project.godot` в Godot **4.3 stable**. Главная сцена запускает
`scripts/phone_game.gd`. Сюжет и постоянные ID реплик — `data/phone_story.json`.
Редактируемый источник сценария — `tools/write_phone_story.py`; он также
генерирует `SCENARIO_RU.md`. Голоса — `assets/voice/`, их происхождение —
`data/voice_manifest.json`. Старые 3D-скрипты прототипа 0.1 остаются в исходниках
для справки, но главная сцена их не запускает.
Сборка: `build.ps1 -GodotPath "C:\путь\к\godot_console.exe" -OutputFolder Windows_FreshStart`.
Нужен Windows release template той же версии Godot. Локальный шаблон можно
положить в `tools/templates/windows_release_x86_64.exe`.
Архивы создаёт `python tools/package.py --windows-dir Windows_FreshStart --version 0.2.14`.
Локальная черновая озвучка заново: Windows PowerShell 5.1,
`powershell -ExecutionPolicy Bypass -File tools/make_draft_voices.ps1`.
Нужен установленный русский женский голос Windows Speech. Интернет не требуется.
Этот скрипт не запрашивает и не использует API-ключи. Он сохраняет готовые
записи ElevenLabs; заменить их черновыми можно только с `-ReplaceRecordedVoices`.
Партитура обеих героинь и словарь произношения — `voiceover/performance.json`.
Происхождение и монтаж голосов описаны в `voiceover/README_RU.md`.
## Автоматическая проверка
`godot_console.exe --path do-otboy -- --phone-qa`
Или `DoOtboy.exe -- --phone-qa` для собранной версии. Тест не использует обычный
профиль. Он выбирает сцены и игровые команды через видимые `Button.pressed`:
10 разговоров, 5 исходов, реальное открытие подсказок, обрыв питания,
блокировка смены просьбы, сброс предметов, перенос памяти, проигрываемость каждого WAV,
запись и проверка профиля, хронология событий после длинного кадра.
Для скорости тест переносит начало отсчёта вместо ожидания 90 секунд.
Дополнительно проверяются анимация соединения, переключение розового и
фиолетового фона, положение пушей внутри телефона, облако ответов и память.
Две послевзрывные последовательности проверяются с настоящим воспроизведением:
полностью чёрный кадр, последняя реплика Кати, запрет раннего перезвона,
появление и нажатие центральной надписи после аудио, восстановление телефонов.
Это автоматизация внутри Godot, а не имитация системного курсора.
Отчёт — `phone-result.json`, кадры интерфейса — `phone-*.png`, в `qa/` проекта
или `captures/` рядом с EXE. Графическую проверку запускайте без `--headless`.
Источники аудио — `AUDIO_CREDITS.md`; лицензия движка — `GODOT_LICENSE.txt`.
Шрифт: [Arimo / Google Fonts](https://github.com/google/fonts/tree/main/ofl/arimo),
локальная вариация `wght=700` без изменения исходного TTF.
SIL Open Font License 1.1 включена в `FONT_LICENSE.txt` рядом с игрой.
+337
View File
@@ -0,0 +1,337 @@
# До отбоя — Не клади трубку
Сценарий тестового билда 0.2.14. Каждый запуск начинает новое прохождение с пустой памятью. Знания переходят между звонками только внутри текущего запуска. Десять звонков по 90 секунд, включая первый разговор. Катя — взрослая дочь, Нина — её мама. Мама не помнит повторов; Катя помнит только услышанное. Предметы и положение мамы сбрасываются. Сценарий не является инструкцией по поведению при обстреле.
На обоих телефонах с первого звонка показана длительность соединения: от 00:00 после ответа до 01:30 при обрыве. Во время набора счётчики скрыты; новый разговор начинает отсчёт заново. На 45-й секунде пропадает электричество, на 81-й слышен гул, на 90-й удар и обрыв. Во всех звонках сирена начинается на 24-й секунде; все четыре внешних события совпадают при каждом повторе. Субтитры всех произнесённых фраз остаются в журнале текущего звонка.
## Первый разговор — точная партитура
0:00 — Мама: «Катюш, привет. Ты поела?»
0:02 — Катя: «Поела, мам. Только что пришла. А ты что делаешь?»
0:06 — Мама: «Соседка прислала важное письмо: где ключ от тамбура. Не открывается. Приедешь — поможешь?»
0:13 — Катя: «Приеду — помогу. У тебя телевизор так громко работает?»
0:18 — Мама: «Сейчас убавлю. Я его больше для голоса включаю. Так в квартире не пусто.»
0:23 — Катя: «Удалось сегодня хоть немного отдохнуть?»
0:26 — Мама: «Да какое там. Цветок пересаживала, всю кухню землёй засыпала.»
0:31 — Катя: «Газету под горшок не подложила?»
0:33 — Мама: «Забыла. Ничего, убрала уже. Зато ему теперь не тесно.»
0:39 — Катя: «Я в воскресенье приеду. Привезти тебе что-нибудь?»
0:45 — Мама: «Свет погас. Катя, ты на линии?»
0:48 — Мама: «Совсем темно. Чайник уже закипел. Сейчас отойду от кухни.»
0:54 — Катя: «Мам, ты меня слышишь? Я говорю, в воскресенье приеду.»
0:58 — Мама: «Слышу. Ничего не покупай. Просто приезжай. У меня твоя чашка так и стоит.»
1:06 — Катя: «Хорошо. Я тогда утром позвоню, когда выеду.»
1:09 — Катя: «А сейчас давай ещё немного побудем на линии.»
1:12 — Мама: «Давай. С тобой как-то спокойнее.»
1:15 — Катя: «Я никуда не ухожу. Слышишь меня?»
1:18 — Мама: «Слышу, доченька. Слышу.»
1:21 — Мама: «Подожди. Что-то гудит. Ты слышишь?»
1:30 — удар; конец соединения. Все незаконченные реплики обрываются.
## Десять итераций
Нумерация отражает драматургию, а не запрет находить вещи раньше. Все физически доступные команды можно использовать в любом игровом звонке. Новые точные команды открываются фактами, а не номером попытки. Если факт пропущен, его можно найти позже или переиграть звонок.
### 1. В воскресенье
Обычный вечер. Мамин номер в избранном.
Катя: «Привет, мам.»
Мама: «Я очень рада, что ты позвонила.»
Катя: «Как ты сегодня?»
Мама: «Нормально. Всё как всегда.»
Задача для тестирования: Первый звонок длится 90 секунд. Просто побудьте с ней.
### 2. Та же фраза
Она снова спрашивает, поела ли ты. Ты помнишь, чем закончится разговор.
Катя: «Мам, не клади трубку. Мне тревожно. Давай пока побудем на линии.»
Мама: «Катюш, что случилось? Я слушаю. Только объясни спокойно.»
Катя: «Ты одна дома?»
Мама: «Да, одна. Телефон со мной. Я могу ходить и говорить.»
Задача для тестирования: Начните с простого: ключи и вещи у входа. Знания останутся после обрыва.
### 3. Одна батарейка
Ты помнишь время отключения света. Мама ещё нет.
Катя: «Мам, у тебя есть фонарь? Посмотри, пожалуйста. Вдруг свет пропадёт.»
Мама: «Фонарь в ящике. Я давно им не пользовалась. Сейчас посмотрю.»
Катя: «Ты можешь взять и телефон, и фонарь?»
Мама: «Могу. На телефоне включу громкую связь. Только буду идти медленнее.»
Задача для тестирования: Проверенный фонарь позволит искать и открывать вещи после отключения света.
### 4. Четыре цифры
Мама попросила помочь с письмом в первом разговоре. Теперь Катя может вернуться к её просьбе и узнать, что это за письмо.
Катя: «Соседка прислала код от сейфа. Давай прочитаем письмо, пока есть свет.»
Мама: «Ноутбук на столе. Я пока рядом. Что хочешь посмотреть?»
Катя: «А если ноутбук выключится?»
Мама: «Батарея совсем умерла. Тогда уже никак. Только если код заранее записать.»
Задача для тестирования: Услышьте просьбу мамы в первом звонке. Затем помогите открыть письмо и прочитайте его до 45-й секунды. Код переживёт новую попытку.
### 5. Чужой ключ
К сейфу можно перейти только после того, как мама полностью прочитала код. Содержимое нужно брать заново.
Катя: «Открой соседкин сейф. Я помню код. Там запасной ключ от тамбура.»
Мама: «Он в шкафу. Я его ещё не открывала. Говори цифры медленно.»
Катя: «На плане есть выход наружу?»
Мама: «Нет. Это только наш этаж. Я вижу боковой тамбур. Дальше ничего не нарисовано.»
Задача для тестирования: Достаньте ключ из сейфа и выйдите на площадку. Один план не расскажет, что там сейчас.
### 6. Лестница
Ты можешь объяснить путь. Но не можешь увидеть его своими глазами.
Катя: «Мам, рассказывай, что перед тобой. Не молчи, даже если кажется, что я знаю.»
Мама: «Хорошо. Буду говорить. Только не перебивай, когда я что-то слышу.»
Катя: «Если вниз слишком темно, что рядом?»
Мама: «Сбоку от лестницы ещё дверь. Старая, с тяжёлой ручкой.»
Задача для тестирования: Без фонаря мама не пойдёт по тёмным ступеням. С фонарём можно начать отдельный путь вниз; каждый этап спуска занимает время.
### 7. Просевшая дверь
Ты знаешь больше, но объяснения всё равно занимают секунды.
Катя: «Я скажу совсем точно. Одна команда, потом следующая. Ты не должна угадывать.»
Мама: «Так лучше. Когда ты быстро говоришь всё сразу, я половину не разбираю.»
Катя: «Ручка двери ходит вверх?»
Мама: «Немного. Дверь старая, её давно перекашивает. Может, в этом дело.»
Задача для тестирования: Попробуйте боковую дверь запасным ключом. Узнав приём с ручкой, можно открыть её быстрее.
### 8. Одно деление
Мама может оказаться ближе к укрытию и дальше от твоего голоса.
Катя: «Если связь начнёт пропадать, скажи сразу. Я не вижу, где ты стоишь.»
Мама: «Скажу. Пока слышно хорошо. Я тебя слышу.»
Катя: «Телефон можно поставить рядом?»
Мама: «Можно. Мне бы освободить руки. Только чтобы ты меня не потеряла.»
Задача для тестирования: Внутри тамбура проверьте связь. Найденное место телефона можно использовать в следующем звонке.
### 9. Не все сразу
За полторы минуты нельзя проверить каждую дверь и позвать каждого человека.
Катя: «Мне хочется успеть всё. Но давай сделаем только то, о чём я прошу сейчас.»
Мама: «Хорошо, доченька. Я делаю. Ты тоже дыши, я слышу, как тебе страшно.»
Катя: «Ты слышишь кого-нибудь рядом?»
Мама: «Нет. Ни шагов, ни голосов. Только тебя слышу. Не замолкай, ладно?»
Задача для тестирования: Решите, тратить ли время на стук соседке, ещё одну проверку или разговор с мамой.
### 10. Не клади трубку
Ты уже помнишь её квартиру по словам. Но эти девяносто секунд не стали длиннее.
Катя: «Мам, я буду с тобой. Сейчас скажу, что делать. А потом просто останусь на линии.»
Мама: «Я слушаю тебя, Катюш. Только потом расскажешь, как у тебя прошёл день.»
Катя: «Что ты хотела мне рассказать?»
Мама: «Что скучаю. И что не надо ничего покупать. Просто приезжай.»
Задача для тестирования: Используйте найденные короткие команды. Даже ответ после удара не означает, что опасность закончилась.
## Все игровые команды и ответы
Указано базовое время действия. В билде оно не короче просьбы и ответа в текущей озвучке; секунды на ответах не показываются. Поиск в темноте без фонаря добавляет 7 секунд. Выбор доступен после окончания речи. Выбранную команду нельзя отменить или заменить. На 81-й секунде мама прерывает незавершённую просьбу и произносит финальную фразу о гуле; после неё других реплик до удара нет. Ответ мамы на просьбу начинается только если успеет закончиться до этой фразы. Незавершённое действие не даёт предмет или знание. Внешние события и удар могут оборвать разговор.
### Расскажи, что у двери — 10 с
Катя: «Мам, скажи, что сейчас стоит у входной двери.»
Мама: «Тумбочка, сумки. Синяя куртка висит. Ключи, наверное, в ней. А фонарь я убрала в ящик.»
Знания: У входа стоят тумбочка и сумки, висит синяя куртка. Мама лишь предположила, что ключи в ней. Мама хранит фонарь в ящике.
### Найди ключи — 20 с
Катя: «Найди, пожалуйста, ключи от квартиры.»
Мама: «На крючке нет. В сумке тоже... Вот они, в правом кармане синей куртки. Взяла.»
Знания: Мама нашла ключи в правом кармане синей куртки у двери.
### Ключи — в синей куртке — 6 с
Катя: «Ключи в правом кармане синей куртки.»
Мама: «Нашла. Взяла.»
### Найди и проверь фонарь — 20 с
Катя: «Мам, поищи фонарь. Проверь, работает ли.»
Мама: «В ящике нашла. Не светит... Батарейка наоборот стоит. Повернула. Теперь светит.»
Знания: Мама хранит фонарь в ящике. У фонаря перевёрнута одна батарейка. Нужно повернуть её.
### В фонаре переверни батарейку — 9 с
Катя: «Фонарь в ящике. Переверни одну батарейку.»
Мама: «Готово. Светит.»
### Вернись к маминой просьбе о письме — 9 с
Катя: «Ты говорила про ключ от тамбура. Давай откроем письмо.»
Мама: «Соседка уехала, оставила мне сейф с запасным ключом. Код прислала. Ноутбук только от розетки работает.»
Знания: В важном письме есть сведения о сейфе. Ноутбук работает только от сети. Соседка уехала и оставила маме сейф с запасным ключом от общего тамбура. Код прислала письмом.
### Прочитай письмо на ноутбуке — 15 с
Катя: «Нажми на важное письмо два раза и прочитай вслух.»
Мама: «Читаю: «Ноль, четыре, один, семь. Внутри — ключ и схема тамбура». Сейф внизу шкафа.»
Знания: Код сейфа: 0417. Он стоит в нижнем отделении шкафа.
### Открой сейф: 0417 — 15 с
Катя: «Сейф внизу шкафа. Код: ноль, четыре, один, семь.»
Мама: «Ключ от бокового тамбура. И план: помещение без окон, рядом с лестницей.»
Знания: В сейфе — запасной ключ от бокового тамбура и старый план этажа. На плане из сейфа — боковой тамбур: помещение без окон рядом с лестницей.
### Выйди на площадку — 11 с
Катя: «Мам, с телефоном выходи на площадку.»
Мама: «Вышла. Я на площадке. Дверь квартиры за мной. Куда дальше?»
### Проверь проход по лестнице — 16 с
Катя: «Посмотри, можно ли пройти по лестнице дальше.»
Мама: «Лестница целая, но лампы давно не горят. Ступеней не вижу. Без фонаря не пойду.»
Знания: Лестница целая. Лампы в подъезде давно не горят. Без фонаря мама не различает ступени; с фонарём может спускаться.
### Спускайся с фонарём — 20 с
Катя: «Посвети на ступени. Если видишь их, начинай спускаться. Я на линии.»
Мама: «Лампы давно не горят. С фонарём ступени вижу. Спускаюсь с пятого. Медленно, за перила держусь.»
Знания: Лестница целая. Лампы в подъезде давно не горят. Без фонаря мама не различает ступени; с фонарём может спускаться.
### Продолжай спуск — 20 с
Катя: «Свети под ноги. Спускайся дальше, я с тобой.»
Мама: «Ещё этаж прошла. Слышу тебя, только говорить на ходу тяжело.»
### Вернись за фонарём — 11 с
Катя: «Вернись в квартиру. Возьмём фонарь и попробуем снова.»
Мама: «Вернулась. Я у входа. Сейчас поищу.»
### Попробуй дверь бокового тамбура — 17 с
Катя: «Попробуй запасным ключом дверь сбоку.»
Мама: «Ключ идёт, а дверь держит. Ручка опустилась... Если её приподнять, язычок выходит. Я запомнила.»
Знания: Боковая дверь просела. Сначала приподнять ручку, потом повернуть ключ.
### Приподними ручку и поверни ключ — 9 с
Катя: «Ручку вверх, потом поверни ключ.»
Мама: «Открыла. Захожу внутрь.»
### Найди место, где слышно — 12 с
Катя: «Я тебя теряю. Найди место, где голос не пропадает.»
Мама: «На полке у входа ловит. Если держать в руках дальше внутри, совсем ничего не слышно.»
Знания: Внутри тамбура голос исчезает. На полке у входа телефон ещё ловит.
### Телефон — на полку у входа — 6 с
Катя: «Телефон на полку у входа. Громкую связь.»
Мама: «Поставила. Слышу тебя.»
### Спроси о месте подальше от окон — 10 с
Катя: «Мам, у тебя есть место подальше от окон? Телефон держи с собой.»
Мама: «Перешла в коридор, сижу у шкафа. Телефон со мной. Говори со мной.»
### Вернись к вещам у двери — 9 с
Катя: «Вернись, пожалуйста, к входной двери. Нужно ещё кое-что взять.»
Мама: «Я у тумбочки. Что именно взять?»
### Постучи соседке — 13 с
Катя: «Постучи в другую квартиру. Вдруг кто-то дома и поможет.»
Мама: «Никто не отвечает. Ни голосов, ни шагов. Не знаю, есть ли тут кто-нибудь.»
Знания: Из другой квартиры никто не ответил на стук. Катя не знает, есть ли там кто-нибудь.
### «Мам, я здесь» — 7 с
Катя: «Мам, я здесь. Я слышу тебя. Давай по одному действию.»
Мама: «Хорошо. По одному. Мне так легче.»
### «Я люблю тебя» — 8 с
Катя: «Мам, я люблю тебя. Я очень хочу, чтобы ты это слышала.»
Мама: «Я знаю, Катюш. И я тебя. Слышишь? И я тебя.»
## Последовательность знаний
Номер звонка не создаёт знаний. В первом разговоре мама просит помочь открыть письмо соседки о ключе от тамбура. Соседка уехала и оставила маме сейф с запасным ключом; код прислала письмом. Об этой истории Катя узнаёт только из следующего полного ответа мамы. Только после этой полной реплики Катя может вернуться к письму в следующей попытке. Эта просьба ещё не сообщает про сейф или код. Вступления четвёртого и пятого звонков используют письмо и код только при наличии услышанных подсказок; иначе звучит нейтральная просьба описывать происходящее. Названия глав не раскрывают неизвестную находку. Вопрос о плане требует самого плана в руках мамы; вопросы о лестнице и ручке — нахождения на площадке и соответствующего контекста. Прерванная реплика не завершает открытие. Память показывает только подтверждённые сведения, а не догадки Кати.
| Подсказка | Мама сообщает её в репликах |
|---|---|
| У входа стоят тумбочка и сумки, висит синяя куртка. Мама лишь предположила, что ключи в ней. | look_m |
| Мама хранит фонарь в ящике. | look_m, lamp_search_m, call_03_m |
| Мама нашла ключи в правом кармане синей куртки у двери. | keys_search_m |
| У фонаря перевёрнута одна батарейка. Нужно повернуть её. | lamp_search_m |
| Мама не смогла открыть важное письмо в почте. Попросила Катю помочь, когда та приедет. | intro_02 |
| Соседка прислала маме важное письмо о ключе от общего тамбура. Катя услышала это в первом разговоре. | intro_02 |
| В важном письме есть сведения о сейфе. Ноутбук работает только от сети. | mail_hint_m |
| Соседка уехала и оставила маме сейф с запасным ключом от общего тамбура. Код прислала письмом. | mail_hint_m |
| Код сейфа: 0417. Он стоит в нижнем отделении шкафа. | read_mail_m |
| В сейфе — запасной ключ от бокового тамбура и старый план этажа. | safe_m |
| Лестница целая. Лампы в подъезде давно не горят. Без фонаря мама не различает ступени; с фонарём может спускаться. | stairs_m, stairs_lit_m |
| Боковая дверь просела. Сначала приподнять ручку, потом повернуть ключ. | side_try_m |
| Внутри тамбура голос исчезает. На полке у входа телефон ещё ловит. | phone_test_m |
| На плане из сейфа — боковой тамбур: помещение без окон рядом с лестницей. | safe_m |
| Из другой квартиры никто не ответил на стук. Катя не знает, есть ли там кто-нибудь. | neighbor_m |
## Исходы
Шесть исходов зависят от фактического места мамы и состояния связи в момент удара. Нет счёта за спасённых, наказания за доброту или утверждения, что правильная последовательность гарантирует выживание.
**На лестнице.** С фонарём мама смогла начать спуск. Катя слышала её шаги между этажами, затем связь оборвалась. Успела ли мама дойти вниз — неизвестно.
**Фраза оборвалась.** После грохота — тишина. Катя смотрит на номер мамы. На экране нет ответа о том, что произошло в квартире.
**Я тебя слышу.** Мама успела перейти во внутренний коридор. Звонок оборвался. Катя знает, где она была секунду назад. Что с ней сейчас — нет.
**По другую сторону двери.** Мама успела выйти на площадку. В последний момент Катя слышала только шаги. Связь потеряна; это не ответ, жива ли мама.
**Вне сети.** Мама дошла до бокового тамбура. Её голос исчез раньше грохота. Катя не может отличить плохой сигнал от беды.
**Катя?...** После удара мама успела ответить. Через несколько секунд сеть исчезла. Она была жива в эту секунду. Что будет дальше, игра не знает.
После удара экран становится полностью чёрным. Через две секунды звучит последняя фраза Кати; в исходе со связью перед ней слышен короткий ответ мамы. После окончания аудио по центру появляется плавающая надпись «Позвонить Маме». Она начинает следующую попытку. Исход, текст разговора и все пять сообщений доступны через Esc. Весь интерфейс использует Arimo Bold, включая телефоны, облако и журнал.
## Алгоритм проверки всех исходов
1. Первый разговор: дождаться 90 секунд — «Фраза оборвалась».
2. Во внутренний коридор → дождаться удара — «Я тебя слышу».
3. Найти ключи → выйти на площадку → дождаться удара — «По другую сторону двери».
4. Разведка: в первом разговоре услышать про письмо соседки о ключе → в следующем звонке вернуться к её просьбе → узнать историю сейфа → помочь открыть и прочитать до отключения питания. В следующих попытках взять ключи, проверить фонарь, открыть сейф, выйти, попробовать боковую дверь. Запоминается способ открыть её.
5. После этих открытий: ключи из куртки (6 с) → фонарь с батарейкой (9 с) → сейф (15 с) → площадка (11 с) → ручка и ключ (9 с) — мама в тамбуре. Без установки телефона исход «Вне сети».
6. В тамбуре найти место, где слышно (12 с), и в этой или следующей попытке поставить телефон на полку (6 с). На 90-й секунде исход «Катя?..». Оставшееся время можно провести в разговоре.
Отдельный путь вниз: взять ключи и исправный фонарь → выйти на площадку → спускаться с фонарём → продолжить спуск. Каждый этап занимает 20 секунд, связь может оборваться между этажами: исход «На лестнице». Без фонаря мама не видит ступеней и остаётся на площадке; можно вернуться за фонарём. Лампы подъезда давно не работают, это не новое отключение на 45-й секунде. В меню «Проверка сцен» доступны все десять звонков, чистый или накопленный набор знаний. Этот режим не меняет память основного прохождения. Режим с полными знаниями позволяет быстро проверить маршруты; обычная игра открывает их только через завершённые действия.
## Озвучка
Все 55 реплик Кати озвучены через ElevenLabs голосом Jessica — Playful, Bright, Warm (eleven_v4). Все 61 реплика мамы озвучена Carol — Relatable, Real, Likeable Grandma. Для обеих героинь прописаны интонационные задачи, паузы и произношение сложных слов; телефонный фильтр применяется к маме. Длительности игровых действий учитывают полные записи обеих сторон. Все реплики хранятся отдельно, с постоянными ID, в data/phone_story.json и assets/voice/. Замена WAV не требует переписывать сценарий.
## Пять сообщений от подруги
В каждом звонке Аня присылает пять сообщений. Уведомление появляется поверх разговора, звучит короткий сигнал. Можно открыть переписку или закрыть баннер; чтение не останавливает время и не отменяет просьбу маме. Непрочитанное остаётся в переписке. Пятое сообщение приходит через две секунды после удара и остаётся в переписке без баннера и звука, чтобы не нарушать полностью чёрный экран с голосом Кати. Прочитать его можно через Esc → «Сообщения от подруги». Между попытками переписка начинается заново, а после обрыва доступна до следующего звонка.
0:17 — Аня: «Кать, у вас тоже тревога?»
0:34 — Аня: «Я сижу в коридоре. Ты как?»
0:56 — Аня: «Сообщения еле уходят. Напиши, когда сможешь.»
1:16 — Аня: «Ты читала новости? Там переговоры, походу скоро все закончится»
1:32 — Аня: «Кать в твой дом походу попали...»
+36
View File
@@ -0,0 +1,36 @@
param([string]$GodotPath = "", [ValidatePattern('^[A-Za-z0-9_-]+$')][string]$OutputFolder = 'Windows')
$ErrorActionPreference = "Stop"
$projectRoot = $PSScriptRoot
if (-not $GodotPath) {
$GodotPath = Join-Path $projectRoot 'tools\godot\Godot_v4.3-stable_win64_console.exe'
}
if (-not (Test-Path -LiteralPath $GodotPath)) {
throw 'Укажите -GodotPath с полным путём к Godot 4 console executable.'
}
$project = Join-Path $projectRoot 'do-otboy'
$output = Join-Path (Join-Path $projectRoot 'builds') $OutputFolder
New-Item -ItemType Directory -Force -Path $output | Out-Null
$presetPath = Join-Path $project 'export_presets.cfg'
$originalPreset = [IO.File]::ReadAllText($presetPath)
$localTemplate = Join-Path $projectRoot 'tools\templates\windows_release_x86_64.exe'
try {
if (Test-Path -LiteralPath $localTemplate) {
$newPreset = $originalPreset.Replace('custom_template/release=""', 'custom_template/release="../tools/templates/windows_release_x86_64.exe"')
[IO.File]::WriteAllText($presetPath, $newPreset, [Text.UTF8Encoding]::new($false))
} else {
$newPreset = $originalPreset.Replace('custom_template/release="../tools/templates/windows_release_x86_64.exe"', 'custom_template/release=""')
[IO.File]::WriteAllText($presetPath, $newPreset, [Text.UTF8Encoding]::new($false))
}
& $GodotPath --headless --path $project --editor --import --quit
if ($LASTEXITCODE -ne 0) { throw 'Godot import failed.' }
& $GodotPath --headless --path $project --export-release 'Windows Desktop' (Join-Path $output 'DoOtboy.exe')
if ($LASTEXITCODE -ne 0) { throw 'Godot export failed.' }
Copy-Item -LiteralPath (Join-Path $projectRoot 'GODOT_LICENSE.txt') -Destination $output -Force
Copy-Item -LiteralPath (Join-Path $projectRoot 'FONT_LICENSE.txt') -Destination $output -Force
Copy-Item -LiteralPath (Join-Path $projectRoot 'README_RU.md') -Destination $output -Force
Copy-Item -LiteralPath (Join-Path $projectRoot 'SCENARIO_RU.md') -Destination $output -Force
Copy-Item -LiteralPath (Join-Path $projectRoot 'AUDIO_CREDITS.md') -Destination $output -Force
Write-Output "Готово: $output\DoOtboy.exe"
} finally {
[IO.File]::WriteAllText($presetPath, $originalPreset, [Text.UTF8Encoding]::new($false))
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More