Took Me While To Understand It, But It Was Satisfying to see Shape Filled With The Next Shape

Criteria | Rank | Score* | Raw Score |
Overall | #3 | 4.469 | 4.469 |
Originality (score low for unoriginal, high for original ideas) | #3 | 4.438 | 4.438 |
Adherence (score low for poor theme implementation, high for sticking to theme) | #5 | 4.750 | 4.750 |
Impression (score low for unimpressive, high for impressive) | #8 | 4.063 | 4.063 |
Legitimacy (score low for jam-spam, high for authentic "in the spirit" entry) | #14 | 4.625 | 4.625 |
Ranked from 16 ratings. Score is adjusted from raw score by the median number of ratings per game in the jam.
Took Me While To Understand It, But It Was Satisfying to see Shape Filled With The Next Shape
Excellent program, and a difficult problem to solve. After playing with it, I wanted to see if I could break it. Without gridsnap, it's impossble to be sure, but I made a slightly oversized 4-square L and a slightly undersized 2-square L and I think I was able to fool them (if grid perfect, should pack 4 inside 1)
Not marking you down for this, it was fun to try and find edge cases!
Its just brute force, definitely not well optimized
1) compute container polygon bounds and initialize a placement cursor at the top left
2) each frame, attempt some placements (incrementing by the 1st slider)
3) rotate the shape in small increments (2nd slider)
4) translate the rotated shape to the cursor position
5) Check if it fits inside the container and does not overlap packed shapes
5.1) if valid, store it, animate effects, and update counters
6) advance the cursor right, wrap to next row when hitting container width
7) stop when the cursor reaches the container bottom
Source if you want to look, itll probably make more sense
https://github.com/cyprus327/Packer/blob/9f8136adce4e3cb9f1984bb3a37397fa11b1b41...
So clever and beautifully executed! Well done, brilliant work and thinking
Leave a comment
Log in with itch.io to leave a comment.