# .font: font.text_2
2020-08-30 18:58 dustin  
# .font: font.text_1
here's what i think i've found out about the special open border implementation at this site:  
  
1. all special rules apply only for boulders and growing walls, no other elements are affected.  
2. whenever a new empty space is made (mainly, if rockford moves or snaps into dirt or a diamond), this new empty space is given a kind of "semi state". boulders andgwalls still regard this semi state as a blockade, while all other elements regard it as empty space.  
3. the "semi state" is finally turned into "100% empty space" as soon as...  
a) ...the semi state is scanned or  
b)... the cavescan for this frame ends.  
  
examples you can see in this cave:  
  
at the beginning, rockford can easily escape the boulder, as everyone would expect without open borders. with open borders, however, the boulder would usually kill rockford after the first step!   
initial situation:  
r  
.  
.  
.  
b  
r=ROCKFORD B=BOULDER  
rockford is scanned first and moves down.  
the boulder is scanned next but still in the same frame (that's what happens only at the open border!) and falls into the space where rockford has just left.  
next frame:  
b  
r  
.  
.  
.  
now the falling boulder is scanned first and kills rockford immediately, so rockford has no chance to escape!  
  
 krissz 's open border implementation fixes this, because when rockford moves down, he leaves behind not empty space, but a "SEMI STATE" which the boulder cannot immediately use to fall! so rockford escapes, as we would expect from normal bd behaviour.   
  
room #1 shows the same side effect as my "cso 65" and  Arno 's "tiny curiosity 2" caves.   
  
.r.  
hdl  
w.w  
h=HEAVY BOULDER L= LIGHT BOULDER W=WALL  
if rockford snaps down, we would normally expect the heavy boulder to fall first because it is scanned first after rockford cleared the dirt. here, however, the heavy boulder does not see empty space to its right but the "SEMI STATE" which blocks boulders, so it cannot fall. after the heavy boulder, the semi state itself is scanned and turned into real empty space, so that the light boulder can use it to fall!  
  
room #2 is one of the examples that convinces me that semi states do not exist for flies. we have technically the same scenario as in room #1, but here the left fly comes out first after rockford snaps the dirt away!  
  
room #3 is a version of the starting scenario with the boulder above rockford. here, however, if rockford collects the diamond, he will inevitably get crushed. this is the normal open border behaviour without special rules. so why does the semi state not help here? i think it must be because the semi state exists for boulders and gwalls but not for... slime! so the slime can swallow the boulder in the same frame when rockford moves down, and this boulder then inevitably crushes rockford one frame later.  
  
room #4 is where you can solve the cave, but only due to the open border implementation. normally, if rockford snaps the flies and the gwall free, the gwall is scanned first and immediately grows, blocking the flies off. with the special rules, however, the gwall sees the semi state to its right side and cannot grow immediately, so the butterfly gets its chance to get out!  
  
room #5 shows an inconsistency the open border causes, which the special rules don't cope with. normally, rockford can escape a firefly in a tunnel where the fly touches him from rockford's right side. however, as soon as rockford crosses the open border, there's one single frame where the fly is scanned before rockford, so the fly explodes. of course, for maximum drama, i set the open border directly before the exit! :D  
  
all this is of course only my theory about what special open border implementation  krissz  came up with in order to fix some inconsistencies!

# .font: font.text_2
2020-08-30 19:30 nesdori  
# .font: font.text_1
 dustin , very deep research! a lot of things i wasn't aware of yet.  
  
so this time the intended solution was to get more than just one \. that was a little bit confusing.. :)

# .font: font.text_2
2020-08-30 20:00 krissz  
# .font: font.text_1
1. ... and for diamonds

# .font: font.text_2
2020-08-30 21:22 dustin  
# .font: font.text_1
 nesdori , thx! :D having found out bd stuff that you didn't know quite honours me, i think ;)  
yes, this confusion was quite intended... and to add to this, i gave no bonus value, so whwn players see the score of other players, they must really be convinced that there's only one diamond to collect :p  
  
 krissz  - ah yes, of course! although boulders and diamonds make a huge difference for rockford, they almost make no difference for programmers... :D

# .font: font.text_2
2020-08-30 21:50 dustin  
# .font: font.text_1
ah, and there's obviously one exception to these special rules. if a boulder/diamond/gwall is scanned "QUICKLY" after the "semi state" arisis, it is not blocked. otherwise, room #1 could be solved by moving the dirt away instead of snapping! also, if rockford has a gwall to his right or bottom side and moves, the gwall still instanly grows, so it cannot be blocked by the semi state in this case.

# .font: font.text_2
2020-09-01 23:42 dustin  
# .font: font.text_1
i think i found a simpler formulation of the special open border rules this engine uses (without exceptions):  
  
1. whenever a new empty space appears (e.g. rockford moves or snaps into dirt), it is given a "delay state" (this seems a better name than "semi state", as i learned on  Arno 's homepage).  
2. at the end of each cavescan, each of these delay states are removed.  
3. if a boulder, diamond or gwall is scanned and "sees" an empty space in delay state to its right or bottom, it cannot move/fall/grow into that direction. however, if one of those three elements SEES" a delayed empty space at its left or top side, it is regarded as normal empty space.  
4. for every other element apart from boulders, diamonds and gwalls, the delay state makes no difference at all.  
  
(apart from these special rules, the cave is scanned in the same order as if closed borders were used.)  
  
with this, everything i experimented with is explained!