CSC 470/670 - Game Programming!

Learn how to make games using the Unity Game Engine.

Instructor Mike Treanor

Examples

Most examples from class will be annotated and posted here. Remember to look carefully at the comments in the code. To quickly look at the code, just look through the Unity project in the GitHub repository. To integrate the project into another Unity project, download and import the .unitypackage file. In your own Unity project, go to Assets > Import Package > Custom Package...

9/14/20
The Basics

Skateboarding gator gets fries.

This covers everything listed here

CODE PLAY
9/21/20
Game of Life

Instantiating prefabs

Changing colors in code

Two dimensional arrays

Creating emergence

Using a "Game Manager" to manage game state

CODE PLAY
10/5/20
Flight Simulator

Creating nuanced controls

Instantiating prefabs

Terrains

Generating and positioning 100's of objects in the world

CODE PLAY
10/8/20
3D Platformer

Simulating gravity

Nuanced platformer controls

ProBuilder for non-primitive shapes

Using CharacterController

CODE PLAY
10/19/20
Clicking on 'Units' and moving them

  • Mouse interaction with GameObjects via OnMouseXXX functions
  • Raycasting from the mouse position to recognize what was 'under the mouse'
  • Positioning UI elements based on world positions
  • Orthographic projection with the camera
  • Rotating a game object towards a point over time
  • Making a Meter on the UI that represents a unit's health
  • A "waypoint" system where the player can place markers and then tell the unit to follow them in order.

CODE PLAY
11/16/20
Persistence, Singleton, Timing, and Polish

  • Singleton pattern and DontDestroyOnLoad
  • Simple saving of game state across plays with PlayerPrefs
  • Coroutines
  • Creating sequences of text
  • Enhanced meter
  • Agent navigation with NavMesh
  • Post-Processing Effects

CODE PLAY

Exercises

All exercises are designed to allow you to demonstrate proficiency in various aspects of game programming. As you code, you should also adhere to the code standards demonstrated in the examples, and that I demonstrate in class.

# Due Date Title Link
0 8/31/20 Roll a Ball link
1.1 8/31/20 Setting up your development environment with Unity and Github Setup Instructions
2 9/18/20 Make a small game with 3d models that demonstrates your understanding of the basics. link
3 10/1/20 Game 3: Game of Life: The Game link
4 10/15/20 Game 4: Flight Simulator OR Platformer OR BOTH!?! link
5 11/9/20 Game 5: Clicking and UI link
6 (multiple due dates) Final link

Syllabus

Office Hours

Thursday 1-2:30pm