How to build an outrun-style racing game in javascript