This is an easy min/max system for bouncing pmpd masses in a maze / expandable.
https://patchstorage.com/pmpd-micro-platformer-pd-vanilla-pmpd-gem/grey_maze1.gif

this new one has much smaller boxes https://patchstorage.com/pmpd-drawing-ball-game-pd-vanilla-gem-pmpd/
Screenshot_2024-10-09_22-55-40.png