Material for the C# 201 Hy-Tech Club Course. This course uses MonoGame to introduce game development in C# and introduce some C# programming concepts.
The first session will be devoted to environment setup, C# review, a course overview, and a quick code-along activity.
Hopefully, students will come prepared with their environments. They should have followed the guide to set everything up ahead of time.
Hopefully, the students will be well-prepared for the C# 201 course. To gauge their current level, play a quick review game of some sort. This can also serve as an icebreaker activity.
Briefly show the final game in action to show the students what the course is building toward. Additionally, make sure to discuss any housekeeping notes for the course.
Complete the Hello World activity with the students. This will serve as an introduction to MonoGame.
Review the new concepts on the Reference page.
- MonoGame stuff (content, basic methods, screen, drawing, time, keyboard input)
- Velocity + Acceleration math
Texture2D
objectsVector
objectsRectangle
objects- Properties
- Inheritance
- Virtual/Override Methods
- Enumerations
- Self-paced
- Group-paced
There will be a series of code-along activities, each building on the last. For the starting point of each activity (other than the "Hello World" activity), there will be a branch in the student-facing GitHub repository.
- Environment setup
- "Hello World" - make the player appear, loading in a
Texture2D
object, representing its position with aRectangle
- Create the
Player
class and control the player's movement - Create the
Enemy
class - Create the
Sprite
class and make thePlayer
andEnemy
classes inherit from theSprite
class - Create the
Projectile
class and let the player fire projectiles - Allow
Enemy
objects to fire projectiles - Handle collisions between projectiles
- Make
Enemy
objects disappear and regenerate - Create the life count / score
- Game Over
- Create the screen cover
- Create the EnemyColumn class
- Create the divider line
- Add animations
- Make smoother movement
At any point during the semester, walk through the Piskel Lesson to show the students how they can create their own sprite images.
All of the walkthrough code is available in this GitHub Repository. To see the difference from one part to another, utilize GitHub's diff tool. Select the part to start and the part to end to see the changes.