(04-07-2020, 05:32 AM)checkpoint10 Wrote: Something fun I made in Notepad! The one thing surprising on this one is that the BSPF point references needed to be reversed for the 2 right columns compared to the 2 left. Not entirely sure why that is because they are otherwise the same object which I just copied over 3 times. Anyway, it worked!!
If my object has four column then I will make it such way (column numbered from left to right):
R1: BSPF (, , ), nil, column1_right, nil;
R2: BSPF (, , ), nil, column2_right, R1;
R3: BSPF (, , ), nil, column3_right, R2;
R4: BSPF (, , ), nil, column4_right, R3;
L4: BSPF (, , ), nil, column4_left, R4;
L3: BSPF (, , ), nil, column3_left, L4;
L2: BSPF (, , ), nil, column2_left, L3;
L1: BSPF (, , ), nil, column1_left, L2;
Because front of polys of all columns are laying on same plane I can combine them in single list
F0: BSPF (, , ), nil, LIST {column1_front, column2_front, column3_front, column4_front}, L1;
Same for back polygons if they will be visible.
I think this way is optimal. BSPF function is good because we tell when polygon will be drawn by game's graphics. If our point of view is behind plane of view that we set in BSPF function then poly will not be drawn. It means less stress on graphics.
For sure there are other ways to gather columns in 3D. For example you can gather each column at first and then combine them with BSPN function.
C1a: BSPF (, , ), nil, column1_left, nil;
C1b: BSPF (, , ), nil, column1_front, C1a;
C1c: BSPF (, , ), nil, column1_right, C1b;
C2a: BSPF (, , ), nil, column2_left, nil;
C2b: BSPF (, , ), nil, column2_front, C2a;
C2c: BSPF (, , ), nil, column2_right, C2b;
C3a: BSPF (, , ), nil, column3_left, nil;
C3b: BSPF (, , ), nil, column3_front, C3a;
C3c: BSPF (, , ), nil, column3_right, C3b;
C4a: BSPF (, , ), nil, column4_left, nil;
C4b: BSPF (, , ), nil, column4_front, C4a;
C4c: BSPF (, , ), nil, column4_right, C4b;
A: BSPN (, , ), C2c, C1c;
B: BSPN (, , ), C3c, A;
C: BSPN (, , ), C4c, B;