[back]

Array Based BTree Debugger

Since my game is written from scratch, I had to implement collision detection myself. For that I needed an array-based binary tree instead of a recursively built one.

Debugging trees without a visual representation has always been difficult for me, so I built this tool to spot issues faster and understand the structure better.

Note that this is still in progress and very tailored to my needs. Feel free to examine the codebase and use whatever might be useful to you.

Views

The debugger has currently (2026-06) two viewing modes: Tree-View and Cell-View. A hyberbolic tree is also planned, but currently not prioritized.

Tree View

Cell View

The cell-view represents the layout inside an array. When hovering over one cell, it highlights its children and parent. It also displays a tooltip, which contains more information about the current node.

The last screenshot shows the relationship between the cells/nodes. Here, the cursor is over cell #6 (top row, in the middle) and the parent and children are highlighted. The parent cell has a "P" in the corner, while the children have an "L" or "R," standing for Left and Right respectively.

You can see these features in this video (5.8 MB).

Tooltip