I've finished the backbone of my particle-to-vector physics engine, and I need some feedback to properly make adjustments and iterations. Originally I went with a tile and grid based engine. While this was very fast, it was extremely limited because there were a set amount of tiles.
This engine does not use tiles. Instead it uses lines (vectors) as a source of collision. These lines can be of any length and can be drawn in any direction, so the possibilities are almost limitless. It is in theory much slower than the previous method, but this lag has to be witnessed and it still performs wonderfully.
All calculations are vector based (no trig), which means much more accuracy.
Controls for the engine are as follows:
Shift: This adjusts the mode (Point, Line) of the other two functions. It's initial setting is point.
Space: This deletes the most recently created point/line
Click/Release: If the mode is set to point, it creates a particle where you first clicked and it has a velocity opposite where you released. If the mode is set to line, it creates a line starting where you clicked and ending where you released.
Note: If there are no points currently on stage, lines will no longer be visible, though they are still there. To remedy this all that is necessary is to create an new point and the lines will reappear. This is an oversight, not a glitch.
Ta da.
I will not be handing out the source code, but I will be open to questions on how it works. It's not very complicated, so ask away.