Skip to content
Cawd Logo CAWD
  • Home
  • About
  • Assignments
  • Resources
  • Contact

Tuesday, April 11th

Tuesday, April 11th

Class hours: 9:40 – 2:05
Mr. Bohmann
wbohmann@ewsd.org

Week Thirty!

Today’s Notes

  • Today is an EHS B Day
  • Scholarship Opportunity – Check it Out! Deadline Extended to April 14th
  • April 12th: National Technical Honor Society Ceremony 7:00 pm
    • There will be a rehearsal tomorrow 9:45 – 10:45am for NTHS students
    • Remember NTHS – Bring your special person with you
  • Congrats go out the State Medalists from the SkillsUSA Design Competitions. CTE students took home 41 medals….16 Gold, 10 Silver, and 15 Bronze.
    State Champs will get a chance to represent Vermont at nationals, and all participants will get to put this experience into your resume.
    • Animation
      • Gold – Brennan and Bergeron
      • Silver – Lamotte and Bevins
      • Bronze – Kaden and Emmit
    • Web Design
      • Gold – Garrett and Emma
      • Silver – Jerry and Josh
      • Bronze – John and Richard
    • Game Design
      • Gold – Finn and Hayden
      • Silver – Asa and Eli
      • Bronze – Schuyler and Brodey

9:40 Working with Data Types / Variables

Understanding variables – class vs. local scope variable

All of our Game Objects have data attached to them. The Transform of a gameObject has 9 pieces of primitive data – like location of x, rotation of z and scale, etc….

We can store information about game object values to calculate health, score points, among other game play options. Each value can be stored in a uniquely named storage area called a variable.

A variable is defined with a specific data type (such as int or float) and a name such as myScore or player1Health. You can change the variable’s contents while the program is running – that’s why it’s called a “variable”. We’ve seen this in action when we built the Endless Runner game. We used lots of variables to store data.

public class MyScript : MonoBehaviour {

   int score;               // declare an int called Score
   float currentDirection;  // declare the float currentDirection
   char myInitial;          // declare a char called myInitial
   string userName;         // declare a string called userName
   bool isMoving;           // declare a bool called isMoving

   void Start () {

      //  numeric data types do not require quotes
      score = 8;

      // use the "F" suffix to specify a float value    
      currentDirection = 90.2F;    

      // use single quotes around individual characters
      myInitial = 'A'; 

      // use double quotes around groups of characters
      userName = "Will Bohmann";  

      // boolean values are either true or false 
      isMoving = true;        
   } 
}

Variable Scope refers to where you place your variables. If you placed your variable in the Start method, it will run when the game begins and then not be accessible again.

Pinball – Let’s level up using variables

You can use variables to do important things within your game. For example, many games will need to keep a score. Let’s add a score keeping variable to the pinball game and have the results printed in a Debug.Log statement.

To begin, you will need to declare a variable for score (what type of variable will you use? and where should you put it?). We want the Score to be displayed when the game begins (so we’ll place a Debug.Log statement in the Start() method.

void Start () 
{
   // display the current score on start
   Debug.Log ("Score = " + score);
}

Inside the OnCollisionEnter2D() function, set the score variable value to 1. Then, again use Debug.Log() to display the current score to the screen.

void OnCollisionEnter2D (Collision2D otherObject) 
{
   // set the score to 1
   score = 1;

    // display the new score
   Debug.Log ("Score = " + score);
}

Mathematical Operations with Variables

We already know that we use variables to provide more code flexibility. In many cases we may want to store mathematical operations in a variable. Let’s look at some common math operations.

int added = 3 + 4;          // added is 7
int subtracted = 3 - 4;     // subtracted is -1
int multiplied = 3 * 4;     // multiplied is 12
int divided = 12 / 4;       // divided is 3
int remainder = 12 % 5;     // remainder is 2

10:35 Break

10:45 English with Mx. Yopp

11:30 Lip Sync Battle Worksession

Remember a few weeks ago….. The Lip Sync Battle

We are creating original characters and then setting them in an appropriate setting to perform a 20 second Lip Sync. Perhaps you have started, perhaps you have not…

For this project, you are going to need several assets.

  1. A piece of music in .mp3 form (don’t worry about copyright – we are going all out)
  2. A character(s) / backgrounds inked out in 2D workspace
  3. A reference image for common vowel sounds (google mouth shapes) Results

To minimize problems, I am going to advise you to incorporate 1 Grease Pencil object (blank).

After you add your blank stroke, move it to it’s own collection. In this collection you will create the mouth shapes.

then on your other stroke layer create:

  • background layers for your scene
  • layers for your character
  • Remember, layers are important – anything you want to animate should be it’s own layer

The Due Date for this project has been changed to Thursday, April 13th!

We’ll do our showdown at 11:30am that day.

12:00 SkillsUSA Awards

Superplastic (from Burlington, VT) was generous with providing prizes for SkillsUSA Gold and Silver Medal winners. Bronze Medals also have awards from our CAWD prize cache. We’ll meet over in Mr. Cronin’s room for a quick awards ceremony.

Everyone did a great job with Skills and we are sending great and competitive teams to Atlanta in June.

12:15 Lunch

12:45 Independent Reading

book covers

1:10 Break

1:20 Independent Project Worktime of Individual Support

  • WorkSession for Lip Sync Project
  • 20%
  • Help with morning Coding

1:55 Dailies – No Dailies today

Cawd Instructors:

Matt Cronin

Will Bohmann

Instragram Facebook Twitter

A little about Cawd:

Serving high school students interested in Computer Animation, Game Design, and Web Development in North Western Vermont.

Students continue at:

University of Vermont Ringling School of Art and Design Northeastern University Rochester Institute of Technology Concordia University

Students find careers at:

Dealer.com Union Street Media Rovers North Prudential Investments DockYard
Navigate to top of page