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

Tuesday, May 24th

Tuesday, May 24th

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

Today’s Notes

  • Today is an EHS B Day
  • No School on Monday, May 30th – Memorial Day
  • ALL missing work turned in by Friday June 3rd at 2:05. I will be handing you a list if you have incomplete work. If you have items due, I will be pulling you from your game dev time to complete. The first pull date will be Friday of this week. Don’t let your team down!
  • May 31st 11am – Dan M. & Isaac Portfolio Presentations in m116

9:40 Attendance

9:45 Unity Micro Presentations – Finishing

presenting in front of group

10:00 Unity – Adding a Timer Function

Can you think of some reasons to add a timer to a game?

Adding a timer can really enhance the game play, user experience and serve as an essential part of your game mechanic or core game loop. I mean what would be Stardew Valley if it wasn’t for the whole day / season storyline…

A basic timer is pretty easy to set up. Not too much code. After that, you can get much more complex depending on your game needs. Below is a bare bones countdown timer.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI; // needed to add a Text type variable
using UnityEngine.SceneManagement; // needed if we are changing scenes

public class Timer : MonoBehaviour
{
    // variables
    public Text timerText;  // this is the text we'll show on the screen
    public float targetTime = 10.0F; // this is the length of the timer
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        targetTime -= Time.deltaTime;  // take the target time and subtracts the frame rate
        timerText.text = targetTime.ToString(); //converts the float to a string
        if (targetTime < 0)
        {
            //do something here, like end game, destroy ship, whatever you like
            Debug.Log("the timer ended");
        }
    }
}

The following code is another countdown timer variation. In this scenario we add a boolean for when to run the timer. In this case we set it to true when the game begins. Then, the timer will run.

You could use a Trigger or Collider to set your timer to true, and then run the timer. This might be handy on a powerup or enemy.

public class CountdownTimer : MonoBehaviour
{
    //Variables
    public float targetTime = 10.0F;
    public Text timerText;
    public bool timerRunning = false;
    private void Start()
    {
      
        timerRunning = true;
    }
    void Update()
    {
        if (timerRunning)
        {
            if (targetTime > 0)
            {
                targetTime -= Time.deltaTime;  // takes the Target Time - the frame rate which is the time.DelaTime
             
                timerText.text = targetTime.ToString("F2");  //this will convert the target time to 2 decimal places
            }
            else
            {
                TimerEnded();
            }
        }
        
    }

    void TimerEnded()
    {
        Debug.Log("The Timer ended");
        targetTime = 0.0F;
        timerRunning = false;
    }
}

Don’t discount the Asset store. Depending on your needs you can find several drop and drop timers. There are many advanced timing functions like storing time, multiple timers, etc… See for yourself.

Awkward Transition … roles you might consider for your game dev

Roles on a successful game team – if you are working alone, then likely you are handling all of these responsibilities. If you are on a team, then a division of labor will ensure that each person will be doing their part.

RoleDescription
DesignerA designer is responsible for planning the main game elements, rules,
and overall style. The Lead Designer makes sure the game is fun,
flows well, and is playable. A Lead Designer may coordinate among
other, more specialized designers that handle the actual graphical user
interface (GUI Designer), the mechanics of game-play (Mechanics
Designer), designing game levels, or other areas (Level Designer).
Digital ArtistA digital artist is responsible for all of the graphics, movies, sound
effects, and music found within the game. Some artists specialize in
only one type of work such as building game levels (Level Artist),
creating characters (Character Artist), developing high-quality
textures (Texture Artist), drawing animations (Animator), or creating
music and sound effects (Audio Director).
Developer /
Software Engineer
The developer or programmer, of course, writes the code that brings
the game to life! A Lead Programmer might work to coordinate the
efforts of many other developers.
Project ManagerA Project Manager will provide oversight during all phases of the
software development lifecycle. The Project manager will coordinate
among the designers, programmers, testers, artists, and other team
members to ensure schedules are met, all required features are
implemented and tested, and that the team members work together
smoothly.
MarketingA person in marketing is responsible for advertising the game and
encouraging the public to make a purchase.
PublisherThe publisher of a game will ensure the game is physically (or
electronically) packaged for sale and is placed on the shelves in
retail stores or online marketplaces. Often, a separate company and
not an individual within the game development team performs the
publishing role.
Quality AssuranceQuality assurance team members will test the game to make sure it
works correctly
Retail Sales AssociateA retail sales individual within the gaming company may convince
gaming stores to carry the new game on the shelves. A salesperson
may also come up with direct-to-individual sales strategies that
bypass traditional stores.

10:35 Break

10:45 English with Ms. Yopp – One Pager Work Time

(Ms. Yopp will not be in today – dedicated work time to finish your project) We’ll resume game dev time at 11:30am today

11:35 Game Studio Work time

DateWeekDeliverableSoftware Development Cycle
May 8th – 13thOneProject Intro, Game idea generation, pre-planningPlanning
May 16th – 20thTwoGame Design Document, Asset creation / CodingAnalysis / Design
May 23rd – May 27thThreeGUI, Movement, Core MechanicsDesign / Implementation
May 31st – Jun 3rdFourPrototype with game playTesting/Maintenance / Publishing
June 6thJune 6th Game Jam

Game Mechanics and your UI should be the focus of your project this week. By the end of the week we should be able to move through your level and see a start of your User Interface

software cycle

5 Minute Scrum Meeting

5 Minute Trello Board updates

12:15 Lunch

12:45 Focus on Literacy

book covers

1:05 Break

1:15 Production Time & Guided Support

CAWD Fun Games Studio work time (my fancy way of saying work with your game / game team

Past Due Work – Now Overdue!

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