• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

In Progress Wall collision research tool - Wall Collision Raycast Draw

tauKhan

Smash Lord
Joined
Feb 9, 2014
Messages
1,349
Code:
$Wall Collision Raycast Draw v0.5 [tauKhan]
* Prints negative wall collision tests (no collision) with yellow lines, positive with red.
*Uses Mytoc Block 216 -0x3EB0(rtoc)

C203048C 0000004D
9421FFC0 BE810008
8082C154 3884000C
80A28760 38600C00
4800001D 8082C154
38840004 38600180
3CA0FF00 48000009
48000204 7C0802A6
90010004 9421FF10
BF8100B0 906100E4
908100E0 90A100E8
DBE100D8 DBC100D0
DBA100C8 DB8100C0
3D808036 618CA288
7D8803A6 4E800021
3D808036 618C5F28
7D8803A6 4E800021
38600000 3D808033
618CD350 7D8803A6
4E800021 3D808033
618CC3C8 7D8803A6
4E800021 38600009
38800001 3D808033
618CBF00 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808033 618CC414
7D8803A6 4E800021
3D808036 618CA288
7D8803A6 4E800021
3881007C 3D808036
618C95F0 7D8803A6
4E800021 38600000
3D808034 618C1510
7D8803A6 4E800021
3861007C 38800000
3D808034 618C1494
7D8803A6 4E800021
38600001 38800003
38A00000 3D808034
618C0DC0 7D8803A6
4E800021 38600010
38800000 3D808033
618CD240 7D8803A6
4E800021 83E100E0
A39F0002 3BA00000
83FF0004 83C100E4
7FFBFB78 7C1DE000
40A00088 80828764
800100E8 3861002C
90810040 9001002C
3D808005 618C8ACC
7D8803A6 4E800021
386000B0 38800000
38A00002 3D808033
618CD0DC 7D8803A6
4E800021 3C80CC01
38600002 7C6903A6
C43B0004 C45B0004
C41B0004 D0248000
D0448000 D0048000
4200FFE8 3BBD0018
7C1FF214 7C1B0000
4180FF84 83FF0000
7FFBFB78 4BFFFF78
CBE100D8 CBC100D0
CBA100C8 CB8100C0
BB8100B0 806100E4
808100E0 382100F0
80010004 7C0803A6
4E800020 3860FFFF
3D808036 618C1FC4
7D8803A6 4E800021
BA810008 38210040
3D808003 618C0AC4
7D8803A6 4E800021
60000000 00000000
C20439AC 00000002
8082C154 93E40014
389D0000 00000000
C216E2D4 00000042
48000025 00000000
00000000 00000000
00000000 00000000
00000000 41000000
40000000 7D8802A6
3C600000 906C0000
9182C154 398C003C
9182C150 480001C4
7D8802A6 91810004
9421FFF8 8182C154
83EC0000 2C1F0000
41A20150 83E2C154
83FF0000 3F808048
83BC9D60 7C1DF800
41A20020 4800003D
38600000 B07F0002
48000041 B07F0002
83E2C154 93BF0000
3FE08048 8BFF9D33
2C1F0004 41A200F8
2C1B0000 41A2002C
48000009 48000028
83E2C154 3BFF0004
3BC00180 4E800020
83E2C154 3BFF000C
3BC00C00 4E800020
4BFFFFF1 A3BF0002
7F5DF3D6 8B9F0000
7C1AE000 7F9AF1D6
3B5A0001 7F4903A6
7F9CE850 4081000C
42200004 3B40FFFF
83BF0004 4260000C
83BD0000 4BFFFFF8
2C1AFFFF 41A20050
7FBDE214 83C2C154
807E0014 38630001
C3FE0018 C3DE001C
7C6903A6 EFFFF02A
4200FFFC D6DD0004
D6FD0004 D7FD0004
D71D0004 D73D0004
D7FD0004 A3BF0002
3BBD0018 B3BF0002
48000034 7FC3F378
38630004 3D808037
618CF1E4 7D8803A6
4E800021 907D0000
7C7D1B78 887F0000
38630001 987F0000
4BFFFF88 7F63DB78
38210008 81810004
7D8803A6 4E800020
3BEC0004 38600184
48000019 83E2C154
3BFF000C 38600C04
48000009 4BFFFE98
7D8802A6 91810004
9421FFF8 3D808037
618CF1E4 7D8803A6
4E800021 907F0004
38210008 81810004
7D8803A6 38600000
907F0000 4E800020
3C608047 3BE3B6A0
60000000 00000000
04218D68 C8228000
C2050D20 00000002
8182C150 7D8803A6
4E800021 00000000
C2050534 00000002
8182C150 7D8803A6
4E800021 00000000
C2050584 00000003
9421FEF8 D02100F8
D04100FC D0610100
D0810104 00000000
C2050968 00000004
C2C100F8 C2E100FC
C3010100 C3210104
8182C150 7D8803A6
4E800021 00000000
04050970 8001010C
040509ac 38210108
C2050D70 00000003
9421FEF8 D02100F8
D04100FC D0610100
D0810104 00000000
C2051154 00000004
C2C100F8 C2E100FC
C3010100 C3210104
8182C150 7D8803A6
4E800021 00000000
0405115C 8001010C
04051198 38210108
Explanation:

Each yellow or red line printed in front of an entity marks a collision test done by the game. The game detects a wall collision if one of the lines intersects with a wall. Yellow color signifies no collision, red color that collision occurred. Additionally, when multiple collision checks are performed consequently for the same object, the most recent ones will be printed closer to camera on z-axis, the older closer to the object. Multiple collision checks happen when the object is moving at high speed or there's a large ecb change. Then the game will run physics at smaller chunks: it runs a loop of "partial ecb update" (vertices between old ecb and new ecb) into partial movement into collision logic. In the fox illusion picture, the physics update was divided into 4 parts.



Purpose:

The aim of the code is to aid understanding and visualize how wall collision logic works in Melee. I also see some potential in improving the collision detection in order to prevent (the rarely occurring) wall clipping.



The above pic of ICs side-b ledge clip on Battlefield showcases a shortcoming of the collision detection: A short wall can be immediately "galloped" by ECB change, in which case all the raycasts may miss the wall. A simple ECB side-to-side or "center"-to-side test could prevent that clip.


Additional details:

The code will also draw out rays for objects that develop mode ECB display ignores:





Special thanks to Achilles for publishing his "scratch pad" notes from 20xx development. The line drawing functionality of this code is for a large part copying DI draw from 20xx 4.06.

MCM injection mod version of the code will be added later.
 

Attachments

Top Bottom