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.
Color+Plus
Jackie’s Ver.
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.
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?
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
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.
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!
Meron
Color Plus Mack & Kendra
Update loop:
Method Headers
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
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
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
Melissa
Document describing my method headers and update loop:
https://docs.google.com/document/d/1Na3xKxIkU-XMVz3ZYVFQuxQpylVTeq1S_snecAhTrZ8/edit?usp=sharing
Alex
Update() loop:
//if statement that keeps track of the time
Methods
ProcessKeyboard()
ProcessClick()
Methods
ScoreCounter()
EndGame()
Eric
Update Loop:� void Update () {� if (Time.time < gameTime)� { RowSelection();� ProcessClick();� if (Time.time > turnTime)� { CheckForPress();� CheckForScore();� ChangeNextCube();� turnTime += turnLength; }� }� }
Method Headers
public void RowSelection ()
public void RowPlacement ()
public void CheckForPress ()
public void ChangeNextCube ()
public void CheckForScore ()
public void ProccessClick ()
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
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 ()
Color Plus
Elijah, Fang
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
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
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.
Rhys
Eelly
Aidan Alice and Courtney
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
}
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.
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 ();
}
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.
Corrin Offenholley’s block shift
The update method:
Methods (setup)
Methods (Board management)
Methods that run the game (Score)
Miscellany
Wolfie
There will be 3 scenes: “Opening”, “Gameplay”, and “Summary”.
Each will be called when necessary using the built in method: SceneManager.
BLOCK SHIFT
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”) }
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)
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
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
Shelby
Update ():
ProcessMouseInput();
If (Time.time > turnTime * turnCount) {
SpawnColourCube();�ProcessKeyInput();�
If (nextCube != destroyed) {
SpawnBlackCube();�//destroy nextCube�playerScore = playerScore - blackCubeScore;
}�turnCount++;�}
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)