/webgl-cube-runner

WebGL Cube Runner, a group project for UCLA CS 174A

Primary LanguageJavaScriptMIT LicenseMIT

WebGL Cube Runner

Introduction

This game, a version of the classic Cube Runner, was developed by Nate Emerson, Casey Patton, and Dylan Vassallo as a final project for UCLA CS 174A, Intro to Computer Graphics. The project requirement was to make something non-trivial in pure OpenGL (no higher-level frameworks) using all the basic techniques and at least one advanced technique that we have learned.

We implemented a WebGL version of Cube Runner that runs in modern browsers. There are traditional keyboard controls but you can also connect your smartphone as a controller and tilt it to steer the ship. The server component is tested to run on Windows and Mac OS X.

Setup instructions

  1. Install Git and Node.JS
  2. Get the code: git clone git://github.com/dylanvee/webgl-cube-runner.git
  3. Go into the webgl-cube-runner directory
  4. Install the dependencies: npm install
  5. Run the server: node server.js
  6. A browser tab will open and the game will load. To use your smartphone as a controller, scan the QR code on the page using a barcode scanning app.

How to play

You are piloting a ship through a never-ending field of cubes that you must avoid without crashing. You get a point for each cube you avoid, and the game ends when you hit one. The pace starts slow but gets faster and faster as you earn more points. Press Space to start the game or restart if you die. Turn using either your smartphone (see the instructions above) or the arrow keys.

Powered by