Coder Social home page Coder Social logo

cubeworld's Introduction

CubeWorld

A 3D, first person perspective platforming game made for UVa Intro to Graphics (CS 4810). This game was developed entirely with WebGL, with some help from the glMatrix library and code from tutorials at Learning WebGL.com. The game makes use of buffers for pretty much all the rendering -- the ground and siding tiles are in a series of buffers separated by texture. The objects on the map make use of common buffers (i.e. one for a sphere, one for a cylinder, and one for a cone) whose positions, rotations, and scales are transformed using matrix math. There is also some point lighting to make the lips of the platforms look darker. The physics and collisions were all hackishly put together, but they are of reasonable robustness for this application.

Link to game here. I had to use Firefox to run it locally since Chrome doesn't allow loading the local images by default (also unsure how IE or other browsers react).

Controls

There are two sets of key bindings -- the former is recommended if the whole canvas cannot fit onto the screen (because the latter causes the page to scroll up or down).

  • A/D or Left/Right- turn left or right
  • W/S or Up/Down- move forward or backward
  • Q/E or Page Up/Page Down - look up or down
  • P or Space - Jump

Gameplay

The goal is to collect all six spheres from the six faces of the cube. Each face of the cube-world has a theme with its own properties/hazards:

  • Grass - tree obstructions
  • Metal - repulsive sphere obstructions
  • Fire - fire tiles which reduce health
  • Earth - more hilly
  • Water - water tiles which cause player to sink and sap health
  • Shadow - bottomless pits

The amount of HP you have is shown on the canvas bottom right corner; this is affected by fire and water. When you win or lose, a message will render on screen around the same area. Parts of the world (tile elevations, obstruction placements) are procedurally generated when the page loads, so each "run" will be different. There is no way to restart the game aside from refreshing the page.

cubeworld's People

Contributors

sebastianjay avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.