This is pretty cool. How exactly does the packing algorithm work? Also what do the sliders on the right side do?
idk1To3
Creator of
Recent community posts
A very fun game, probably the most fun game from this code jam. Admittedly it's only tangentially related to the theme because of the pun in the title (although i guess you could argue that the shape of a monkey is also a shape :D). Other than that, it's great, and so is the music. I won the game and reached level 16 on my first run
The way it works is that the left side of the sub is checked with the individual sides of the left wall, and the right side is checked with the sides of the right wall. For optimization, only the lines of the wall that are at the same Y-level as the sub are checked.
As for actually calculating collisions, i used the line collision algorithm provided by the olc utils 2d geometry library.
I appreciate that you like it! The trench is actually a bunch of lines connected to each other, and as the submarine falls down, new lines are generated. All lines have as a start point the end of the previous line, and as an end point a random point along an arc of 160 degrees downwards. The lines are also set to only be within a certain horizontal range, and those ranges slowly shift as you descend, making the trench also slowly shift


