Grading Guide

This page describes our implemented features, engine changes, and requirements for the final project.

Requirements

Additional Features:

Engine Work:

Physics engine modifications:

Modified the Physics engine to support a feature similar to onCollisionEnter2D from Unity. Each time there is a collision between two Physics objects, each object will call the userCollisionHandling function, passing the other object as a parameter.

Example:
 i.userCollisionHandling(j);
 j.userCollisionHandling(i);

These functions have a default implementation in the GameObject.js file which simply returns false. The user has the option of returning nothing, or returning true from these functions, along with handling the collision in any way they wish. If they return true from either function, the Physics engine will skip the positionalCorrection and resolveCollision calls. We use this to have certain physics-enabled objects (such as the Golem projectiles) ignore all collisions with objects other than the Hero (and IceArrow in the case of the Homing projectile).

Game objects with multiple rigid bodies:

Created a RigidSet which facilitates the use of multiple Rigidbodies for a single GameObject. This is related to the EmptyGameObject file as well. EmptyGameObject serves as a GameObject with no Renderable, and just a Rigidbody, as well as a reference to its parent object & x/y offsets so that it can be properly positioned with respect to its parent.

Lighting Modifications:

We added support for up to 25 lights.

Modifiable Audio levels:

Background audio and audio cues can both be passed a float parameter from 0-1 to control their volume. A lot of our feedback focused on the audio being too loud, so we sent the audio through a gain node to be able to modify volume. This should probably be a default feature of the engine.

Camera modifications:

We added a relative positioning system for UI elements to be able to translate to and from world coordinates.

Layer Manager Modifications:

We modified the shadow receiver layer to use a new type of set. Since shadow receivers are not game objects we ran into issues

Line Renderable Modifications:

We modified the Line Renderables to have additional utilty functions for moving vertices relative to their previous positions.

Parallax Game Objects:

Added support for parallax game objects to move on their own. This functionality appears to have been lost with the new physics engine.


Game Implementation:

The Golem:

The Arrows:

Config:

While there are still a few hard-coded values, we generally tried to keep as much of them as possible in our Config files (in the Config folder). This is just a system of constants that is referenced through the Global variable "Config", but it allows us to keep our code extremely readable and organized.

Lighting:

We feature a lot of lights to emphasize our dungeon like game environment. They are used extensively to emphasize projectiles and to light torches. We also have a light dedicated to lighting our UI elements so that we can maintain our dark background and still have the UI standout. Modifications to lights were made to support variable number of lights and not having to create every light possible.