ar i=0;i&lt;200;i=i+1) {
	myObjects.push({
		x: randMinMax(0, 640),
		y: randMinMax(0, 480),
		width: randMinMax(10, 20),
		height: randMinMax(10, 20),
		vx: randMinMax(-0.5,0.5),
		vy: randMinMax(-0.5,0.5),
		check: false
	});
}</code></pre>
			<p>
				We will clear and rewrite the quadtree with every game loop. This is neccessary to keep the tree clean and accurate (due to its recursive nature).
			</p>
			<pre><code class="language-javascript">function loop() {

	//remove all objects and 