Welcome to my first devblog! I’m going to be revisiting a project I started working on in high school titled SimX, which was intended to be a simple, general purpose 2D physics simulator. I mostly wrote it after my first semester in AP Physics, as an attempt to get back into programming with C++ and review some physics concepts.
Revisiting old code
To my surprise, the project started without error after downloading the dependencies on my laptop:
The project currently contains brilliantly written pieces of code, such as the following to detect block collision:
…and some more to run the simulation at a given rate:
Future plans
As of right now, the program only allows the user to drop blocks using their cursor, calculating acceleration on the block from gravity and stopping the block from going through another block (without the use of normal forces??).
The blocks do not rotate off of each other and the simulation isn’t nearly as accurate as I’d like it to be, so I will be working on bringing the codebase up to par. Feel free to check out the current code at the project’s github page.