Copy from http://springrts.com/