Gravity Room - Description
The Gravity Room was my first project in a real programming language -- Java. The project created a window with several 2D balls contained inside of it. The user could press a button activating gravity. The balls would fall to the bottom of the window and bounce off of each other.
The most difficult part of this project, at that point in my experience, was learning how to use Java Swing to draw graphics, and learning how to handle the physics of two balls colliding and bouncing off of each other. It was also difficult to figure out how to handle balls penetrating when a collision occurs, and finding a simulation state where balls are no longer penetrating after a collision. To accomplish this, I took a naive approach and perturbed penetrating balls apart until they were no longer penetrating. This still did not completely fix the issue when multiple balls were resting on top of each other, but the solution worked well enough for a first project.