1 of 45

INSTRUCTIONS

Find your slide. If you are on a team, add your teammate's name.

Add your Update() loop description on the first slide

Add your method headers on the second slide

Add more slides as needed (Slide menu -> New slide)

Practice your presentation at least once, and ensure you can do it in 4 min or less.

2 of 45

Color+Plus

Jackie’s Ver.

3 of 45

Update() (For the grid and turns)

Timer that runs, and checks every 2 seconds...

//Was a cube clicked within the limit?

//Was anything returned to the update?

If these aren’t met, return to user the punishment:

//Give user unusable black cube (dependent on the method).

This all determines if the user wins or loses.

//Wins if score is positive.

4 of 45

Methods

numberInput (); //User input on number pad

clickedCube () ; //For each new cube

scoreCross (): //Score for crossed/+ cubes

gameTimer (): (Depends) //Will end the game when time’s up

Feel old yet?

5 of 45

numberInput();

When a new cube is called, and user presses 1-5:

//Destroy and replace the cube based on the number (row) given.

//Each new cube will be activated and deactivated by this method.

If time runs out before cube is assigned:

//A cube in the grid will turn black, rendering it unusable, and subtract a point

//In Update

6 of 45

clickedCube():

In the grid, if the mouse user clicks a color cube:

//It is activated with a new scale and glow (pending), and deactivated when clicked again.

While a color cube is selected, if user clicks a white cube:

//It should transport to said cube, remaining active.

If user clicks on a black cube or sky:

//Do nothing.

7 of 45

scoreCross ();

If a set of five cubes are aligned in a way that resembles a +:

// Users are given +5pts in their score if they’re all unalike colors. Congrats!

// +10pts in their score if they’re all the same color. BIG congrats!

//Cross turns black and unusable, and cannot be activated.

If the user tries to assign a cube to a filled row:

//Game Over!

8 of 45

Meron

9 of 45

Color Plus Mack & Kendra

Update loop:

  • Timer
  • Detect cross

10 of 45

Method Headers

  • void MakeGrid();
  • void MakeCornerCube();
  • void UpdateCornerCube();
  • void PenalizeNoInput();
  • void DetectKeyboardInput();
    • void PlaceCube();
  • void OnMouseDown();
    • void ActivateCube();
    • void SwapCube();
  • void EndGame();

11 of 45

Margo

void Update() {

moveCube();

placeNextCube_Keyboard();

findSameColorPlus(int x, int y)

findDifferentColorPlus(int x, int y)

endGame(int x, int y)

If (Time.time > turnTime) {

generateNextCube(colorArray);

if (nextCubeStillThere) {

blackOutCube(int x, int y);

}

}

}

Everything outside of the main if statement is run constantly

Everything inside of the main if statement is run once per turn

blackOutCube() is only run if the player doesn’t place the cube before the turn ends

12 of 45

Margo cont’d

GameObject generateNextCube(colorArray);

Generates a new cube in the Next Cube area, picks color of cube from colorArray

void processClick(Game Object clickedCube, int x, int y);

Processes the mouse click, activates and deactivates cubes, used in moveCube()

void placeNextCube_Keyboard();

Places the cube from the Next Cube area in the grid based on the keyboard input (1, 2, 3, 4, 5)

void moveCube();

Checks if a cube is activated, moves activated cubes to clicked cubes around it

13 of 45

Margo Cont’d

blackCubePosition[] blackOutCube(int x, int y);

Blacks out a cube if the Next Cube wasn’t placed in time or if a plus was formed, returns the position of black cubes in the grid so new cubes can’t be placed where they are

void findSameColorPlus(int x, int y);

Checks if there is a plus formation from cubes on the grid that are all the same color, the player scores 10 points

void findDifferentColorPlus(int x, int y);

Checks if there is a plus formation from cubes on the grid that are all different colors, the player scores 5 points

void endGame(int x, int y);

Checks if time is up, checks if there is no space for pluses on the grid, ends the game if one/both of those are true

14 of 45

Melissa

Document describing my method headers and update loop:

https://docs.google.com/document/d/1Na3xKxIkU-XMVz3ZYVFQuxQpylVTeq1S_snecAhTrZ8/edit?usp=sharing

15 of 45

Alex

Update() loop:

//if statement that keeps track of the time

  • checks to see if nextCube spot is empty (bool?)
  • if spot is empty
    • adds new cube to next cube at the start of every turn
  • if spot is full
    • creates black cube in any row
  • detects keyboard input [ ProcessKeyboard() ]
    • creates a colored cube the same color as the current "next cube"
    • places cube into the selected row (1-5)

16 of 45

Methods

ProcessKeyboard()

  • on 1, 2, 3, 4 or 5, places nextCube into a random empty spot in corresponding row
  • availableSpot bool? checks to see if space is white
  • empties the nextCube spot until next turn

ProcessClick()

  • click on color, activate
    • if click is on adjacent white spot, move color to that spot, turn old spot white
  • click on active color, deactivate
  • click on white/black, nothing happens
  • click on far spot, nothing happens

17 of 45

Methods

ScoreCounter()

  • checks for keyboard input in turn time
    • if none, deducts 1 point
  • looks for pluses
    • turns them black
    • adds appropriate scoring (5 or 10)
  • updates score
    • if score = 0 and points are trying to be subtracted, do nothing

EndGame()

  • checks for end-game conditions
    • is row full? endgame. Loss
    • no keyboard input? all spaces full? endgame. Loss
    • time runs out. Endgame
      • is score positive? Win
      • negative? loss

18 of 45

Eric

Update Loop:� void Update () {� if (Time.time < gameTime)� { RowSelection();� ProcessClick();� if (Time.time > turnTime)� { CheckForPress();� CheckForScore();� ChangeNextCube();� turnTime += turnLength; }� }� }

19 of 45

Method Headers

public void RowSelection ()

public void RowPlacement ()

public void CheckForPress ()

public void ChangeNextCube ()

public void CheckForScore ()

public void ProccessClick ()

20 of 45

Zofia and Granger

Update() Loop:

//Bool: Check if timer has run out

//Bool: does player meet win requirements?

//Keep track of turn (variable)

//Create a new colored cube

//Was the new cube distributed?

//If no cube distribution, penalize player with black cube

//Was a cube clicked and moved during the turn?

//Was PlusScoring fulfilled?

//If turn is over, start a new turn

21 of 45

Method Headers

void RandomCube (Color[])

void ProcessClick (GameObject clickedCube, int x, int y)

void ProcessKeyboard (int x, int y)

void GridTrack (int x, int y)

void PlusScoring (int x, int y)

void GameEnd ()

22 of 45

Color Plus

Elijah, Fang

23 of 45

Update() loop:

// Keep track of the turns

// Manage the randomly colored cube that appears in the “NextCubeArea”

// Color of cubes placed onto the grid

// Check and update cube positions

// Process Keyboard input, 1,2,3,4,5

// Process Mouse input, Mouse clicks.

// Check if Score requirements are met and update accordingly

// Check if EndGame requirements are met and update accordingly

24 of 45

Variables

grid[ ,], gridX, gridY // for placement of the cubes

gridX = 9; // length of grid

gridY = 6; // height of grid

Text // to show the score

Vector3 cubePosition // will be used for instantiating the cubes in the grid

gameLength (tunable) // how long the game runs

turnTime, turnCounter += // keep track how much time each player has (tunable)

activeCube // keeps track of what cube is active

targetX, targetY // clicked location of where the cube is supposed to go

clickedCube // tracks what cube is clicked on

cubePrefab // used for instantiating the cube

Color[] myColors // used for randomizing the color of NextAreaCube

25 of 45

Methods

Void ProcessKeyboard(); // Moves cube from NextCubeArea to a random slot in the designated row, based on number input 1,2,3,4,5.

Void ProcessClick(); // Activate/Deactivate, move active cube if valid adjacent space is clicked.

Void ScoreMethod(); // Check for score requirements, and update accordingly.

Void NextCubeArea(); // Spawns and assigns a random color to the cube in the area above the grid. If cube is still in area after a turn it turns black and is placed randomly on the grid.

Void EndGame(); // If time runs out or if the player sends a cube from NextCubeArea to a full row the game ends.

26 of 45

Rhys

27 of 45

Eelly

28 of 45

Aidan Alice and Courtney

  • Presentation
  • Document

29 of 45

Miranda & Eliza

InstructionalPhase()

If turn < turn limit {

Planning Phase� detectKeyboardInput()� moveCubes() � startActionPhase ()� �We will make a variable that increases with the time and resets at the end of the Action Phase. It will only reset if the planning Phase variable and the Resolution phase variable != true && the turn < turn limit � If actionTime < turnTime� Action Phase � Destroy Cube that is clicked on ��Resolution()

calculateScore()

}

Else () {

Score will be printed

}

30 of 45

Miranda & Eliza

The Action Phase is timed and it last by 4 seconds. When the action phase begins then the action button disappears and turns into a large countdown timer that starts at 4 seconds. As well, “text” changes to “You may click cubes to destroy them ”. During the Action Phase, the player may click any cube along with the two pushers. If the player touches a cube, it disappears. However, it’s important to know that players can not move pusher to new areas during the Action phase, though they can pusher to make it disappear. Player may click as many cubes as they want during the Action Phrase. If we have more time before the deadline, we can make the game possible to multitouch devices such as mobiles. When the timer reaches to 0.0, the Action phase ends and the Resolution phase starts.

31 of 45

Rachel - Block Shift - Update () loop

My main update loop will run the methods associated with each stage of gameplay, triggered by bools:

If (startScreen) {

DisplayStartScreen ();

}

If (planningPhase) {

RunPlanningPhase ();

}

If (actionPhase) {

RunActionPhaseTimer ();

}

If (resolultionPhase && turns < 0) {

RunResolutionPhase ();

}

Else if (resolutionPhase && turns == 0) {

DisplayGameSummary ();

}

32 of 45

Rachel - Block Shift - Methods

My main methods correlate with the stages of gameplay:

DisplayStartScreen ();

RunPlanningPhase ();

RunActionPhaseTimer ();

RunResolutionPhase ();

DisplayGameSummary ();

Each of these main methods will call sub-methods that perform the various tasks needed for each stage of gameplay.

Example:

DisplayStartScreen () {

DisplayButton ();

DisplayButtonText ();

DisplayTitle ();

}

My plan is to learn more about how to override methods in order to use one method in multiple spots of my script instead of having multiple methods that do essentially the same work.

I.e. not having four methods for each button instantiation.

33 of 45

Corrin Offenholley’s block shift

34 of 45

The update method:

  • Will contain instructions for the three different phases of the game: Setup, destroy, and resolve, as well as transitions between them.
  • Setup involves placing pushers, and will mostly be empty.
  • Destroy requires a timer, and sets the bool playerCanDestroyBlocks to true. Once the timer is up, the bool is set to false, and the resolve phase happens.
  • Resolve will again mostly be empty.
  • Though update will keep track of these phases, most of the work around implementing those phases will be contained in methods that happen on a trigger rather than continuously.

35 of 45

Methods (setup)

  • Void SetupBoard will create a board with no matches.
  • Potential future features include making the starting board have easier starts with more potential matches.

36 of 45

Methods (Board management)

  • Bool ClearMatches() will clear all matches on the board and reward points for them. It will return false if no matches were found, indicating that the game can move in.
  • Void PushUp, PushDown, PushLeft and PushRight(coordinate) will handle the player’s pushing input.
  • Void Fall() causes all cubes above empty space to fall as far as they can.
  • Void AddCubes() places new cubes in empty spaces.

37 of 45

Methods that run the game (Score)

  • Float ScoreMultiplier() calculates the score multiplier
    • This might get more complicated than simply returning a float, since “Loot” can have different values for different colors.

38 of 45

Miscellany

  • Variables will exist to affect time delay between moments in game such as scoring and falling. These variables will be tunable.
  • A separate scene will exist as a starting screen.
  • Animations will exist, though as they are low priority I don’t know how those will exactly work yet.

39 of 45

Wolfie

There will be 3 scenes: “Opening”, “Gameplay”, and “Summary”.

Each will be called when necessary using the built in method: SceneManager.

BLOCK SHIFT

40 of 45

Scene: Opening

Game Title (UI: Text)�Big Start Button (UI: Button)

Stretch Goals: �-Music�-Background Image�-Player Feedback on Start Button

Methods: �OnMouseDown() {�//Tells GameStart when to run }��Public void GameStart() {�//loads next scene (“Gameplay”) }

41 of 45

Scene: Gameplay, planning

On (Start) {�//instantiate the grid of cubes��//use Random.Range to assign a color to each cube�}

Update {�//GetButtonDown will be used to control the pushers. Up/Down for 1, Left/Right for 2�}

OnMouseDown() {�//tells when to switch phases�}

Variables:�Int turns; //tracks how many turns have happened

Array[] colors; //will hold colors

Array[,] grid; //tracks positions of cubes

Action Button (UI: Button)

42 of 45

Scene: Gameplay, Action and Resolution

Update () {�If (Time.time < 4( {�//using onMouseDown, clicked cubes will disappear �}

Once Time is greater than 4, it switches to Resolution Phase

Update () {�The pushers will move as needed.

Cubes pushed outside the grid will be kept track of, and removed.

Cubes in rows of three will be scored and removed.

Empty cube space is filled in.

Game returns to the Planning phase

43 of 45

Scene: Summary

Victory Text (UI: Text)

Display Players Score (UI: Text)

Play Again Button (UI: Button)� -will return player to Gameplay Scene

Methods�Void GameEnd(); //causes the game to switch to this scene

44 of 45

Shelby

Update ():

ProcessMouseInput();

If (Time.time > turnTime * turnCount) {

SpawnColourCube();�ProcessKeyInput();�

If (nextCube != destroyed) {

SpawnBlackCube();�//destroy nextCube�playerScore = playerScore - blackCubeScore;

}�turnCount++;�}

45 of 45

Shelby

void ProcessMouseInput(gameObject activeCube);- move active cube around the grid, can’t move to

void ProcessKeyInput(); - If 1-5 is pressed, move the “Next Cube” to an available column in the corresponding row, destroy the cube in the “Next Cube” spot

void SpawnColourCube(gameObject nextCube);- Spawns the “Next Cube” at the start of every turn, randomly assigns the color to the cube

Void NextCubeToGrid(gameObject nextCube);- Found in ProcessKeyInput, finds an open spot on the grid for the nextCube to move to, destroy the white cube where the nextCube is going

void EndGame(); - Check the three ways to end the game, if any come back true, destroy the grid and next cube, make “Game Over” and “Game Over Score” visible

void ActiveCube(gameObject Cube, gameObject activeCube);- active cube on Mousedown, either give it a glow or make it bigger (haven’t decided)