× Main Menu

C# Tutorial Create a side scrolling platform game in visual studio

In this tutorial we will show you how to create a simple yet efficient side scrolling game only using Visual Studio toolbox components using the c# programming language. We have create another c# platform game tutorial before where you played the game in a static level for this one, we thought we can do better by adding the side scrolling and platform elements together. The main objective of this game, you the player are in a level where there is a locked door, you need to collect the key from the other end of the level while collecting some of the coins and not dropping off the platforms. Once you collect the key you are able to open the door and complete the level. Premise is fairly simple and it’s a lot of fun to make, let get started.

note – games development is a lot about trial and error, don’t be afraid to of the errors or the game breaking, while doing this tutorial it seems a lot easier to follow through but if you want to add more functionalities to it, don’t be afraid to try it out, if the worse happens this tutorial is here to help other than that you can try to make anything you want.

Lesson Objectives

  1. Create a full side scrolling platform game in visual studio with c# programming language
  2. Use several picture boxes and control them using timers
  3. Use Loops to easily identify the platforms, coins, keys and doors
  4. Create gravity and jump force in visual studio
  5. Using Key down and Key up events to control the character
  6. Smoothly scrolling the background, items and platforms as the player moves between left or right

Full Video Tutorial


Download the side scrolling platform game images here



3 responses to “C# Tutorial Create a side scrolling platform game in visual studio”

  1. Sylar Dean Paginton says:

    PHEW! impressive.. typed everything out all correctly and I got this error šŸ™

    CS1061 ‘Form1’ does not contain a definition for ‘Form1_Load’ and no accessible extension method ‘Form1_Load’ accepting a first argument of type ‘Form1’ could be found (are you missing a using directive or an assembly reference?)

    its a problem with the line that says.. ” public partial class Form1 : Form ” at the beginning of the code. Form1 : Form is all blue writing where the ‘Form’ word should be black accordign to the full code picture on the last page above.

    Any clue on how I can solve this please?

  2. Anhar Ali says:

    This error means that you do not have a form 1 load function in the code. You might have double clicked on the form which automatically adds a form load function. You can remedy this by deleting the event from the designer or you can delete the function from the event window.

  3. Vida Infinita says:

    I can’t believe you will make me type this entire code! What did it cost you to leave a pastbin? I just came here because of logic … Forget it. Thank you anyway.

Comment on this tutorial and let us know how you got on -

%d bloggers like this: