Inspiration

We wanted to tackle the theme of composition through visualising how programs are structured. With great inspiration from xkcd 2347, we decided to turn a simple repository link into a precariously balanced structure.

What it does

The program takes in a Git repository link (such as GitHub or GitLab), scanning its dependencies and transforming them into bricks that represent their properties, such as size (correlating to bundle size), and fragility (relating to open issues and pull requests). Dependencies with known security vulnerabilities are highly unstable, and cause progressively more intense shaking as rounds progress. The more the dependency is used, the heavier its weight, and the more actively it is maintained the less friction the piece has. A tower is then generated, with its structure following the dependency graph. Players then take turns removing bricks in a Jenga-style game, until one person topples the whole tower over and loses.

How we built it

We used Python to process the Git repository link, returning the dependency data as a JSON to be used in the client. The tower is then generated client side and rendered using three.js. 3D physics were simulated using the Rapier library for high performance calculations.

Challenges we ran into

During first implementation of the physics system, the tower would often explode violently when moving pieces too hard into neighbouring pieces. We resolved this by introducing a speed limit to ensure pieces momentarily gaining extreme velocity do not cause extreme collisions. We also ran into framerate problems when rendering large towers. We resolved this by adding a rendering quality option so larger towers can be rendered at a lower quality, while maintaining maximum quality for smaller towers.

Accomplishments that we're proud of

The application can support extremely large repositories with over 500 dependencies in realtime, and we believe we were able to accurately transform repository properties into modifiers that make sense. It is very easy to tell from a brick's appearance how important it is, how well maintained it is etc.

What we learned

We learned that many repositories have far more dependencies (both direct and transitive) than we first expected, highlighting the issue that just one single broken package could lead to a cascade of failures if not managed correctly.

What's next for DependencyJenga

We would like to add online multiplayer support for the game, allowing people on different computers to play in the same game rather than taking turns on one machine. Adding new piece types/properties based on other statistics such as total age of the repository or stars could provide further insights and more variation in gameplay.

Built With

Share this project:

Updates

Submission history