The actual hit detection is rather basic and naïve. It's a simple point-box test between ALL bullets and ALL files.
As there are probably not that many bullets active at any given point, and the number of files is probably not that great, this should be okay for now.
An easy way of improving this would be to divide the game world up into sectors and only checking for hit detections within a sector and its eight neighbors.
As per
index.js
: