Game Programming using C#
Course Description: This course introduces fundamental programming concepts using C# and
applies them within the Unity game engine. Students will learn core programming principles, 2D
and 3D game development techniques, and advanced programming concepts relevant to game
development.
Course outcome:
By completing this course, students will gain a comprehensive understanding of fundamental
programming concepts using C#, applying these skills within the Unity game engine to develop
both 2D and 3D games. They will become proficient in C# programming, mastering syntax,
control structures, and object-oriented programming. The course will also cover advanced game
development topics such as physics, animation, artificial intelligence, and performance
optimization. Students will enhance their problem-solving and debugging skills, and learn to
manage game development projects effectively. Furthermore, they will develop collaboration
and teamwork abilities by working on group projects, ultimately creating a portfolio of games
that showcases their knowledge and skills in C# programming and Unity game development.
Module 1: Programming Fundamentals
Topics: C# Programming Basics, Data Structures, Algorithms
Subtopics: Variables, Data Types, Operators, Control Flow, Functions, Object-Oriented
Programming (Classes, Objects, Inheritance, Polymorphism), Data Structures (Arrays, Lists),
Algorithms (Sorting, Searching)
Hands on:
● Simple C# Programs: Analysis of basic C# programs demonstrating syntax, variables,
and control flow.
Description: Students will examine simple code examples to understand how basic
programming constructs work in practice.
● Sorting Algorithms: Comparison and analysis of different sorting algorithms (e.g.,
Bubble Sort, Insertion Sort, Merge Sort).
Description: Students will compare the efficiency and implementation of different sorting
algorithms, understanding the trade-offs between them.
Experiments/Practical Activities:
○ Write a C# script for player movement: Students will write a script in C# that
controls a game object's movement based on player input. Description: This
experiment reinforces the application of variables, operators, and control flow in a
game context.
○ Implement a simple search algorithm: Students will implement a search
algorithm (e.g., linear search, binary search) in C#. Description: This experiment
provides hands-on experience with implementing and using algorithms.
Module 2: Unity Basics
Topics: Unity Editor, Scene Hierarchy, Game Objects, C# in Unity, Navigating the Unity Editor,
Creating and Manipulating Game Objects (Transforms, Components), C# Scripting in Unity
(MonoBehaviour, Game Object Interaction)
Hands on:
● Create a simple 3D scene: Students will create a simple 3D scene using basic
shapes, lighting, and materials in Unity. Description: This experiment provides
hands-on experience with the Unity editor and basic scene construction.
● Write a C# script to control a game object: Students will write a C# script to
control the behavior of a game object in Unity (e.g., movement, rotation).
Description: This reinforces the connection between C# scripting and Unity game
objects.
Case Studies:
● Unity Project Analysis: Analysis of a pre-built Unity project to understand scene
setup, game object hierarchy, and basic scripting. Description: Students will
explore a working Unity project to understand how different elements are
combined in the editor.
● Simple Unity Scene Creation: Analysis of the process of creating a simple 3D
scene with basic objects and lighting. Description: Students will analyze how to
combine basic objects and lighting to create a simple scene.
Module 3: 2D Game Development
Learning Outcomes:
○ Work with 2D game objects, sprites, and animations in Unity.
○ Implement 2D physics and collisions.
○ Create basic user interfaces (UI) for 2D games.
Topics: 2D Game Objects, Sprites, Animation, 2D Physics, UI Elements
Subtopics: Creating and using 2D sprites, Creating and implementing sprite animations
(Animation Controller), Using 2D physics (Rigidbody 2D, Collider 2D), Designing and
implementing UI elements (Canvas, UI components)
Hands on:
● Create a 2D platformer level: Students will create a simple 2D platformer level with
basic player movement and collisions. Description: This experiment applies 2D physics
and collision detection in a practical level design exercise.
● Develop a 2D game with UI: Students will develop a small 2D game with a basic UI
(e.g., score display, game over screen). Description: This experiment combines 2D
game mechanics with UI design and implementation.
Case Studies:
● Super Mario Bros.: Analysis of the game's 2D platforming mechanics, sprite
animations, and level design. Description: Students will analyze a classic 2D platformer
to understand core mechanics and design choices.
● Simple 2D Game Development: Analysis of the process of creating a simple 2D game
in Unity. Description: Students will learn how to combine different elements to create a
simple game.
Module 4: 3D Game Development
Topics: 3D Game Objects, 3D Models, Character Control, Camera Systems,Importing and
using 3D models, Implementing 3D character movement (Character Controller, Rigidbody),
Implementing different camera systems (Third-person, First-person)
Hans on:
● Create a simple 3D character: Students will create a simple 3D character and import it
into Unity. Description: This experiment provides hands-on experience with importing
and setting up 3D models.
Implement third-person camera controls: Students will implement a third-person camera
system that follows the player character. Description: This experiment applies camera control
techniques in a 3D environment.
Case Studies:
● Super Mario 64: Analysis of the game's 3D character movement, camera control, and
level design. Description: Students will analyze a classic 3D platformer to understand
how movement and camera are handled in 3D space.
● Simple 3D scene creation: Analysis of the process of creating a simple 3D scene with
character and camera setup. Description: Students will learn how to combine 3D models,
character controller, and camera setups to create a functional 3D scene.
Module 5: Advanced Programming Concepts
Topics: Advanced C# Programming, OOP Concepts, Networking Concepts, Object-Oriented
Programming principles (Polymorphism, Abstraction, Encapsulation), Delegates and Events,
Coroutines, Network protocols (TCP, UDP), Client-server architecture in Unity.
Hands on:
Implement a state machine: Students will implement a state machine using C# classes
and interfaces. Description: This experiment applies OOP principles to create a common
game development pattern.
Create a coroutine: Students will create a coroutine to implement a timed effect or
asynchronous operation. Description: This experiment introduces a useful technique for
managing time-based events in games.
Implement a simple client-server connection: Students will implement a basic
client-server connection in Unity. Description: This experiment provides a basic
introduction to networking concepts in a game context
Case Studies:
● Unity Game Engine Analysis: Analysis of how Unity utilizes OOP principles in its
architecture. Description: Students will examine the Unity engine's structure to
understand how OOP is applied in a complex system.
● Inventory System Development: Analysis of how an inventory system can be
implemented using C# classes and OOP principles. Description: Students will analyze
how to use OOP to create a practical game system.