This is a topic I’ve been pondering about several times. Some Boulder Dash engines allow for open borders. That is, when a movable item (Rockford, boulder, firefly, etc…) leaves the cave at a border, it returns at the other side, so effectively the cave behaves like an infinitely repeating world.
Until now, the open border implementations that I have seen all have some strange side effects, where at the border the BD engine behaves slightly different than in the middle of the cave.
The main question that I’d like to pose here is:
Is it possible to develop an open border BD implementation without side effects, and if so how would the algorithm work?
I’m curious to hear your views (especially from BD developers


Before I share my ideas, I’ll first describe two different existing open border implementations, how they work, and what kind of side effects I have observed.
1. CLCK-engine (commodore 64):
The open border feature works whenever the border is not occupied by t-walls or other unmovable items. When Rockford leaves the screen, the game pauses for a moment while the “camera” scrolls to the other side of the cave, after which Rockford appears and the game continues (video).
Also important to note is that in this engine the cave maps are stored as an array (rather than a rectangular grid or matrix). So when Rockford leaves at the right border, he returns at the left border on the next row. Similarly, a dancing fly formation moving to the left will also slowly move up (video).
I guess that in this implementation the cave scanning works by simply looping over the single array. Then, clearly, there are no side effects at the left and right border, since the behaviour at these borders is not different from any other place. But: at the top and bottom borders there are some side effects. For example, dancing fly formations usually break when they cross these borders.
2. Krissz’ site (online BD remake):
In this implementation, the open borders are optional and can be disabled/enabled in the editor. This can be done for the vertical border, the horizontal border, or both. The gameplay depends on the size of the cave. If the cave fits on one screen, then no scrolling happens and any item leaving at one side just returns at the other side (video). If the cave is bigger, the game scrolls continuously, so crossing a border happens unnoticed and for the player the cave really looks like an infinite world (video).
As opposed to the CLCK-engine, cave maps are stored as a rectangular grid, so any item leaving at a border will just return at the other side (without shifting a row like in CLCK).
As I understood, the cave scanning algorithm for open border caves is quite complex and Krissz has spent a lot of time to minimize the amount of side effects (which I admire and appreciate a lot, by the way). Still we have seen some remaining side effects like the following:
- Amoeba converts to diamonds while not fully enclosed at the border.
- When a butterfly moves down along a falling boulder it is crushed by the boulder when it hits the bottom border.
- Dancing fly formations mostly break (or they miraculously continue in another direction along the border

- Finally, I’ve spotted a side effect, which does not occur specifically at the border but rather affects the whole cave: when Rockford snaps dirt downward, the item to the right of this dirt moves first, while normally the left item moves first because it is scanned first.
Of course, side effects like above are not a big problem. In most cases, the gameplay works fine, so open borders are just a great feature. Yet, these observations have challenged me think about a possible cave scanning algorithm, which solves these issues such that the behaviour at the border is not different from any other place in the cave.
With the Krissz-variant of open borders as the target feature (so cave maps are rectangles, not arrays), I currently have 2 ideas which I will share in next posts…