Cube Racer

Check out this simple Javascript racing prototype. Of course, please first read the control scheme below.

I've had this Demo sitting around for a while, so I figured I might as well post it. It's very simple. Like I said, it's made with the Canvas element. It uses dirty rects to reduce having to clear the full screen each frame. It is amazing that full screen clearRect() calls can instantly make your frame rate terrible.

That is slower still than C/C++ based drawing from 10+ years ago. Hardware accelerated 2D rendering, I welcome you with open arms!

The controls are:

Left/Right to turn.

Up/Down for Gas/Break.

Spacebar to reset.

Note: There is an invisible wall for convenience along the border of the cube grid. So just turn around when you hit this.

I made the racer and 3D Library on a Sunday for a pitch of Emotely, thus it's simplicity. Watch the Video for how I ended up using it with Emotely.