Site hosted by Angelfire.com: Build your free website today!

End to the black hole syndrome

I would like to thank CERDIP especially here. He's the one that first explained how these things work.

The first thing to do is to make sure you have your tunnels all aligned pixel perfect(see answer 3, this is very important because you might get pop outs to the surface)
Save the mission.

Now You have to tell the game which things need to be visible/invisible while on the surface. So open the .mis file with note pad. You'll see all kinds of stuff. The first part is the General information, groups, events, layers, ect. What your looking for is the items you put in. Should look something like this.

Lets start with the tunnel entrance. This has to be seen both into from above ground and from within the tunnels. So to be seen above ground you have to set it as a Parent. The actual text goes "blink_parent_@ #" (@ being a {the primary visibility group} or b {the secondary visibility group} {a/b helps with frame rate and I'll explain this a little further down](correction, a/b alows one object to have two blink-groups) , # is a number 1 - possibly 127 (I know NL has used up to 63). For this, lets put it as blink_parent_a 1. You just type the listing right after "edistances 16 1024" and before "end item". Should look like this.

Now, you have to tell the tunnel entrance to be part of the rest of the tunnels. You do this by assigning it a group. The text is "blink_group_@ #" (the @ and # can be different from the parent, but has to be the same as the adjoining piece of tunnel) You place this text before the parent listing. So now your item text should look like this.

Now the entrance is set. Lets move on to the next piece of the tunnel. It has to be seen from the entrance and any other pieces that are connected to it. So you have to set it's "group" to the same number as the entrance. So locate this piece in your .mis file and add it the same way you did before with the entrance. Looking like this:

edistances 16 1024
blink_group_a 1
end item

Now if you have a small tunnel complex and your not worried about degrading frames rates, then all you have to do is set the rest of your tunnel pieces to "blink_group_a 1" and any other entrances to "blink_parent_a 1". Save the .mis. DO NOT "Save as" a text file. Just click "Save". Then go to your MED. Reopen the Mission. Export it and your done.

But if you have a super large tunnel complex with multiple levels and people are always complaining about lag in your map when you know that there is none with your duel 1.5G P-IV, thats not hooked to the internet because your part of the back bone. Then what is happening is that you have so many pieces to the tunnel that the poor little 2 mg video card that everyone seems to play with is having a stroke because it can't draw all those triangles and polygons or what ever and keep track of your perspective to them. So read on!

Lets first break down the actual command of blink.

blink_group_ - This is just a command like "open" or "save" or if you know anything about HTML then it's like {img src=}

a - this tells the computer to "draw all this first".
b - this tells the computer to "draw all this second".

# - the numbers designate all things alike. So if you set ten tunnel pieces to "1" then you have ten tunnel pieces that the computer will draw all at the same time.

To cut down on the degradation of frames rates you need to have many "numbers" and where they over lap in fields of view. you assign them "blink_group_a" and "blink_group_b". This way you can look down a long tunnel and still see every thing, but the computer is not drawing the floor above you or below you or things around five corners that will take 30 seconds to get to.

The pictures below are straight from one of the single player maps. It shows three blink groups.

The light blue is "blink_group_a 1"
The dark blue is "blink_group_a 2"
The red is " blink_group_a 3"

Now standing in the room of the light blue group, all you would need to have ready to see is the dark blue group. You wouldn't need to see what's going on in the red group. So what you have to do is set all the items in the light blue group to "blink_group_a 1" and "blink_group_b 2" looking like this

While in the dark blue group it will be "blink_group_ a 2". As the dark blue nears the red, you have start getting ready for it. So in the areas nearest red group you put in the additional line of "blink_group_b 3". Here's how the picture above breaks down by room.

1- group_a 3/ parent_a 1 13 - group_a 2/ group_b 3 25 - group_a 2
2 - group_a 3 14 - group_a 2/ group_b 3 26 - group_a 2/ group_b 3
3 - group_a 2/ group_b 3 15 - group_a 2/ group_b 3 27 - group_a 2
4 - group_a 2/ group_b 3 16 - group_a 2/ group_b 3 28 - group_a 2
5 - group_a 2/ group_b 3 17 - group_a 2/ group_b 3 29 - group_a 1/ group_b 2
6 - group_a 2/ group_b 3 18 - group_a 2/ group_b 3 30 - group_a 1/ group_b 2
7 - group_a 2/ group_b 3 19 - group_a 2/ group_b 3 31 - group_a 1/ group_b 2
8 - group_a 2/ group_b 3 20 - group_a 2 32 - group_a 1/ group_b 2
9 - group_a 2/ group_b 3 21 - group_a 2 33 - group_a 1/ group_b 2
10 - group_ a 3 22 - group_a 2 34 - group_a 1/ group_b 2
11 - group_ a 3 23 - group_a 2 35 - group_a 1
12 - group_a 2 group_b 3 24 - group_a 2 36 - group_a 2 group_b 3 see note below

I ran across Item 36 while making this page. It's very interesting because I don't think anyone has mentioned that objects could be set to blink groups too. Item 36 is an Armory Cabinet. I don't know if every Item can be set to a blink group, but still every little bit will help in cutting down frame rate degradation.

Here's another break down:

So in review:
blink_group_ - is a command that allows you to see everything underground.
blink_parent_ - is a command that allows you to see every thing above ground.
a - tells the computer to draw this when I'm in this area because I need to see it
b - tells the computer to draw this too, but with not as much emphasis, because I'm not exactly in the area but I'm coming up to it or it's so far away that it's to blurry to tell what it is anyway.
#'s - this is what is actually a group reference. It is what tells the computer that all these apples are in this basket.

Othello posted this in DF3.net and I thought It would compliment this page nicely.

Athough I have some observations about the blink group feature, I think you've done a nice job there.
Using blink_group_a 1 or blink_group_b 1 means just the same.
There is no difference (apart the character) between them. They are both contained in the same blink group # and therefore have the same transition.
The transition directly depends on the blink group # and not on the "a" or "b" label.

Ex: if you have a 10 element tunnel of the SAME blink group # with alternating "a" and "b" labels, the result will be just the same as if you were using 10 times label "a" OR 10 times label "b".

Why label "a" and "b"?
The only reason is, that it permits 1 item to have 2 different group numbers!
An item having blink_group_a 1 AND blink_group_a 2 is INPOSSIBLE.
An item having blink_group_a 1 AND blink_group_b 2 is POSSIBLE.

I agree with you that it's less memory consuming to draw only the parts of the tunnel that are visible to the player than to draw parts that are visible AND hidden to the player (behind a corner).

Examine the blink groups numbers and labels in this image:

While the player is in the red zone, he will SEE the red AND yellow zone. The blue zone will not be drawn.
If the player is in the yellow zone, he will see the yellow, red AND blue zone.
If the player is in the blue zone, he will SEE the blue AND yellow zone. The red zone will not be drawn.
Note about the yellow blink group:
it could also be blink_group_a 1 + blink_group_b 2

Thanks Othello
I hope this helps you understand the blink group things better. I would really like some feed back on weather or not it helps, so if you wouldn't mind taking a moment to post a message in the forum and letting me know. It would be greatly appreciated.