Here I implemented Nvidia's new PhysX engine for a project, if I recall it was PhysX 3.2 or 3.3. Either one is pretty recent. You can see when I have upwards of 200~ cubes/spheres that the physics engine doesn't stutter or lag, PhysX is pretty efficient. I also included shadowmapping, albeit at a terrible resolution which is why it looks pretty jaggedy. But it works, to start with, and you can see the cubes/spheres also project their own shadows as they're being thrown or when they're stationary. The castle in the background also projects its shadow. There's just 1 directional light that's constantly rotating which is why the shadows are moving around.