Skip to content

Create a simple butterfly catching game using dynamic animated butterflies using OOP C# and Win Forms

Notifications You must be signed in to change notification settings

mooict/Butterfly-Catching-Game-MOO-ICT

Repository files navigation

C# OOP Tutorial Create a Butterfly Catching Game In Windows Forms and Visual Studio

Welcome to this tutorial from MOO ICT. In this tutorial we will be making a Butterfly Catching game in C# and Win Forms in Visual Studio. This tutorial will be a collection of all of the methods we have used in the previous tutorials and we will be able to spawn different GIF images using the Image and Image Animator class in C#. We will be using OOP programming principles to create a butterfly class and then use that class to create a Butterfly Object in the game and animate and move them using the timer component. The butterflies we generate in the game will be completely transparent so when the images are overlapping you will be able to see the butterfly animation behind it. We will be creating this only using C# and Win Forms so no use for a games engine such as Unity or GODOT. Hope you enjoy this working on this project and lets get started.

Lesson Objectives-

  • Create a Butterfly catching game using C#
  • Create a Custom Butterfly Class in C#
  • Dynamically Paint the images to the form
  • Create Multiple Forms in Visual Studio. 1 for the title screen with the start button and 2 for the games window
  • Design both forms using the visual studio components such as picture boxes, labels and timer
  • Use public functions from the class to move the butterfly randomly across the screen and change directions when needed.
  • Use variety of variables such as integers, float, string and Boolean.
  • Since Image class doesn’t have a CLICK event we will need to make one ourselves to register when we click on a butterfly image
  • Use Image animator class to animate the GIF images
  • Use an Image array to randomly assignment a different colour butterfly
  • Create custom functions to display game and restart the game after the time limit has been reached

Video Tutorial - Click below to Watch this video no YouTube

Subsribe to the youtube Channel to create more project just like this one.

Download C# OOP Butterfly Catching Game Tutorial Assets here

About

Create a simple butterfly catching game using dynamic animated butterflies using OOP C# and Win Forms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages