Compare commits
2 Commits
18f944d9eb
...
e031595dc4
| Author | SHA1 | Date | |
|---|---|---|---|
| e031595dc4 | |||
| c48761ef20 |
@@ -18,7 +18,7 @@
|
||||
|
||||
Запуск: Demon.exe. Godot для игры устанавливать не нужно.
|
||||
|
||||
F5 — добавить 1000 золота, выставить максимальный опыт (уровень 10) и заполнить запас душ до 10 000 000. Повторные нажатия не дублируют очки навыков.
|
||||
F5 — добавить 1000 золота, 1000 душ и один уровень (до уровня 10). За новый уровень даётся одно очко навыков; на максимальном уровне добавляются только валюты. Удержание клавиши не повторяет бонус.
|
||||
|
||||
- Внизу появилась полоса опыта с уровнем и свободными очками навыков.
|
||||
- За золото покупаются новые типы орудий и их экземпляры. Улучшения, закалка и ранги орудий удалены из гримуара, строительства и расчёта наград.
|
||||
|
||||
@@ -6,6 +6,7 @@ var ropes=[]
|
||||
var heat_materials=[]
|
||||
var heat_light: OmniLight3D
|
||||
var heat=0.0
|
||||
var applied_heat=-1.0
|
||||
var tension=0.0
|
||||
var submerged=false
|
||||
var splash_count=0
|
||||
@@ -57,6 +58,17 @@ func setup(game,development):
|
||||
|
||||
func reset():
|
||||
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):
|
||||
var i=g.index_of(g.working)
|
||||
@@ -88,8 +100,4 @@ func update(dt,active):
|
||||
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
|
||||
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)
|
||||
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
|
||||
apply_heat()
|
||||
|
||||
@@ -119,9 +119,9 @@ func reward(amount=20):
|
||||
|
||||
func test_boost():
|
||||
g.coins+=1000
|
||||
g.essence=preload("res://progression.gd").MAX_RESOURCE
|
||||
xp=Economy.XP_THRESHOLDS.back()
|
||||
points=maxi(0,Economy.XP_THRESHOLDS.size()-1-g.speed_level-action_level-leadership)
|
||||
g.essence+=1000
|
||||
var current=Economy.level(xp)
|
||||
if current<Economy.XP_THRESHOLDS.size():reward(Economy.XP_THRESHOLDS[current]-xp)
|
||||
g.refresh_ui()
|
||||
g.save_progress()
|
||||
g.say("Казна одобрила внеплановое финансирование.")
|
||||
|
||||
@@ -85,20 +85,25 @@ func run(g):
|
||||
Input.parse_input_event(key)
|
||||
await g.get_tree().process_frame
|
||||
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(dev.points==9,"F5 grants maximum available skill points")
|
||||
w.upgrade("speed");w.upgrade("power");w.upgrade("leadership")
|
||||
check(dev.points==6,"three learned skills consume three points")
|
||||
g.essence=12;cash=g.coins;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.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==2,"one skill point granted per gained level")
|
||||
w.upgrade("speed");w.upgrade("power")
|
||||
check(dev.points==0,"learned skills consume earned points")
|
||||
g.essence=12;cash=g.coins;dev.xp=250;dev.test_boost()
|
||||
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
|
||||
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")
|
||||
snap=g.progress_snapshot();path="user://qa_f5_v019.json"
|
||||
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))
|
||||
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")
|
||||
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)
|
||||
g.get_tree().quit()
|
||||
|
||||
@@ -12,3 +12,4 @@ func build(g,d):
|
||||
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.material_override=g.mat(Color("ff8735"),true);d.flame.hide()
|
||||
d.flame.cast_shadow=GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
|
||||
|
||||
@@ -22,6 +22,9 @@ func run(g):
|
||||
var textured=0
|
||||
for mesh in surfaces:
|
||||
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()):
|
||||
var mat=mesh.mesh.surface_get_material(i)
|
||||
if mat is StandardMaterial3D and mat.albedo_texture!=null:textured+=1
|
||||
@@ -59,6 +62,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")
|
||||
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(not d.motion.heat_light.visible,"cooled heat light leaves rendering")
|
||||
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")
|
||||
g.get_tree().quit(1 if failures else 0)
|
||||
|
||||
@@ -73,16 +73,23 @@ func burn(s):
|
||||
burns.append({"root":s.node,"fx":fx,"materials":materials,"t":0.0,"sparks":sparks,"light":light})
|
||||
|
||||
func update(dt):
|
||||
var profiling=g.get_meta("profile_life",false)
|
||||
var activity_us=0;var movement_us=0;var gait_us=0
|
||||
activities.update_marks(dt)
|
||||
for imp in imps+neighbours:
|
||||
var tick=Time.get_ticks_usec() if profiling else 0
|
||||
var busy=activities.update(imp,dt)
|
||||
if profiling:activity_us+=Time.get_ticks_usec()-tick;tick=Time.get_ticks_usec()
|
||||
if not busy:
|
||||
imp.patrol_age+=dt
|
||||
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)
|
||||
if imp.has("origin"):move_neighbour(imp,imp.patrol_target,dt)
|
||||
else:move_imp(imp,imp.patrol_target,dt)
|
||||
if profiling:movement_us+=Time.get_ticks_usec()-tick;tick=Time.get_ticks_usec()
|
||||
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))
|
||||
for i in range(burns.size()-1,-1,-1):
|
||||
var b=burns[i];b.t+=dt
|
||||
for mat in b.materials:mat.set_shader_parameter("progress",b.t/1.7)
|
||||
|
||||
@@ -6,6 +6,8 @@ const BRASS=Color("8b6842")
|
||||
const DARK=Color("14171c")
|
||||
var g
|
||||
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.
|
||||
const IRON_REGION=Vector4(.41015625,.1875,.0234375,.0234375)
|
||||
const BRASS_REGION=Vector4(.6796875,.5859375,.0234375,.0234375)
|
||||
@@ -16,6 +18,9 @@ func metal(brass=false):
|
||||
return material
|
||||
func line_lining(model):
|
||||
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
|
||||
for surface in range(node.mesh.get_surface_count()):
|
||||
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.surface_set_material(surface,metal())
|
||||
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):
|
||||
var shape=PROFILE[0]
|
||||
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
|
||||
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):
|
||||
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):
|
||||
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.
|
||||
for h in [.31,.76,1.28,1.80,2.16]:
|
||||
arc(root,h,a+.035,b-.035,.013,IRON)
|
||||
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):
|
||||
var angle=lerpf(a,b,float(k)/5)
|
||||
for j in range(12):
|
||||
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.
|
||||
for h in [1.02,1.55,2.00]:
|
||||
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)]
|
||||
for k in range(4):g.line(root,corners[k],corners[(k+1)%4],.008,BRASS)
|
||||
g.ball(root,point(h,angle,.039),Vector3.ONE*.043,BRASS)
|
||||
for k in range(4):tube(root,corners[k],corners[(k+1)%4],.008,BRASS)
|
||||
rivet(root,point(h,angle,.039),Vector3.ONE*.043,BRASS)
|
||||
for side in [-1,1]:
|
||||
for k in range(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 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)
|
||||
g.line(root,p,q,.007,BRASS)
|
||||
tube(root,p,q,.007,BRASS)
|
||||
merge(root)
|
||||
remember_detail(root,title)
|
||||
return root
|
||||
func merge(root):
|
||||
# Batch fixed decorations by metal, separately for the body and each moving leaf.
|
||||
@@ -76,7 +104,7 @@ func merge(root):
|
||||
for key in batches:
|
||||
var mesh=batches[key].tool.commit();var mat=metal(batches[key].color==BRASS)
|
||||
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):
|
||||
g=game
|
||||
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(right,right.position,PI*1.5,TAU,"InnerRightDetail")
|
||||
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
|
||||
for j in range(-7,8):
|
||||
var x=j*.072;var reach=sqrt(maxf(0,1-pow(x/.58,2)))*.34
|
||||
g.box(floor_root,Vector3(x,.268,0),Vector3(.026,.027,reach*2),IRON)
|
||||
for z in [-.23,0,.23]:g.box(floor_root,Vector3(0,.259,z),Vector3(1.02,.018,.022),BRASS)
|
||||
merge(floor_root)
|
||||
if not restore_detail(floor_root,"InnerGrate"):
|
||||
var plate=g.cylinder(floor_root,Vector3(0,.24,0),.61,.035,DARK);plate.scale.z=.61
|
||||
for j in range(-7,8):
|
||||
var x=j*.072;var reach=sqrt(maxf(0,1-pow(x/.58,2)))*.34
|
||||
g.box(floor_root,Vector3(x,.268,0),Vector3(.026,.027,reach*2),IRON)
|
||||
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"
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
+6
-1
@@ -88,6 +88,7 @@ func _ready():
|
||||
var args=OS.get_cmdline_user_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
|
||||
test_mode=test_mode or "--test-maiden-performance" in args
|
||||
if FileAccess.file_exists("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))
|
||||
@@ -144,7 +145,8 @@ func _ready():
|
||||
say("Первый день. Последняя надежда на отпуск.")
|
||||
refresh_ui()
|
||||
if automatic: build_auto_arm()
|
||||
if "--test-iron-maiden" in args:call_deferred("run_iron_maiden_tests")
|
||||
if "--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-exit" in args: call_deferred("test_exit")
|
||||
elif "--test-audio" in args: call_deferred("run_audio_tests")
|
||||
@@ -1017,3 +1019,6 @@ func run_intro_tests():
|
||||
|
||||
func run_iron_maiden_tests():
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
func build(root):
|
||||
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 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
|
||||
|
||||
@@ -31,7 +31,7 @@ func run(g):
|
||||
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")
|
||||
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,"Проверка")
|
||||
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")
|
||||
|
||||
@@ -357,19 +357,24 @@ func run_ui(g):
|
||||
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")
|
||||
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 down in [true,false]:
|
||||
var boost=InputEventKey.new();boost.keycode=KEY_F5;boost.physical_keycode=KEY_F5;boost.pressed=down
|
||||
Input.parse_input_event(boost)
|
||||
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")
|
||||
var spent_points=g.development.points
|
||||
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()
|
||||
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())
|
||||
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()
|
||||
key.keycode=KEY_ESCAPE
|
||||
key.pressed=true
|
||||
|
||||
+41
-1
@@ -9,13 +9,53 @@
|
||||
- Репозиторий: https://gt.arcade.4bqb.com/jariko/Diabolo.git
|
||||
- Большие `.glb` хранятся в Git LFS. После клонирования выполнить `git lfs pull`.
|
||||
- Старые папки версий, ZIP, готовые Windows-сборки, движок и кэш остаются локально.
|
||||
На рабочем ПК JariKo свежий EXE пересобран 2026-10-29 из `b0f3b02`:
|
||||
На рабочем ПК JariKo свежий EXE пересобран 2026-10-29 из `c48761e`:
|
||||
`Demon_v0.19_Windows/Demon.exe`. На других ПК локальные EXE могут быть старее.
|
||||
- Для запуска текущего состояния открывать `Demon_v0.19/project.godot`.
|
||||
Инструкции сборки и запуска — в `README.md`.
|
||||
|
||||
## Последние выполненные задачи
|
||||
|
||||
- **Актуальный EXE после F5/оптимизации девы (2026-10-29):** импорт/экспорт
|
||||
Godot 4.3 PASS из `c48761e`; готовый EXE прошёл `--test-economy` (251)
|
||||
и `--test-iron-maiden` без ошибок. Build ID: `0.19-0ca1f6fa08323c398f7be46c`.
|
||||
SHA256: `2A8E88B95F757BD0F345F37387294F48937D2BFAC28C299360B8C4C76EDBFF89`.
|
||||
Запуск: `Demon_v0.19_Windows/Demon.exe`. Сопроводительные документы и
|
||||
локальный BUILD_MANIFEST.json обновлены; EXE и QA-логи не публикуются в Git.
|
||||
|
||||
- **F5 и нагрузка железной девы (2026-10-29):** одно нажатие теперь добавляет
|
||||
1000 золота, 1000 душ и опыт до следующего уровня. Один новый уровень даёт
|
||||
одно очко; на уровне 10 добавляются только валюты. Эхо/отпускание клавиши
|
||||
бонус не повторяют. `--test-economy` PASS, 251 проверка, включая неполный
|
||||
уровень, максимум, потраченные очки и сохранение.
|
||||
- Внутренняя отделка девы облегчена с 195048 до 49272 треугольников:
|
||||
низкая детализация поперечного сечения мелких трубок/заклёпок, без изменения
|
||||
внешней Meshy-сетки, рисунка отделки, PBR-карт и петель. Геометрия отделки
|
||||
и обшивки кэшируется между устройствами, материалы нагрева независимы.
|
||||
Убраны тени и отдельные коллайдеры внутренней отделки: физика внешнего
|
||||
корпуса/створок сохранена. Остывший источник накала скрывается; параметры
|
||||
нагрева отправляются в материалы только при изменении.
|
||||
- Добавлен `--test-maiden-performance`: реальные кадры основного игрового цикла,
|
||||
три использования, сгорание/остывание, сценовые объекты/видеопамять,
|
||||
четыре девы и отдельный замер с замороженными демонятами. Навигация после
|
||||
размещения перестраивается, как в настоящем строительстве. В раннем варианте
|
||||
проверки не хватало этой перестройки; его FPS не считать сравнением игры.
|
||||
После исправления сценария: стабильного накопления душ/эффектов/видеопамяти
|
||||
и постоянного падения FPS после циклов на этом ПК не подтверждено.
|
||||
Повторное создание девы: около 0.87–0.88 с до оптимизации против 0.12 с
|
||||
после; четыре девы: около 15.17 млн против 9.63 млн отрисованных примитивов.
|
||||
Медиана кадра с четырьмя девами в обоих корректных прогонах около 9.46 мс:
|
||||
не обещать рост FPS пропорционально снижению геометрии. Пики времени кадра
|
||||
зависят также от движения демонят/активностей; для дальнейшей диагностики
|
||||
их CPU-время выводится при включённом test-only профилировании life.update.
|
||||
Результаты и логи остаются в локальных captures/qa_v19.
|
||||
- Проверки правок: `--test-maiden-performance`, `--test-iron-maiden`,
|
||||
`--test-mesh`, `--test-building` (24), `--test-single-punishment` — PASS.
|
||||
Проверены независимость нагрева кешированных устройств, общие текстуры,
|
||||
отсутствие коллизий/теней внутреннего декора и выключение остывшего света.
|
||||
Открытая дева просмотрена визуально. Исправлен старый fixture в mesh-тесте:
|
||||
перед спавном тестовой души теперь устанавливается устройство.
|
||||
|
||||
- **Билд для игры на рабочем ПК (2026-10-29):** повторный импорт и экспорт
|
||||
Godot 4.3 прошли, сборка из `b0f3b02`, игровой код тот же, что в `ebe00c3`.
|
||||
Build ID: `0.19-3feb996c59044da8438841ea`.
|
||||
|
||||
Reference in New Issue
Block a user