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

Thursday, April 17th

Thursday, April 17th

Class hours: 10:05 – 2:45
Mr. Bohmann | wbohmann@ewsd.org

10:05 Today’s Notes & Attendance


Vacation is just another day away. Friday after lunch we will be going outside with CAWD – probably best to consider what you are wearing – can you walk in the shoes that you selected, will you be warm enough, etc… If it is raining or a serious bust, we’ll stay in CAWD and unwind.

PSA Final Dropbox in Google Classroom (for us)
Dropbox for your YouTube Link (for contest) – Due by end of day!! Graded version.


10:10 Game Development Journal

A game dev journal is vital to game developers

A Game Developer’s Journal is a tool to organize and record the development process of your own ideas and work. It’s like a diary for your game thoughts and ideas. Some people keep journals for business ideas, some for artwork, you get the picture.

Your journal can look like anything you want it to. The easiest route is to your first journal is to find a notebook, legal pad or bound stack of paper. Whatever you choose, protect it and personalize it.

You can include drawings, doodles, color whatever. Game developers & designers need to keep focused to move projects from ideas to execution. The journal is your collect-all and fail safe to ensure this happens.

As such, be sure you:

  • Record all your ideas and state how you got them . What was your inspiration?
  • Write about the challenges you experienced during the process and how you resolved
    them.
  • Do not erase notes or entries, but revise and expand upon them .
  • Add sketches and drawings to make things clear .
  • Put a date each time you start a new entry. This will help you track progression.
  • Jot down your ideas and sketch them out when appropriate . Sometimes it is easier to draw pictures that illustrate the connections between ideas, sequences, or events.


Your task: Create your very own Game Developer’s Journal and bring to class. Due Friday (Tomorrow) for an easy, easy grade! Just show it to me!


10:15 Unity – add Sounds to Bumpers – Add lights!?

Let’s tackle adding some sounds for the bumpers in our game. We’ve done sound before. We’ll need an audio listener and then and audio component. Then we can write a script to play a sound if we run into something.

The Main Camera has a game component called Audio Listener. It’s job is to listen for audio in the game and then play it back.

Any game object can have an Audio Source component. In fact, a game object can have more than one Audio Source component. Each time you add an Audio Source, there is a slot for you to put in the sound you want to play.

In the case of our pinball game, I want to assign several AudioSources to the ball and depending on what the ball is doing, We’ll add three sounds to the ball – bumper, bumper2 and launch.

Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. With an array, you can declare one variable name followed by [ ] square brackets. Each item in the array has a position. The first item in the array has an index of 0.

private AudioSource mySounds[honk, beep, crash]
//what index in the array is beep?

For today’s demo, we’ll add three sounds. A launch sound for when the ball takes off and a bumper sound to play for different bumper types.

Code for the SoundHandler Script

using UnityEngine;

public class SoundHandlerPinBall : MonoBehaviour
{

    //create an array to all of the sounds then map each sound to an audio source
    private AudioSource[] mySounds;
    AudioSource bumperSound;
    AudioSource bumper2Sound;
    AudioSource launchSound;

    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {
        mySounds = GetComponents<AudioSource>();
        bumperSound = mySounds[0];
        bumper2Sound = mySounds[1];
        launchSound = mySounds[2];
    }

    //the methods below are public methods that will be called by other gameObject Scripts
    //we can name our methods anything you want
    public void Bumper()
    {
        mySounds[0].Play();
    }

    public void Bumper2()
    {
        mySounds[1].Play();
    }

    public void Launch()
    {
        mySounds[2].Play();
    }
}

Code for when we want to call the Script from another script – very handy

//create a variable in the code where you want to use a sound
private SoundHandlerPinBall sh;

//Get the componenent which is the script itself - Do this in the Start Method
sh = GetComponent<SoundHandlerPinBall>();

//when the ball collides, get a reference to the script (sh) and call the public //method you created in that script

private void OnCollisionEnter2D(Collision2D collision)
{

    if (collision.gameObject.CompareTag("bumpers"))
    {
        sh.Bumper();
    }

    if (collision.gameObject.CompareTag("bumpers2"))
    {
        sh.Bumper2();
    }


}

Challenge – create a sound for game over!

Some places to generate and collect sounds:

FreeSound

OpenGameArt.org

ChipTone

10:50 Break

11:00 PSA – Last Looks

This is your chance to get your finished project turned in on time. If you are done – excellent, begin to load to Youtube. Follow the submission guidelines. Drop the link to your completed youtube video in this dropbox.

11:30 PSA Final Viewing

Let’s celebrate by watching your video. You don’t have to do anything except press play. We’ll watch each video twice. If you want to share something you are proud of, we’d love to hear it.

Dropbox for your YouTube Link

12:25 Lunch

tacos

12:55 Independent Reading

book covers

1:20 Break

1:30 Design Challenge

1:50 Production and Independent Support Time

  • Pinball Game Project
  • Game Journal – bring Friday

2:38 Dailies

Dailies can be placed in the CAWD2 Dailies Folder on the CAWD2 Public Folders drive

2:40 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