C# Tutorial - Create 4 Way Sprite Movement Animation Using .Net, Windows Form and Visual Studio

Поделиться
HTML-код
  • Опубликовано: 24 фев 2023
  • Images and Source Code - www.mooict.com/c-tutorial-cre...
    Lets make something fun. How about a simple animation where you get to animate a single character walking around the screen in all 4 directions and we will get to do this only using C# and Visual Studio. Well it can sound sort of confusing at first but we have figured out how to do this in style. In this tutorial you will find the answers to all of those questions. We will break down how to make a simple animation only using C# and we will be importing out images and loading them inside of the program and animate them using a custom function. This type of animation is very popular for Zelda games and some top down isometric games. We will recreate just the movement and demonstrate it using windows forms and visual studio. Let’s get started.
    Part 2: How to Spawn random game items in 2D and collect it using collision in Windows Forms and C#.
    • How to Spawn random ga...
    Join the Flappy Bird Hunting Game in C# and OOP on Udemy -
    www.udemy.com/course/flappy-b...
    LIKE - SUBSCRIBE
    Help MOO grow to a better channel.

Комментарии • 41

  • @Smmmile
    @Smmmile Год назад +4

    Always enjoy watching your content

    • @mooict
      @mooict  Год назад

      Glad you enjoy it!

  • @nguyenvancanh3150
    @nguyenvancanh3150 6 месяцев назад

    You are very good! Thanks for sharing .

  • @arnonuhmer3771
    @arnonuhmer3771 Год назад +3

    very simple and nice straight forward tut, i like your videos cause of exactly this

    • @mooict
      @mooict  Год назад

      Thank you. Glad you liked it.

  • @TheNeckooo
    @TheNeckooo Год назад +3

    great tutorial, thank you so much!

    • @mooict
      @mooict  Год назад

      You're very welcome!

  • @OLDbespreDEL
    @OLDbespreDEL Год назад +4

    Thanks for the tutorial.
    Do you plan to continue? Adding enemies or hit animations and interacting with objects on the map?

    • @mooict
      @mooict  Год назад +4

      Hi, nothings planned at the moment for the future. I’m glad you enjoyed it so far.

  • @este_bandido4227
    @este_bandido4227 Год назад

    Thanks for the tutorial.
    and could it also be made to jump?

  • @PriyadarshiPrashant
    @PriyadarshiPrashant Год назад +2

    recently i have mixed feelings about myself
    1 : genius one is that recently i found some of gem channel like your ,
    2 : dumb one is why didn't i found it earlier

    • @mooict
      @mooict  Год назад +2

      I pick option 1 lol. Thank you for the lovely comment.

  • @mythicalcoolkroger3650
    @mythicalcoolkroger3650 7 месяцев назад +2

    hello i have a problem where player = Image.FromFile(playerMovements[0]); gets an exception where the index cannot find the image can you help me please.

    • @mooict
      @mooict  7 месяцев назад +2

      Hi, the line before this one should be loading all the images from the folder into the list. I think your list is still empty that’s why this error is showing. Double check the the set up function from the tutorial.

  • @shopenggu4779
    @shopenggu4779 Год назад

    Thanks, tho I have to ask if you're gonna continue this stuff like adding collisions and other stuff?

    • @mooict
      @mooict  Год назад

      I will do another tutorial on item drop and collect on this one soon.

  • @davidhouser9280
    @davidhouser9280 9 месяцев назад

    I am trying to create a chat messenger program and i want to add live animations i have made already and a cam view to the program any sujestions? Thank You

  • @user-sx5kw1bm9l
    @user-sx5kw1bm9l 7 месяцев назад +1

    Hello, this tutorial is a good one but i have a problem, under the "private void setUp()", where you wrote "playerMovements = Directory.GetFiles("player", "*.png").ToList();", i tried typing it as well but it was flagging an error the "the name "Directory" does not exist in the current context", but i still don't know what to do, please what can i do to correct this mistake sir.

    • @mooict
      @mooict  7 месяцев назад +2

      You haven’t created the player directory in the debug folder. Create a directory called player and paste all the player png files inside of that folder.

    • @user-sx5kw1bm9l
      @user-sx5kw1bm9l 7 месяцев назад +1

      Thank you sir it worked, am so excited ❤@@mooict

  • @yort1496
    @yort1496 6 месяцев назад

    Hi there, I've followed your code and created a folder that contains all the images in the correct order. But, whenever the character moves, it pulls the wrong images. The steps are correct and he moves in the correct direction, but the images to animate my character are all wrong. I've told it to use images 8-11 for left, and images 12-15 for right. But for right, it's using images 6-9. and for left it's using 2-5. I have no idea why it's doing that.

    • @yort1496
      @yort1496 6 месяцев назад

      Never mind, I found the issue

    • @mooict
      @mooict  6 месяцев назад

      That's Great News. What was it?

  • @user-bo1mv9cd2m
    @user-bo1mv9cd2m Месяц назад

    why is my character not moving when I press keys? please help

  • @kuroineko975
    @kuroineko975 Месяц назад +2

    very cool but I why doesn't mine move when I run the program? T^T

    • @user-bo1mv9cd2m
      @user-bo1mv9cd2m Месяц назад

      same problem man

    • @mooict
      @mooict  Месяц назад +2

      This could be caused by several reasons 1 check if the timer is enabled in the properties window. 2 if the timer event is linked to the timer 3 if the key down and key up events are linked to the form. The full project is provided on GitHub links in the description if you want to clone it and check against your own code 👍🏽

    • @kuroineko975
      @kuroineko975 Месяц назад

      @@mooict ty T^T

  • @mythicalcoolkroger3650
    @mythicalcoolkroger3650 6 месяцев назад

    hello its me again this time i have a problem with lblMovent.Text it says that lblMovement does not exist in current context. can u pls help me been loving the video so far

    • @mooict
      @mooict  6 месяцев назад +1

      Hi, check the name of the label in the properties window and set it to lblMovement.

    • @mythicalcoolkroger3650
      @mythicalcoolkroger3650 6 месяцев назад

      ​@@mooict I do not know which part of properties to change if there is a time in the video please show me.

    • @mooict
      @mooict  6 месяцев назад +1

      from 2.54 shows the change you need to apply to your project.

    • @D_N-Editz
      @D_N-Editz 3 месяца назад

      @@mooictfor me it says lblMovement is already in use

    • @mooict
      @mooict  3 месяца назад

      ​@@D_N-Editz Check if another label was named lblMovement using the drop down menu on the properties window.

  • @brayanospina2403
    @brayanospina2403 Год назад

    Bro, where or how did you get the images?

    • @mooict
      @mooict  Год назад

      Links in the description of the video.

    • @brayanospina2403
      @brayanospina2403 Год назад

      @@mooict yes, but, Where did you get the images? Did you design them?

  • @jemmargilbert
    @jemmargilbert Год назад

    The background is flashing a lot and the movement is happening. I have rechecked all of the code and I don't know what I did lol

    • @mooict
      @mooict  Год назад

      Enable double buffer on the form from the properties window. It’s in the early part of the tutorial.

  • @NourEddineStudentMermoune
    @NourEddineStudentMermoune 3 месяца назад

    can you give us the source code

    • @mooict
      @mooict  3 месяца назад

      Source code and images available in the description of the video.