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

Friday, February 10th

Friday, February 10th

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

Week Twenty Two

Today’s Notes

  • Today is an EHS B Day
  • Tom – Meeting at 10:30am today – Hireability
  • No visitors today!
  • EHS Pep Rally for EHS students – if you want to go – 10:30-11:30 today
    • Communicate with your partner as your absence affects them
  • SkillsUSA work due for review and grading at 12:10 today
  • PE is not in the Gym today – Check Google Classroom for location details
  • FYI – you might have noticed I did not assign any additional work beyond your 20%.
  • If you are on track right now you should be all caught up for the quarter with all your animations.
    • Bird
    • Ball Bounce
    • Mood Sequence with IK Riggin
    • Custom Character and Animation with IK Rigging
  • Next week we are going to do some 2D Animation work
  • PSA – Do you have a message in mind? What kinds of facts can support your message? Continue to make your 5 models. The models will be due on Monday, February 19th. See Google Classroom for the details on this assignment. I’d like to see one of your models this Monday at the 20% showcase
  • Lastly, – Animation Project Opportunity – with Flynn Theatre

9:40 Attendance

9:45 Skills USA

skills usa banner

Each Thursday morning SkillsUSA Design Competition prep work will come out.

By Friday at lunch – create a folder with your two names on the Public inside of the weeks “skillsUSA” folder. The folder is found at Public/CAWD. For example if Mr. Cronin and Mr. Bohmann were working together the folder would be:

  • “croninBohmann”

Create your folder in the discipline you are working in. DO THIS FIRST

Skills USA is a production grade that counts towards your Q3 grade. How much? – 20%. Your work will be graded on completion of deadlines, adherence to deliverables and your ability to work independently and with your partner. Time is limited, so use your production windows well. We’ll do Skills every Thursday & Friday up to the competition date in April. You’ll be graded on your work each week. Skills counts as 20% of your Quarter grade.

Skills Work for that week will always be due at 12:10 on Friday’s.
Watch the Time!

Once we pair up we are going to have a different task based on which event you and your partner wish to compete in.

This first week is really to get a working relationship with your Partner – most if not all of the team work will be done on a single computer this week. Sit together.

Animation

See Mr. Cronin’s Dayplan for specifics – read carefully

Game Design

See Mr. Cronin’s Dayplan for specifics – read carefully

WebDesign

Create a web page with your Team Profiles. This project should push yourselves to create something visually attractive, and full of information about your team. Images of you and your partner or logos of you and your partner or something that represents you.

  • Identify Who will be the Web Developer (In charge of the html and JS) – Web Dev does this part.
  • Identify Who will be the Web Designer (In charge of more of the artistic choices and styles – CSS) – Web Designer does this part.
  • Impress us with what you can create.
  • Include a brief bio of each team member so we can learn about you

Upload your completed project to your team folder. It is only one page.

  • Your page will be called index.html
  • Images will be in an images folder
  • CSS will be in a css folder
  • Include an image for your planning document – we’ll call this a rough wireframe (this means you will sketch your design on paper with a rough layout BEFORE you begin coding.

As always, validate your code – HTML / CSS. Practice commenting and organizing your code.

  1. CSS Validator
  2. HTML Validator

10:35 Break

10:45 Unity – Day Three

Today we’ll learn a bit about prefabs and dive in to our first bit of code. To help, I’ve included some code references below.

Let’s add a player and add a jump mechanic using the space bar.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CapsulePlayer : MonoBehaviour
{

    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("My Player is here");
    }

    // Update is called once per frame
    void Update()
    {
        //check to see if the space key is pressed down
        if (Input.GetKeyDown(KeyCode.Space))
        {
            Debug.Log("Hey you pressed the space key dummy!");
            GetComponent<Rigidbody>().AddForce(Vector3.up * 5, ForceMode.VelocityChange);

        }
    }


}

Probably this is just not enough to make our game fun. We also can clean up our code – called refactoring! First we need to move the physics part into the Fixed Update method because that is for physics game objects.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CapsulePlayer : MonoBehaviour
{
    //variables will go here
    //will check to see if this is true by default it is true
    private bool jumpKeyPressed;

    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("My Player is here");
    }

    // Update is called once per frame
    void Update()
    {
        //check to see if the space key is pressed down for every rendered frame
        if (Input.GetKeyDown(KeyCode.Space))
        {
            jumpKeyPressed = true;
            

        }
    }

    //fixed update is called once every physics update - takes account for physics!

    private void FixedUpdate()
    {
        if (jumpKeyPressed)
        {
            GetComponent<Rigidbody>().AddForce(Vector3.up * 5, ForceMode.VelocityChange);
            jumpKeyPressed = false;
        }


        
    }


}

Time to add some horizontal movement so there is more action to our game. Plus, we want our player to move around. This next bit of code will make our capsule like Flappy Bird, it is not what we want but it will be a good ending point for today.


using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CapsulePlayer : MonoBehaviour
{
    //variables will go here
    //will check to see if this is true by default it is true
    private bool jumpKeyPressed;
    //a float is a type of variable for decimals our player will not move in whole numbers
    private float horizontalInput;
  
    

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        //check to see if the space key is pressed down for every rendered frame
        if (Input.GetKeyDown(KeyCode.Space))
        {
            jumpKeyPressed = true;
            

        }
        horizontalInput = Input.GetAxis("Horizontal");
    }

    //fixed update is called once every physics update - takes account for physics!

    private void FixedUpdate()
    {
        if (jumpKeyPressed)
        {
            GetComponent<Rigidbody>().AddForce(Vector3.up * 5, ForceMode.VelocityChange);
            jumpKeyPressed = false;
        }
        GetComponent<Rigidbody>().velocity = new Vector3(horizontalInput, GetComponent<Rigidbody>().velocity.y, 0);


        
    }


}


// our game has some bugs - we can see this when you play - we'll fix those and clean up the code next time

Our Final Code with multiple variables, cleaned up code and movement without double jumps.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CapsulePlayer : MonoBehaviour
{
    //variables will go here - use camelCase for variables!
    public int jumpForce; //an integer is a whole number
    private bool jumpKeyPressed;  // a bool checks if something is true or false
    private float horizontalInput;  //a float is a decimal number
    private Rigidbody rb;
    public Transform groundCheck;  //this will help us check to see if player is on ground
    public int playerSpeed = 1;  //We can set a default speed so we can experiment with

    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        //check to see if the space key is pressed down for every rendered frame
        if (Input.GetKeyDown(KeyCode.Space))
        {
            jumpKeyPressed = true;


        }
        horizontalInput = Input.GetAxis("Horizontal");
    }

    //fixed update is called once every physics update - takes account for physics!

    private void FixedUpdate()
    {
        //Let's fix the double jump
        //if the object is the air it is not grounded, so do not execute the rest of the code - that is what the :"return" is for
        if(Physics.OverlapSphere(groundCheck.position, 0.1f).Length == 1)
        {
            return;

        }


        if (jumpKeyPressed == true)
        {
            rb.AddForce(Vector3.up * jumpForce, ForceMode.VelocityChange);
            jumpKeyPressed = false;  //resetting to false after the key is pressed keeps the player from being a rocket
        }

        rb.velocity = new Vector3(horizontalInput * playerSpeed, rb.velocity.y, 0);


    }


}


Here is a link to the downloadable code for this lesson.

11:30 Skills Production continued…..

skills usa banner

12:15 Lunch

12:45 Literacy in Practice

book covers

1:10 Break

1:20 20% Production Time & Guided Support

  • PSA Modeling
  • Overdue work
  • 20%

2:05 Dismissal

GAWD Instructors:

Matt Cronin

Will Bohmann

Instragram Facebook Twitter

A little about GAWD:

Serving high school students interested in Gaming, Animation, 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