2D Top Down Pixel Art RPG Game Dev in Unity 2022 ~ Crash Course Tutorial for Beginners

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • Guide on many of the first steps building up a top down 2d pixel art RPG from scratch in Unity 2022 version. The goal of this crash course is to cover as many relevant beginners topics as we can but linked together in actually building out some prototype mechanics for a potential game.
    For the video, I'm using this mystic woods pack for this tutorial. game-endeavor.itch.io/mystic-... You'll only need the free version to follow along for this video
    Better Knockbacks Update Video! • (Update!) Better Knock...
    Scripts Download drive.google.com/file/d/1xvTr...
    Part 2 • Top Down Action 2D RPG...
    Scripts and Project / 70422725
    ◢◤◣◥ My Latest Unity 2D GameDev Course ◢◤◣◥
    Make a 2D Platformer Character with State Machines in Unity 2020
    skl.sh/3lpWPQL
    ◢◤◣◥ Chris Recommends ◢◤◣◥
    Skillshare for Online Video Courses ►► www.skillshare.com/r/user/chr...
    ProtonVPN for Internet Privacy ►►go.getproton.me/SHDO
    ◢◤◣◥ See My Full Software Courses ◢◤◣◥
    christutorials.teachable.com
    www.udemy.com/user/chris-nava...
    www.skillshare.com/r/user/chr...
    ➣ Follow Me On
    RUclips ►► / darkskeletontuts
    Odysee ►► odysee.com/$/invite/@ChrisTut...
    Bitchute ►►www.bitchute.com/channel/hU2e...
    Pocketnet ►► pocketnet.app/christutorials
    Minds ►►www.minds.com/register?referr...
    Gab.ai ►► gab.ai/ChrisTutorials
    0:00 Project Setup
    1:22 Importing Art
    1:59 Settings for Pixel Art Imports
    4:24 Creating a Player Prefab
    8:20 Adjusting Camera for Pixel Art
    9:57 Building Tilemaps from Tileset Art
    21:57 InputSystem Package (New Player Input)
    25:11 Adding a Script and Choosing a Code Editor
    26:11 Player Conttroller Script
    38:01 Movement Testing
    41:38 Code - Sliding on Edges of Collision
    45:04 Animation Setup for Player
    57:07 Cinemachine Follow Camera
    58:44 Sword Attack Animation and Code
    1:04:16 Attack Collision Trigger and Dealing Damage
    1:15:09 Slime Setup, Collider, and Taking Damage
    1:24:17 Slime Animations
    1:28:57 Wrapup
  • ХоббиХобби

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

  • @Teelur
    @Teelur Год назад +302

    At 47:45 , if you don't have the sample rate (like I didn't), go to the far right of your screen and click the 3 vertical dots (under the lock) and select "Show Sample Rate" :)
    Edit: wow i didn't expect this to become the top comment 😅 Glad i could help you all

  • @Youtuber-ly6tx
    @Youtuber-ly6tx 2 года назад +193

    Followed the whole video, expecting it to take me 2 hours. It took me all day! Well worth it though. I have an actual player running around on screen killing enemies!

    • @michaeljoel8848
      @michaeljoel8848 2 года назад +23

      this comment makes me want to give it a shot. thanks!

    • @boerbol9422
      @boerbol9422 2 года назад +2

      Thanks for sharing!

    • @KUROI6969
      @KUROI6969 2 года назад +2

      did you just copy the code or improve it too? I'm hesitating to watch this because what if i just copied it and not learn anything

    • @AltDotAlex
      @AltDotAlex 2 года назад +9

      @@KUROI6969 copy code, then pause vid and think hard about next steps, write your guess down in comments in the code, then see how close you were. near the end of the video you'll likely be guessing the correct next step, even if you're not 100% on how to implement.

    • @okachobe1
      @okachobe1 2 года назад +14

      @@KUROI6969 another way to use these types of videos to learn is by adding on your own ideas after you have finished the tutorial. Then you have other code that's already working to use as reference for the new stuff you add

  • @1Chitus
    @1Chitus Год назад

    Thank you so much for uploading such a high quality tutorial for free! Very succinct and well explained, I’ve learned tons.

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

    Giving this a follow, just got up to the movement part about half an hour in and so far it's very easy to follow for a complete beginner like myself.

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

    very cool Chris, I was just working on a top down retro demo and ran across this vid. Extremely helpful!

  • @blossomrose5134
    @blossomrose5134 Год назад +1

    this is such a banger tutorial. very clear and have almost everything that i want

  • @nicka.7682
    @nicka.7682 2 года назад +223

    At 58:28, if you are experiencing jittering after adding the Cinemachine Pixel Perfect extension, make sure to DISABLE the default Pixel Perfect Camera component on your Main Camera game object. The two pixel perfect cameras can fight each other for control and add jitter.

    • @alcazarbrandon
      @alcazarbrandon 2 года назад +3

      thanks for this comment, was trying to figure out what has happening there. This immediately fixed!

    • @nickrossis5935
      @nickrossis5935 2 года назад +5

      I still experience jittering even though I disabled the pixel perfect camera on the main camera. And I dont see any difference when I turn the script on, it seems to have the same amount of jittering. Any idea of what the problem might be?

    • @iz2362
      @iz2362 2 года назад +58

      @@nickrossis5935 I'm not sure if you fixed this issue but I also had this issue (Seems common in URP). You can fix it by changing the Interpolate value in your players RigidBody2D component from None to Interpolate

    • @LinxDesigns
      @LinxDesigns Год назад +1

      thanks man, i was searching on the internet so long for this solution!

    • @JG-kb5nv
      @JG-kb5nv Год назад

      @@nickrossis5935 did u find a fix?

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

    Thanks Chris. Good stuff. Explications was clear, I like the Your narration style, even with errors and alternative ideas. With video like this one a huge progress in learning process can be made!

  • @ayowtf813
    @ayowtf813 Год назад +1

    BEST tutorial video ever man, you've crushed it and explained everything so well

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

    I appreciated the explanation of the newer Player Input Component. I'll no doubt use this script for my basic 2D characters in the future. Very easy to follow and understand, thanks!!

  • @mrt8bit692
    @mrt8bit692 Год назад +44

    already 5 minutes in and know that this tutorial is going to be such a banger, thank you so much for putting this together!

  • @isagive
    @isagive 2 года назад +3

    The best new steps tutorial i have seen, thank you very very much ❤️❤️

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

    A wonderful guide to say that least, perfect for beginners, it is quite user friendly thank you for releasing it!

  • @Qegixar
    @Qegixar 11 месяцев назад +13

    Fantastic tutorial! Starting Unity projects can be really daunting with all of the gizmos that you need to configure, and I'd never done a 2d project before so I had no idea how to manage sprites or collision. This made setting everything up super easy to follow!

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

    cool tutorial video, in most unity tutorials, I never feel like I'm learning anything, except for this one, I was able to add basic modifications to your scripts. Nice Video

  • @lppassarelli1779
    @lppassarelli1779 2 года назад +61

    This is so great! I've been following along. I'm an hour in, with everything working smoothly! It's my first time working in Unity or in C (though I've used Python before.) I love how you model debugging and explain why you do each thing you do. I learned a lot of coding just from following along! Keep up the great work!

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

      @Concrete Hi if u still need s answer i could give u one i Personly continued on it to improve diffrent kinds of Features and after i was more known to developing top down games i worked on own Projects.

  • @mustafaonly1127
    @mustafaonly1127 2 года назад +3

    Most underrated channel. Very detailed and informative explanation. 👌🏻

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

    Excellent tutorial! Ive been a c# developer for years and always wanted to dip my toe into games development. Thanks for the tutorial!!!

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

    By far the best Unity tutorial I've ever come across! I'm not a young man and I've struggled with Unity for some time, but not now. Coding isn't a problem but this type of engine is for some daft reason. Thankyou for finally clearing this barrier for me.

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

    This video is a good start for setting up a 2D game in Unity. Really informative.

  • @random.oddities
    @random.oddities 10 месяцев назад

    Looks like a great tutorial! I can't wait to get back into some Unity projects.

  • @lide8867
    @lide8867 Год назад +7

    This is a great tutorial, I think it covers almost everything beginners need to learn to create a game with Unity - but sometimes it's hard to learn everything at once (at least for me). I was able to complete all the steps, but when I decided to start again with a blank project I was at loss. Your video is still great though, it has everything I'll need to learn in one place. I'll definitely be revisiting this in the future, thank you for sharing your knowledge!

  • @djordjegrozdanovic3029
    @djordjegrozdanovic3029 2 года назад +6

    I just downloaded unity and your tutorial is the only one that doesnt take shortcuts. Finally i can code in unity

  • @finna7824
    @finna7824 2 года назад +2

    steller video. You both explain what you are doing and show how to do it perfectly, I always felt like I knew what was happening and could follow along easily. You are a really talented teacher!

  • @1youyami
    @1youyami 7 месяцев назад

    The best tutorial I've ever seen, thank you very much!

  • @kathleenmacainsh1866
    @kathleenmacainsh1866 2 года назад +33

    This was such a great tutorial - thank you so much for putting it together. It was especially helpful that you showed how to use Unity's newer input system - as many tutorials are still using the older one.
    I like how you kept in your decision making when it came to writing the code as it put into context what it's actually like developing - that the way you decide to implement something could change.
    The one thing I'd note to anyone else following along is that there is a bug with the hit box collider - but it gets resolved later on in the tutorial. If the bug causes you issues before you get to the part where it's solved - just make sure you're using local position.

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

      i do use localPosition but still my box collider get moved way down and opposite to where i am attacking ive read that it might be related to pivot point any idea ?

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

    I made it to the end! Thank you for the tutorial

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

    Great video, thank you! This is great for an artist like myself!

  • @rfygband
    @rfygband Год назад +9

    Really good tutorial. Having a lot of fun learning how to apply some previous coding I've done to making games. The only suggestion I'd make is to slow down the speed a bit. I put the playback speed on .75 and at my complete beginner level to Unity and this type of coding, it still seems like you're zipping around the menus really fast. I've had to rewind several times even on parts where you're going back into a menu we've been in previously because I couldn't remember exactly where it was located. Other than that, this tutorial is great and really looking forward to learning more from other videos so I can make some games!

  • @user-ty5rw4hz9o
    @user-ty5rw4hz9o Год назад

    Big love to u.This course is extremely useful!

  • @rioranggayudhasaragih6931
    @rioranggayudhasaragih6931 Год назад +1

    Ima download it thanks for sharing!!

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

    ty for this tutorial, very helpful and much appreciated :)

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

    Thanks man for creating this great tutorial.

  • @niicholls3682
    @niicholls3682 2 года назад +14

    Great video and at a comfortable pace. Will you be adding any more parts to this series?

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

    Really nice job. I did so stuff with MIDI/DAW/soft banks wayyy back in like 99/00 in college and was ok at it. I bought soft soft last

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

    great tutorial! just the right amount of information

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

    Great tutorial thanks for your hardwork!

  • @lyuboslavnemtsov8417
    @lyuboslavnemtsov8417 2 года назад +4

    Love the explanation! Great work!
    Keep up the good tutorials!

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

    Thanks for your tutorials, it helps me a lot!

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

    An excellent tutorial! Thank you!

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

    Great tutorial! I love that you can get through this one in just over an hour (or two hours or so with pausing like me) and get quite a lot out of this. Other tutorials I have been doing are upwards to 10 hours long which can be really daunting.
    I ran into little hiccups and weirdness of course but was able to stay with you for most of it. I like that you left some little mistakes in as I was often able to catch them and fix them before unpausing the video as if it were a little quiz.
    Thanks!! Cheers

    • @slowfuse
      @slowfuse Год назад +1

      I got quite frustrated by how fast it moves, but tbh I can just replay and pause if I get stuck on something. Maybe faster is better

    • @tonioswald
      @tonioswald 5 месяцев назад

      ​@@slowfuse yes the speed is kind of annoying and would prefer if the author would go more in depth but nontheless its still something to learn from

  • @lexecutive
    @lexecutive 5 месяцев назад

    Thank you, Chris, for this awesome tutorial. Completing it definitely took a while. Next time, it would be great if you could indicate which lines you'll be fixing/modifying.

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

    Following this tutorial gives me that same giddy excitement I had in primary school learning addition and subtraction. I think that was the last time I was ever excited about learning lmao

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

    This is really good! Thank you!

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

    Great crash course! Thank you!

  • @hoangleminh2424
    @hoangleminh2424 2 года назад

    great tutorial and detail step by step thanks

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

    Best tutorial ive evr seen bro ur d best!!!!!

  • @mysterious_monolith_
    @mysterious_monolith_ Год назад +1

    You are such a good teacher!

  • @GiftWrapGabe
    @GiftWrapGabe 2 года назад

    This was awesome thank you !

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

    Dear Michael, it's you that make register for youtube, I follow your tutorial from bilibili to your channel here and I'll continue to support

  • @enghasanm
    @enghasanm 2 года назад +4

    This was amazing tutorial, as others mentioned, all the walkthrough worked for me, only thing is the frames samples in the controller was not showing on my end, had to enable it, beside that, everything else worked as explained,
    Thank you so much for the free assets also, it is rare to find creators giving away assets for free, you are amazing.
    Hope you upload part II, where you have the mobs attack and move around as you mentioned.

    • @KoalaOnYT_
      @KoalaOnYT_ 2 года назад

      how did u enable frame samples

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

      @@KoalaOnYT_ on the animation window to the left there are three dots (to the left of a lock), below those 3 dots there are additional 3 dots (that's where you enable sample rate)... took me a long time to figure that out.

  • @riddma3620
    @riddma3620 2 года назад

    Great tutorial for beginner CS student! I suggest you could implement a simple interface or event bus for dealing damage, since it's common practice in real projects.

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

    I am very glad that I stumbled upon your video

  • @Montigorable
    @Montigorable 5 месяцев назад

    Thanks for the comprehensive tutorial. By the way, at 42:11, rb.Cast() automatically works with every GameObject and its children that have colliders or triggers. If you have multiple colliders but want to use only one, you can declare the required collider and use yourCollider.Cast() instead of rb.Cast().

  • @prism_schism
    @prism_schism Год назад +1

    AMAZING tutorial! That being said, I believe the movement script is calling the key press TWICE for every press, which in turn causes movement stutters when moving around the map. Apparently, this happens fairly often to people.

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

      how do i fix this

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

    Such a wonderful tutorial, but if you want a challenge while going through it, the free asset mystic woods actually has sprites for all x and y directions. This includes their idles and moving sprites. So when he goes over movement and attacks this was an awesome way for me to challenge myself and do extra research into how to make it work while following this tutorial. Reasonably hard challenge but fun to do (and possible).

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

      Hi, by any chance can you explain how or where I can find the information to add all the x and y directions as I'm struggling

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

    YES , I enjoyed and learned a lot , THX !
    I would like to see how you will continue with it
    Setting the levels and doing more ?
    Thx a lot for your time

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

    Excellent tutorial!

  • @WPCraft
    @WPCraft 11 месяцев назад

    Your guide made my day. Thank you very much, bro!

  • @BenFuller321
    @BenFuller321 Год назад +5

    This was a great tutorial, good to have one that focuses on this kind of 2D style game that's up to date for Unity in 2022. I've faced so many issues with some of the Brackeys stuff because it's just simply out of date. But we need a part 2 to this, there is a lot left unanswered. How do we get Enemys to chase and attack for instance?

  • @slugg3r931
    @slugg3r931 10 месяцев назад +3

    This tutorial was great. One change I would recommend is to use the collider2D on the player for the Raycast check prior to movement instead of the rigidbody2D he uses. Using the rigidbody will make the raycast return any collision results for all colliders on the game object, including child objects. So it will keep you from moving if you have a separate weapon collider for example instead of just wanting to make sure you can't move when your feet collide with the terrain.

  • @TheSoctorDuessExperience
    @TheSoctorDuessExperience Год назад +1

    Am I upset we didn't do the enemy movement together? Of course, I am. I didn't want this tutorial to end!! But the main reason I was able to complete is because it was only 90 minutes, and it was straight to the point while also being very informative. I could not have asked for more from the instructor. 10/10

  • @bcyayay
    @bcyayay 2 года назад +1

    This deservers a lot more praise

  • @mushmello526
    @mushmello526 Год назад +5

    14:01 Not much of a problem, but it's Control, not Shift. With shift you can select 2 elements and all in between get selected too, so in your example you can select grass, press shift and also select decor 16x16, that includes fences too

  • @SoultrailStudio
    @SoultrailStudio 4 месяца назад

    It's quite a while ago, but I find this very usefull coming from other engines that was easy to follow. Yet to continue there is stuff to learn that a newbe cannot properly formulate to find the right tutorials for. Stuff like persistant storage of information (for inventory or player stats) and having different scenes to go from to.

  • @mtz9990
    @mtz9990 2 года назад

    i like this tutorial so much, it help me a lot, could you please continue, maybe do some inventory, grab an item and throw it out

  • @theanimationstation9644
    @theanimationstation9644 2 года назад +5

    Was a good video,I mean I wasn’t able to follow but not without stopping the video, how did you learn coding? You have gained a sub
    The amount of work that you have put in is outstanding👏🏻

  • @user-ho3cz1ce3u
    @user-ho3cz1ce3u 4 месяца назад

    finally finished the tutorial this is my first time that making a TopDownGame.For those who struggle at 1:20:00 the player sprite is always under the Slime sprite,just change the slime's z position in transform bigger than 0,(I set it as 0.1),if the sprite disappear,it might be the problem from camera.Thanks for your tutorial it help and inspire me a lots.

  • @sebastiansanhueza9601
    @sebastiansanhueza9601 Год назад +39

    Just finished the whole tutorial, Chris! Took me at least two or three months, as I tried to commit to memory most of the code you wrote. I wrote a whole chunk day after day until I could write it by memory. I know the point is not to memorize everything, but the repetitive procedure really helped me to think about the logic of each line of code - thinking why a given object or function had to be private or public, why certain if-statements had to use an else-if or not, etc. You really packed a good chunk of must-know material in such a short video and I'll always be grateful for your time and effort setting these resources up!! Thanks!

    • @pedroaboffa
      @pedroaboffa 11 месяцев назад

      I can't say dif, nicely said.

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

      Yeah I find with coding, because of the logical nature of the work, logical forms of studying such as memorization and application are more useful to learn it.

  • @eriya9429
    @eriya9429 2 года назад

    Great video!

  • @MikeToth1
    @MikeToth1 Год назад +16

    Thank you very much for this awesome tutorial :)
    For people who had problems with the jittering of the cinemachine. The solution I found was setting the damping of the vcam to 0 (Its hidden under the "body" tab). That way not only the jittering was gone, also the follow up from the camera was better for my taste. The character is always in the middle of the screen.
    Thank you very much again.

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

      Thankyou so much I’ve been trying to fix this for over an hour and a half

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

      Holy yes. This needs to be a pinned comment lol
      Thank you.

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

      @@enlight_8360 You are very welcome. It made me crazy so I tried to help others with this solution :)

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

    Great tutorial.

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

    cool video its working Thanks XD

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

    Everything worked till attack slime part. 6/10 tutorial, i still learned quite alot and explanations were clear. If anyone plans on doing this course just know it will take atleast 2-3 hours

    • @JimmyYaoDev
      @JimmyYaoDev 11 месяцев назад

      I had this same issue, but fixed it when I realized that when subtracting the enemy's health, you have to use "enemy.Health -= damage", not "enemy.health -= damage". It's case-sensitive. If that was your issue, hope this comment helps!

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

    i used this tutorial and chatgpt to make a game im working on ty for this tutorial

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

    Bro is saving my butt during a game jam. when i watch number 2 my game will almost be done.

  • @sophiecharlotte3043
    @sophiecharlotte3043 10 месяцев назад +1

    This is my first time using unity. Already had troubles with the movement script. Decided that even though the editor said my code was fine, the issue had to be somewhere in there. Went on a tour through the internet, discovered the manual for the input system, read through several pages, copied and pasted code that was literally the exact same. I was going insane, ready to give of when I finally discovered my problem.
    The issue was… I wasn‘t actually running the game.
    I feel very stupid but I did solve my (non-existent) problem and I learned new things. 😂

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

    Small tip for everyone, after implementing the CinemachineVirtualCamera, if your animations/movement is still choppy/laggy/buggy:
    Above your view, where you change aspect ratio, click on it and enable VSync. This fixed it for me.

  • @12marcal12
    @12marcal12 Год назад

    Cheers man!

  • @olegsemen3
    @olegsemen3 Год назад +9

    If you have jitter effect you need to change in the Main Camera object -> the CinematicBrain updateMethod to FixedUpdate and disable Upscale Render Texture in the Pixel Perfect Camera.
    If you disable the Pixel Perfect Camera on the Main camera - it will has another jitter vhs (i guess it's good description) effect.

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

      oh wow that worked perfectly! Thanks 👍

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

    Awesome tutorial, really helped me get off the ground using unity. I will advise new developers such as myself to REMEMBER that you disabled the 'Reload Domain' (39:57) it was causing strange issues for me later on and took me a while to relocate that option and track it down as an issue.

  • @X_Daniel466
    @X_Daniel466 2 года назад

    Nice, Thanks.

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

    Thank you!

  • @clouds42069
    @clouds42069 2 месяца назад

    Great tutorial, just a note for those with debugging errors with Visual Studio, you first need to update Visual Studio Code in Unity Extensions (Unity -> Window -> Package Manager -> make sure you have Visual Studio Editor and Visual Studio Code Editor), and then In Unity -> edit -> preferences -> external tools, set External Script Editor to Visual Studio Code. Then hit the Regenerate Project Files button, now open a script file from inside Unity and see if it's debugging properly!

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

    Hi this is really good, do you have a part 2 for this? Really like ur tutorial

  • @redisotschek8643
    @redisotschek8643 10 месяцев назад

    Thanks man

  • @Emanuel-oz1kw
    @Emanuel-oz1kw Год назад

    Thank you Chris, Thanks

  • @andrewmundy
    @andrewmundy Год назад +29

    For those who were got up to the movement script and werent able to move their character in game mode, make sure to assign the "Actions" in "Player Input" to the script you just wrote "PlayerInputActions (Input Action Asset)"

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

      put it where?

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

      @@shaunfuqua You need to create object of PlayerInputActions and then assign your methods to the Actions/Events....
      playerInputActions = new PlayerInputActions();
      // Enable action maps from the PlayerInputAction
      // eg. Player, UI etc.. Depends on your PlayerInputAsset
      playerInputActions.Player.Enable();
      playerInputActions.Player.Move.performed += MoveMethod;

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

      I already Assigned the Actions and its still not working

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

      @@mayankbhaisora2699 No idea what that means and how to do it.

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

      nvm chatGPT helped me lmao.

  • @xxMpEGxx
    @xxMpEGxx Год назад +1

    maybe another explanation to fixed delta time:
    some processors are faster than others
    so to reach the same distance in the same time on a faster and a slower computer (otherwise players with a faster processor would have an advantage in games) we need to slow down the speed of the character on a faster computer and speed it up on the slower computer, which is achieved by multiplying the movementSpeed with a factor that describes the time difference between 2 frames of the game = fixedDeltaTime (the greek letter delta is used for differences in math, not sure what "fixed" stands for)
    example:
    take movementSpeed = 1
    the slow computer takes 1.5 seconds between frame1 and frame2 (very exaggerated example, I know)
    therefore we get: 1 * 1.5 = 1.5
    now take the fast computer
    it takes just 0.2 seconds between frame1 and frame2
    therefore we get: 1 * 0.2 = 0.2
    so we have sped up the character on the slower computer and slowed it down on the faster computer
    but they will both reach the same distance in the same time interval

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

    *Hat-tip* Much Obliged, ser..

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

    Thank you very much

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

    Thanks!

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

    Thanks for this great tutorial!
    The tileset got updated and there are a lot more character sprites now. I was confused at first but figured it out and want to list them here for others:
    First 6 are idling looking down
    Next 6 are idling looking right (or left with flip)
    Next 6 are idling looking up
    Next 6 are walking down
    Next 6 are walking right (or left with flip)
    Next 6 are walking up
    Next 4 are attacking down
    Next 4 are attacking right (or left with flip)
    Next 4 are attacking up
    Last 3 are the death animation
    This makes it also "a bit" more complex if you want to incorporate every movement correctly, but i guess it's also a nice challenge to prove what you've learned here 😊
    Have fun!

    • @65rega436
      @65rega436 Год назад

      my character wont move for some reason i need help

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

      would be nice if you shared how you figured it out, instead of just saying you figured it out.

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

      @@talonman1825
      Trial and error. I took the first batch, put them into animation and looked which one it was. Rinse and repeat with the others.
      Sorry, i thought it was obvious.

  • @AssamiMuzaki
    @AssamiMuzaki 2 года назад +1

    this is gold

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

    tNice tutorials tutorial was very satisfying

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

    Best video🔥🔥🔥🔥🔥

  • @snowman7487
    @snowman7487 7 месяцев назад +1

    This is honestly the best Unity 2D intro on the internet - it covers a lot in a short time, is completely understandable - you see every click - and was a basis on which I could expand and develop additional features (e.g. different 4 directional sprite animations) just based on what I learned here and figuring out the rest. I've tried long paid for classes on training websites and found them hard to follow or their verson of unity wasn't relevant to the most recent updates. I'm hugely grateful to @Chris'Tutorials for making it. Moved me forward so much!

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

    Hey Mike, thanks for the video. I am considering purchasing soft softs for the first ti. Do you have the personal version or the

  • @Jackwebb97
    @Jackwebb97 Год назад +6

    Great tutorial! I found it very easy to follow along, however I found that when following the coding for the player controller when it compiled I don't have the movement filter and the debugger for unity is no longer being maintain, so I cannot use that to fix it.

  • @gamingprochampion5822
    @gamingprochampion5822 Год назад +18

    1:04:08 For those of you who have a frozen character after attacking, simply put ‘canMove = false’ into the ‘Onfire void’ and in the ‘OnMove void’ put in ‘canMove = true’ so you can have Unlock Movement and CanMove in walk, while only having CanMove = false in Onfire.
    Next, add UnlockMovement to idle animation, and you are now done. Character should be fixed. Hope this helps.
    Also, make sure to comment if it doesn’t work and i will try to help fix it

    • @helicopterkat1697
      @helicopterkat1697 11 месяцев назад

      I Cant get my character to even attack i have everything set but my debug says I'm calling Onfire' but it's never declared

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

      Great man, Thank you! save my times :D

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

      Maybe typo dude, cuz it should be onFire?@@helicopterkat1697

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

      BROOO EVEN ITS ALREADY 8 MONTHS AGO, BUT U HELPED ME A LOTTTT TYSMM

    • @FTZPLTC
      @FTZPLTC 2 дня назад

      Thanks, this seems to have worked - looks like it's a good idea to put "UnlockMovement" on the Walk animation too. You absolute gem! =D