fix: collision tunneling, spawn at surface, physics substepping
- Fix: rewrite resolve_grid_collision to push body out of solid cells when center is inside (was only pushing to small radius from center) - Fix: max velocity clamp (0.8) + 4x substepping prevents tunneling - Fix: player/goblin spawn at terrain surface instead of mid-air - Fix: gravity reduced from 0.3 to 0.08 for substepping - Add: headless mode (--headless-ticks N) dumps grid state to file - Add: velocity zeroing on collision for stable resting
This commit is contained in:
@@ -0,0 +1,357 @@
|
||||
=== Verbatim Headless Run: 120 ticks ===
|
||||
|
||||
World: 250x250
|
||||
Player start: (125.0, 242.4)
|
||||
Camera: (85, 230)
|
||||
|
||||
=== Tick 0 (initial state) ===
|
||||
Camera (85, 230):
|
||||
9 0 1 2 3 4 5 6
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 @
|
||||
42 @@
|
||||
43 @@ """""""""""""
|
||||
44""" @ "":::::::::::::"""
|
||||
45:::""" """::::::::::::::::::""
|
||||
46::::::"" "":::::::::::::::::::::::"""
|
||||
47::::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::"""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(125.0,242.4) bodies=7/7 on_fire=false"
|
||||
Entities: 1
|
||||
|
||||
=== Tick 12 ===
|
||||
Camera (87, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43 """""""""""""
|
||||
44" "":::::::::::::"""
|
||||
45:""" @@ """::::::::::::::::::""
|
||||
46::::"" @@"":::::::::::::::::::::::"""
|
||||
47::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::"""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(127.1,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 1
|
||||
Alive entities: Player(hp=100, pos=(127.054695, 246.36816))
|
||||
|
||||
=== Tick 24 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43 """""""""""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.6,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 1
|
||||
Alive entities: Player(hp=100, pos=(126.642654, 246.37305))
|
||||
|
||||
=== Tick 36 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 g
|
||||
42 ggg
|
||||
43 """""""g"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 2
|
||||
Alive entities: Player(hp=100, pos=(126.91838, 246.3771)), Goblin(hp=40, pos=(141.79904, 242.62468))
|
||||
|
||||
=== Tick 48 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 g
|
||||
42 ggg
|
||||
43 """"""g""""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 2
|
||||
Alive entities: Player(hp=100, pos=(126.92547, 246.37007)), Goblin(hp=40, pos=(141.31493, 242.59508))
|
||||
|
||||
=== Tick 60 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37 g
|
||||
38 gg
|
||||
39 gg
|
||||
40 g
|
||||
41 g
|
||||
42 ggg
|
||||
43 """"""g""""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 3
|
||||
Alive entities: Player(hp=100, pos=(126.89856, 246.37102)), Goblin(hp=40, pos=(141.50412, 242.62273)), Goblin(hp=40, pos=(141.0, 238.42857))
|
||||
|
||||
=== Tick 72 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 gg
|
||||
42 ggg
|
||||
43 """"""gg"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 3
|
||||
Alive entities: Player(hp=100, pos=(126.88849, 246.36723)), Goblin(hp=40, pos=(141.31738, 242.59448)), Goblin(hp=40, pos=(141.5151, 242.62154))
|
||||
|
||||
=== Tick 84 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 gg
|
||||
42 ggg
|
||||
43 """""""g"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 3
|
||||
Alive entities: Player(hp=100, pos=(126.884605, 246.3688)), Goblin(hp=40, pos=(141.57698, 242.61453)), Goblin(hp=40, pos=(141.43205, 242.62611))
|
||||
|
||||
=== Tick 96 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 gg
|
||||
42 ggg
|
||||
43 """"""gg"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 4
|
||||
Alive entities: Player(hp=100, pos=(126.883316, 246.37033)), Goblin(hp=40, pos=(141.46056, 242.62148)), Goblin(hp=40, pos=(141.5288, 242.61539)), Goblin(hp=40, pos=(141.79904, 242.62468))
|
||||
|
||||
=== Tick 108 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 g
|
||||
42 ggg
|
||||
43 """"""gg"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 4
|
||||
Alive entities: Player(hp=100, pos=(126.882866, 246.37112)), Goblin(hp=40, pos=(141.4156, 242.61002)), Goblin(hp=40, pos=(141.47725, 242.62231)), Goblin(hp=40, pos=(141.31493, 242.59508))
|
||||
|
||||
=== Tick 120 ===
|
||||
Camera (86, 234):
|
||||
9 0 1 2 3 4 5 6
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41 gg
|
||||
42 ggg
|
||||
43 """"""gg"""""
|
||||
44"" "":::::::::::::"""
|
||||
45::""" @@ """::::::::::::::::::""
|
||||
46:::::"" @@@"":::::::::::::::::::::::"""
|
||||
47:::::::"""""""""""""""""""""""""""""""""""::::::::::::::::::::::::::::""""""""""
|
||||
48::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
49################################################################################
|
||||
50????????????????????????????????????????????????????????????????????????????????
|
||||
51????????????????????????????????????????????????????????????????????????????????
|
||||
52????????????????????????????????????????????????????????????????????????????????
|
||||
53????????????????????????????????????????????????????????????????????????????????
|
||||
54????????????????????????????????????????????????????????????????????????????????
|
||||
55????????????????????????????????????????????????????????????????????????????????
|
||||
56????????????????????????????????????????????????????????????????????????????????
|
||||
57????????????????????????????????????????????????????????????????????????????????
|
||||
58????????????????????????????????????????????????????????????????????????????????
|
||||
Player: "Player hp=100.0/100.0 pos=(126.9,246.4) bodies=7/7 on_fire=false"
|
||||
Entities: 4
|
||||
Alive entities: Player(hp=100, pos=(126.88255, 246.37636)), Goblin(hp=40, pos=(141.61978, 242.61577)), Goblin(hp=40, pos=(141.36923, 242.5867)), Goblin(hp=40, pos=(141.50412, 242.62273))
|
||||
|
||||
Reference in New Issue
Block a user