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
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.
Role | Description |
---|---|
Designer | A 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 Artist | A 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 Manager | A 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. |
Marketing | A person in marketing is responsible for advertising the game and encouraging the public to make a purchase. |
Publisher | The 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 Assurance | Quality assurance team members will test the game to make sure it works correctly |
Retail Sales Associate | A 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
Date | Week | Deliverable | Software Development Cycle |
---|---|---|---|
May 23rd – May 27th | Three | GUI, Movement, Core Mechanics | Design / Implementation |
May 31st – Jun 3rd | Four | Prototype with game play | Testing/Maintenance / Publishing |
June 6th | June 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
5 Minute Scrum Meeting
5 Minute Trello Board updates
12:15 Lunch
12:45 Focus on Literacy
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!