SpaceWars3D is a 3D version of the spacewars program. Michael Milvich and Josh Cogliati wrote it as part of a graphics programming class in 2003-2004. The program has a gravity simulation, space ships, bombs, planets and a starfield. What it does not have is computer players or the ability to have two players playing.
It is open source. spacewars3d-0.3.tar.gz