Git Product home page Git Product logo

cs679's Introduction

DAT COMPUTER GAMES COURSE

Welcome to zombocom. The only limit is your self.

This engine is very simple. Each iteration through the game loop updates and draws each object.

Current How To

Step 1: Make a "class"

// give your "class" an awesome and unique name
function AwesomeBox(attributes) {
  // save any attributes to the object
  this.attributes = attributes
  
  // set up the shader. fetches the pair basic.vs and basic.fs
  this.shaderName = "basic";

  // set static attributes like vertices, normals, or texture coordinates
  this.vertices = [0.0,  0.0,  1.0,
		  0.0,  0.0,  1.0,
		  0.0,  0.0,  1.0,
		  0.0,  0.0,  1.0];


  this.attributeCount = 4;

  // this call inherited from GameObject3D, adds the object to be updated and drawn
  this.init3d();

  // optionaly override the update call. Use this to compute any state changes for your object
  this.update = function() {
    // game.tick is the current iteration through the game loop.
    // use this to measure time, as Date.now() will break if the game gets paused
    if (game.tick - this.lastDoStuff) {
      // do stuff...
      this.lastDoStuff = game.tick;
    }
  };

  // if your object exists visualy in the world, override this function
  this.draw = function() {
    // push the model view matrix
    mvPushMatrix();

    // perform translations or rotations
    //    mat4.translate(mvMatrix, ...
    //    mat4.rotate(mvMatrix, ...

    // draw dat stuff
    draw3d();

    // clean up and leave
    mvPopMatrix();
  }
}
// this causes the object to inherit the base object class, giving it access to 
// init, update and draw calls. 
AwesomeBox.prototype = new GameObject;

Step 2: Make a game

// First setup any initial game objects

// when the object is created, the init() call will add the object to the manager,
// and when the game is started it will be updated and drawn accordingly. 
var awesomeBox = new AwesomeBox();
// to remove the object, use awesomeBox.shutdown()

// Then start the game. Tts that easy.
game.start();

cs679's People

Contributors

breakds avatar chuckl avatar dennispr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

kusko

cs679's Issues

Enemy pathfinding

need a simple AI for enemies to chase you. Also to move from room to room. Make some boxes that chase you.

Sounds

Need to investigate a system for playing sounds. Ideally would be able to adjust volume based on distance and play multiple sounds simultaneously.

Objects not being shut down properly?

Each GameRoom now has a room object which I enable or disable in the GameRoom enable() and disable(). The first room seems to load well enough, until you go to another room where the number of objects jumps by about 10 and it starts to get laggy. Ideas?

Room/Grid system

We need a system to tie 3d rooms with a 2d grid, for enemy movement and item placement.

Puzzle designs

need to make some decisions as to how/what the puzzles will consist of.

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.