C# Tutorial – Create a simple Color Switch game in Visual Studio

In this tutorial we will be creating a simple and fun clone of the popular color switch game. We put our own spin into the game concept itself because it makes for better learning opportunity. In the original game you play as a blob jumping across different colored objects in this game you are a colored square where the other blocks are coming towards you. To win points you will have to change your block color to match the incoming ones. As a bonus we also added a game speed up function too so its make it more challenging as you progress in the game.

Lesson objectives –

  1. Create a fun color switch game in visual studio with C#
  2. Use Key events and timer events in windows form application
  3. Use LIST, INT, RANDOM and BOOLEAN data types in the game
  4. Add a record keeper in the game, A list item which keeps the last played score
  5. Randomly spawn the blocks and place them dynamically in the game
  6. Linking Key Press events to the Form
  7. Creating a custom game reset function