Check out the source code for the Java 2D Physics Engine on SourceForge.net: http://sourceforge.net/projects/java2dphysicsen/ Background I initially started writing code for the purpose of tying together my knowledge on topics I learned throughout this semester in my Computer Science class. As I programmed, I continued to add more and more functionality until I just decided … Continue reading Java 2D Physics Engine Source Code
Okay, so I had a jacked up collision detection algorithm, and I pretty much rewrote the entire algorithm. Here it is in much more accurate form. Also changed from images of balls to just straight up circles, which allows me to easily change the diameter at will. Video below.
Yesterday, I started coding a small project in Java, with the intent of practicing some of the techniques I've learned in my CS class this semester (swing, threads, etc). It started out small, but every step of the way, I wanted to add something more. Before long, I had kinematic equations and gravity. Now, object … Continue reading Java 2D Physics Engine (9 hrs)