Secrets to a Great Platformer Character with Unity

  Рет қаралды 52,428

Dawnosaur

Dawnosaur

Күн бұрын

Platformers are defined by their movement. Whether it be the momentum-based thrills of Super Meat Boy or the elegant combat of Hollow Knight. As a result, I want to share my approach to Platformer Movement (with the help of Unity 2D) and how you can apply it to improve your own games.
👩‍💻Code: github.com/Dawnosaur/platform...
🎮Demo: dawnosaur.itch.io/platformer-...
💬Discord: / discord
🦚Twitter: / dawnosaurdev
📚Here's some further reading that I've found super interesting:
◽ Article on Jump Design: www.davetech.co.uk/gamedevplat...
◽ GMTK Platformer Research: / 28582857
◽ Article on Sonic's Movement info.sonicretro.org/SPG:Charac...
⏰Time Stamps:
0:00 Why great movement is crucial for a Platformer?
0:13 What are the core parts of your character's movement?
0:22 How do most people approach movement?
0:43 My approach to platformer movement
1:04 What can we do with this approach?
1:25 Platformer Design of Hollow Knight
1:52 Building on this approach to movement with Celeste
2:20 More ideas to enhance your game's feel
2:29 Platformer Design of Super Meat Boy
2:51 What else will we need to do to create a Great Platformer Character?

Пікірлер: 98
@robertsonnortey4140
@robertsonnortey4140 Жыл бұрын
While other youtubers are asking for a fee for their 2D character controllers, you actually made yours accessible for everyone to try out and i must say i really respect that a lot and appreciate the time and effort to help developers out there in need of stuff like these. To even make things better, your code is very clean and readable and commented.. thanks so much.. you just earned yourself a subscriber and a stan. Keep up the good work!!
@DawnosaurDev
@DawnosaurDev Жыл бұрын
wow thanks so much, that means a lot!
@Chemtekmain
@Chemtekmain Жыл бұрын
people like you are the reason i smile at 2am after being stuck on a problem in my games. seriously, i cant thank you enough for how much information you provide and how elegantly you explain things in such a short amount of time.
@eternalhunter5036
@eternalhunter5036 Жыл бұрын
Honestly I think this is one of my favorite channels, you keep things simple in a way anyone can understand, the editing is great, and the topics are always interesting. Keep up the amazing videos!
@DawnosaurDev
@DawnosaurDev Жыл бұрын
thanks so much!
@itaymadeit6069
@itaymadeit6069 Жыл бұрын
The only problem with this tutorial is that the series has only one episode. Amazing job!
@JujuProdGames
@JujuProdGames Жыл бұрын
Amazing vid as always! Can't wait for part 2! ❤️
@rileylearns
@rileylearns Жыл бұрын
Your videos formed almost all my knowledge on platformer mechanics. Thank you!
@brunoaltoe100
@brunoaltoe100 10 ай бұрын
Just wanted to say thank you, this is an amazing video. I felt like I wouldn't find anyone getting more specific on how to do good platformer movement, and ended up not only with someone doing so, but also showing _how_ in a great video format. There's even a demo! Props to you, this took effort and it shows.
@amberlewis012
@amberlewis012 Жыл бұрын
Another platfomer video, this is gonna be amazing! Also, followed your previous tutorial on forces and movement stuff, the code needed a bit of tweaking and understanding, but once everything worked, it absolutely worked. Am excited to learn more in this video as well!
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Awesome, hope you loved it!
@griffinbrooks6748
@griffinbrooks6748 Жыл бұрын
this was an amazing video, i cannot wait for pt 2!
@crozma._.1028
@crozma._.1028 Жыл бұрын
Genuinely thank you for the extensive time and effort you put into these videos, not only doing extensive research but putting effort into making the video look good aswell. I really appreciate your work
@noyokay
@noyokay 3 ай бұрын
MUCH MUCH LOVE for making this public! ♥
@roshipatoshi
@roshipatoshi 5 ай бұрын
thank you so much! this was a very creative solution and it helped me a lot :)!!
@dekadevgg
@dekadevgg Жыл бұрын
Awesome video! Loved the editing and the information! Thanks.
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Glad you enjoyed it!
@cloudy772
@cloudy772 Жыл бұрын
Wow your editing has really improved, it’s great well done
@konstantinosangelakis2497
@konstantinosangelakis2497 Жыл бұрын
Great video, as a new game developer your movement analysis certainly helps a lot!
@JustWords101
@JustWords101 Жыл бұрын
Holy shit, this is exactly what I needed. I'm making a game all about movement and I'm really excited for part 2!
@AngryFryGames
@AngryFryGames Жыл бұрын
I learned something new today. Amazing video, keep it up Dawnosaur!❤✨
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Ayy! Thanks a lot!
@jesusloves96
@jesusloves96 Жыл бұрын
This channel is a God send 🙌 🙏 seriously i am working on a 2d metroidvania and I know I am going to struggle with the programming aspect so thank you!!!
@TacticalProgrammer
@TacticalProgrammer Жыл бұрын
Very Awesome video Dawnosaur! I'll be waiting for part 2 hehehe...
@michaelshollaj6428
@michaelshollaj6428 Жыл бұрын
love your videos, subscribed!!
@madlad255
@madlad255 Жыл бұрын
Wow, what a video! Not only is your analysis of the movement very intuitive and well-explained, but the editing complements what you're saying really well! There is one thing that kind of bugged me though, but this is probably just a me-thing: there are so many editing effects (e.g. zooming in, switching between video and audio tracks, adding graphs on screen ...) happening in quick succession that it sometimes felt like an overload of information to me and was hard to follow, even though the explanation itself was great.
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Thanks so much! I completely agree, I went a bit over the top in this video with the pacing :D So this will definitely be my primary focus for future videos. Great to hear the content still felt well-explained, thanks again!
@Musibro3000
@Musibro3000 5 ай бұрын
Broo you just saved my LIFE👍
@oliverpennington2308
@oliverpennington2308 Жыл бұрын
underated asf honestly this helped me sm
@Rotaka
@Rotaka Жыл бұрын
Super cool video !! I really like that you mentioned N++, it’s one of my favorite platformers :D (But hey! Maybe yours’ll be the next😄)
@HmmAdam
@HmmAdam Жыл бұрын
another great uploade
@Locox
@Locox Жыл бұрын
YAY!! NEW VIDEOOO
@falaghsepehr5504
@falaghsepehr5504 Жыл бұрын
really good video keep it up
@Ragthor
@Ragthor Жыл бұрын
I love this!
@attenurmi936
@attenurmi936 Жыл бұрын
OMG...take my subscription!!
@dobydaoud3346
@dobydaoud3346 Жыл бұрын
yes i need this
@zaidmermam2524
@zaidmermam2524 Жыл бұрын
dude.... the quality is insane, we are looking on the next GMTK channel right now! good luck
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Thank you!
@h33m23
@h33m23 Жыл бұрын
I was looking at part 1 yesterday, that's so weird how part 2 has been released just now.
@DawidLewandowski-ev7rd
@DawidLewandowski-ev7rd Жыл бұрын
why u have only 3,5 k of subscribers , that is amazing
@lepommejamez9672
@lepommejamez9672 Жыл бұрын
How would you implement having external forces?? For instance fields that add speed to your character, or bounce pads that take momentum into account?
@s8ck_smo
@s8ck_smo 6 ай бұрын
Great tutorial but is their a way to cap the speed so that it doesn't keep on increasing
@Aelux5216
@Aelux5216 Жыл бұрын
I implemented the momentum movement from your code and I have been struggling with taming the speed when hitting a wall and keep flying off into the distance from the momentum build up and you can cause this by pressing right against a wall and then jumping over at an angle as well like wheel spinning a car or something and enemies collision boxes are equally a problem. I have two tilemap colliders one for walls and one for ground and the edge of a tower needs to be ground on top and wall on the side but that doesn't seem that possible. Additionally if I made it both it means anytime landing on an edge it would reset the speed and lose momentum which means jumping between platforms isn't as fun anymore, additionally when wall jumping if I made it lower the speed then you always jump between walls with the same speed as well. I am open to any advice on this even if I need to redo my entire walls and ground setup.
@kristophsams5036
@kristophsams5036 Жыл бұрын
This control is beyond amazing and so adaptable. My only concern is if I wanted to add slopes into the game. I've tried a few approaches, but nothing seems to work. They just slide back down and walking up the slope is like pushing a massive boulder. Is there an easy way to get the player to move up them?
@user-cg7sn7qr2n
@user-cg7sn7qr2n 8 ай бұрын
Can I use this in my game? (proper commercial game) what license is this?
@yF-gb2kh
@yF-gb2kh 7 ай бұрын
Hello, I have a question about PlayerData. I would like to know how runAccelAmount is calculated. I would like to know your code design ideas, but I cannot understand this part. I would like to ask for advice。And thank you for your video. It's the best video I've ever seen and done so far
@kbg12ila
@kbg12ila Жыл бұрын
I've been starting my game with a more Celeste style movement but I think a hollow knight style movement may actually be better for the game I'm making.
@muneebdev
@muneebdev Жыл бұрын
Still waiting for the next episode!
@dandylion06
@dandylion06 Жыл бұрын
Your movement breakdown has really helped me get a great feeling movement. But there is one thing I have bee trying to solve for a while, with many failed attempts. That is slopes, it seems like when i get slope movemnent working i need to sacrifice someting else and I don't like that. I know how slope movement works, but with acceleration based movement that looks at speed diufference in can cause problems when forcing like jumping are applied. This isn't a problem when only doing x velocity, but for slopes there is also y velocity. Does anyone have a difinitive and clean way of inplement slopes? Thank you very much though, if slopes don't work out then I will leave it out of my game until a solution comes its way.
@eriana_
@eriana_ Жыл бұрын
I'm having some trouble using the script, everything works great, and I've gotten the movement how I want it, so first off thank you! It's amazing that you've made it free and easy to use! Although I'm having trouble with infinite jumps, I think it's the ground check not working properly, even though I followed the github page instructions, and I'm not sure what to do as I'm too nervous to mess with the commands directly. Any clues on what might be causing it, or ideas to try to fix it?
@duhanavc6773
@duhanavc6773 9 ай бұрын
did you solve the problem I am having some what same I think my problem is related to layers
@MxstereedYT
@MxstereedYT Жыл бұрын
also, What's the use of "jumpHangGravityMult" and "jumpHangTimeThreshold", and which valors should i give to them?
@oleksandrshvets
@oleksandrshvets Жыл бұрын
Hi! Can you update your 2d platformer character controller for Input System?
@domedin9894
@domedin9894 Жыл бұрын
what should the value of accelerate be ideally?
@mhcrafting42
@mhcrafting42 Жыл бұрын
I have a change animation function. Where in a movement script like this do I put the animation changes?
@awewalk-ld7fz
@awewalk-ld7fz Жыл бұрын
I had a doubt I am an bigner with coding, I wanted to use this to make my fps controller how can I do it Pls help
@pu55yEaterr
@pu55yEaterr Жыл бұрын
he finally posts after almost a year!1!!!!111
@DawnosaurDev
@DawnosaurDev Жыл бұрын
ayy!!
@abdoulraoufgambo
@abdoulraoufgambo Жыл бұрын
yeahhh !!!
@trashcaster
@trashcaster Жыл бұрын
Is anyone else having issues with wall jumping happening (despite not being against a wall) when spamming the jump key in the air? I can't figure out how to fix it
@ChronoJules
@ChronoJules Жыл бұрын
Youre a fucking legend for this is there a dono link? Youre far too kind for making it publicly available
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Thanks a lot! I do! www.paypal.com/donate/?hosted_button_id=DRE69AWE76ZTN
@MxstereedYT
@MxstereedYT Жыл бұрын
hey, i'm trying to add a Gliding ability into your code but every time i put this new line of code and start the game, the character start floating with close to no gravity.
@duhanavc6773
@duhanavc6773 9 ай бұрын
I ve set everything except Layers n Tags section I ve tried to create a layer named GroundL and then I ve changed my ground objects layer to GroundL and did the same to player movements inspecter layer value but even if I did this My player wont jump and if I change my players layer to GroundL my player can jump İnfinitely how can I adjust Layers and Tags Section Thanks for the help in advance
@duhanavc6773
@duhanavc6773 9 ай бұрын
I ve installed the demo and almost copied everything after that other than script because it has dash and animator thingies but other than that its almos %100 still my character wont jump from ground it only does wall jump from walls how can I fix it
@drowned_minds
@drowned_minds Жыл бұрын
2:26 maybe tutorial on that effect?
@juangomez3295
@juangomez3295 Жыл бұрын
Hi man, thanks for the amazing video, I'm trying to implement the player data but I don't know wich are the values for the fields in PlayerData and I can't extract them from the repository. Can you help me plz with the values for Hollow knight type plzzzz :D
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Thank you! Ok, so I've just uploaded images for each of the characters to the demo on itch. If you look on the right-hand side of the page below the main game window they should all be there :D dawnosaur.itch.io/platformer-movement-demo-2
@Gcarrington820
@Gcarrington820 Жыл бұрын
How is it when i try to implement the script, even in the Demo Project i can only look left and right and not experience any gravity, not be able to move or jump?
@SuperMinecraft567
@SuperMinecraft567 Жыл бұрын
Hey in your previous video you recommended a circle collider for tileset games, i have a problem tho, my character keeps sliding of the tiles corners because of the circle shape, is there any way i could fix that?
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Yeah, because of this I've started using a normal box collider and then making my tile maps a composite collider instead. This has worked great for me so far 👍
@SuperMinecraft567
@SuperMinecraft567 Жыл бұрын
Oh okay, thanks! Do you have any recommendations whether i should use polygons or Outline? And any other tips in the tilemap settings department?
@MotipTV
@MotipTV Жыл бұрын
Is there any easy way to make it work on mobile input?
@emilydavidson8844
@emilydavidson8844 2 ай бұрын
There’s an issue with this where my character is slower moving to the left and doesn’t get affected by decceleration, but the moving right works fine, any ideas?
@dagentleman486
@dagentleman486 Жыл бұрын
Hey I love your videos and I have learned so much from them, but I have this problem that am trying to fix for like 3 days and its driving me mad For some reason whenever I add a Physics Material 2d to the player and set the friction to 0 wall jumping doesn't work properly.. whenever I have vertical positive velocity it just doesn't jump, only at the apex of my jump or when i have negative y velocity it jumps, u have any idea what causes this or how to fix it? Again love the content, waiting for the next vid
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Sadly not, my best suggestion would have to be to try debugging each part. I'd say try first checking if the ground detection is messed afterwards next best idea would be an issue with applying the jump force. Sorry this isn't a super helpful answer and for taking ages to reply. Let me know if you're still having issues and ill try and help out :D
@arrowjam6737
@arrowjam6737 Жыл бұрын
Put a capsule collider
@4lfr3d98
@4lfr3d98 Жыл бұрын
Hi, I´m currently learning how to make videogames i tried to update ur script to a 2.5D enviroment but i had some problems with the code so i wanted to ask if u can help me to solve them (of course i´m giving you the credit for the code)
@fabrogaming9956
@fabrogaming9956 10 ай бұрын
Why isn't Time.deltaTime used in acceleration code?
@DawnosaurDev
@DawnosaurDev 9 ай бұрын
We don't need it since all our code (that is code that's running constantly such as the run) is working within the FixedUpdate method. This will always get called 50 times a second. So we don't need to worry about changing frame rates and so don't need to use time.deltaTime. If you're looking for a more detailed explanation, I'd highly recommend Jonas Tyroller's video on Delta time
@fabrogaming9956
@fabrogaming9956 9 ай бұрын
@@DawnosaurDev There is still a chance that Time.fixedDeltaTime gets longer. And a day after I commented I found that RB.AddForce() is already containing Time.fixedDeltaTime inside unless you use impulse force mode
@gauravmunankarmi9626
@gauravmunankarmi9626 Жыл бұрын
For some reason my character isn't jumping. I didn't want the slide and wall jump abilities so I neglected those codes. Apart from that I have pretty much the same code as yours but my Player won't jump. What could be wrong with my code??
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Hmm, so how like to approach this is going through everything that needs to happen for the player to jump such as 1) Ground Checks 2) Input Checks 3) Variables (sometimes people forget to set key variables eg: coyote time of the jump buffer if you're using my code) etc 4) Jump Force Then work through all of these and see which ones aren't working when they should. Generally when trying to fix a jump I always start by making sure my ground check is working right and working my way through the whole system. There's loads of tiny things that might be slightly wrong so I'm sure if you do this you'll get it fixed in no time.
@gauravmunankarmi9626
@gauravmunankarmi9626 Жыл бұрын
@@DawnosaurDev I will try that.Thx
@gauravmunankarmi9626
@gauravmunankarmi9626 Жыл бұрын
@@DawnosaurDev it seems the problem was that I set the value of jumpForce to 8 inside the code. I removed it and now everything works fine.
@samienr
@samienr Жыл бұрын
@@DawnosaurDev How do you suggest I write my ground checks?
@gabrieldesouza112
@gabrieldesouza112 Жыл бұрын
Is there any way to "apply forces" in a kinematic character? It doens't need to be really using the ApplyForce method, it could be with another algorithm. Please do not answer "You cna't apply forces in a kniematic character"...
@DawnosaurDev
@DawnosaurDev Жыл бұрын
I've experimented a little bit with AddForce() and I believe under the hood the function performs a calculation along the lines of this: RB.velocity = new Vector2(RB.velocity.x + (Time.fixedDeltaTime * speedDif * accelRate) / RB.mass, RB.velocity.y); (this is a version of my line of code) float movement = speedDif * accelRate; RB.AddForce(movement * Vector2.right, ForceMode2D.Force); So, you could definitely try this out on a kinematic character and see how it works out :D
@gabrieldesouza112
@gabrieldesouza112 Жыл бұрын
​@@DawnosaurDev Thanks! I'll try that and reply here about the result!
@DawnosaurDev
@DawnosaurDev Жыл бұрын
@@gabrieldesouza112 Awesome!
@meghnaadvijayakar178
@meghnaadvijayakar178 Жыл бұрын
I'm making a proper commercial video game, can I use your code in it?
@meghnaadvijayakar178
@meghnaadvijayakar178 Жыл бұрын
of course, I will give credit to you in the game
@DawnosaurDev
@DawnosaurDev Жыл бұрын
Yeah of course, let me know when you release anything I'd love to check it out
@spud7234
@spud7234 Жыл бұрын
pizza tower: hold my toppin
@warsin8641
@warsin8641 Жыл бұрын
I died
@LethalChicken77
@LethalChicken77 Жыл бұрын
Pro tip: do *not* use forces for a character controller.
@Stardusk.
@Stardusk. Жыл бұрын
You state that holow knight simplifies its player movement only it looks from our eye to be a limitation so to input easier coding for mechanic feed backs. Like insecurity, and incompetence exist in game design. On an empty shadow floor of the human psych. Celeste looks to own the elements both fluidity, and mechanical clunk [NOT worthy contrast insert concept] in the character movement. Dynamic-robot sure. Dynamic-panther for such a slim build? No. Ading a sugest element from your video. Responsivity when afecting movement at variable speeds, and the human sense of aceleration, and deceleration when moving on a grid scale frame. Meaning. Tai chi FOOL'S. Thanks art analytic break down; man. You help. Rare for people to help.
@brucelee7782
@brucelee7782 9 ай бұрын
man your videos are too fast!
Why Does Celeste Feel So Good to Play?
17:34
Game Maker's Toolkit
Рет қаралды 2,6 МЛН
Improve Your Platformer with Forces | Examples in Unity
7:01
Dawnosaur
Рет қаралды 162 М.
Мы играли всей семьей
00:27
Даша Боровик
Рет қаралды 4,6 МЛН
Balloon Pop Racing Is INTENSE!!!
01:00
A4
Рет қаралды 16 МЛН
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 916 М.
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 101 МЛН
How to make a good platforming character (Developing 6)
14:50
Game Maker's Toolkit
Рет қаралды 408 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,3 МЛН
Improve your Platformer’s Jump (and Wall Jump) | Unity
8:12
Beating Every C-Side in One Session, Deathless (Celeste)
11:18
Waligooli
Рет қаралды 4,8 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 670 М.
How I made an Excellent Platformer
8:25
GoldenEvolution
Рет қаралды 246 М.
How to deal with SLOPES! in Unity 2D using built in Physics
30:07
How NOT to make an indie game
22:01
Lychee Game Labs
Рет қаралды 1,9 МЛН
7 Game Dev Tricks to Improve Your Unity Game
4:49
Dawnosaur
Рет қаралды 5 М.
Why Stairs Suck in Games... and why they don't have to
11:24
Nick Maltbie
Рет қаралды 1,5 МЛН
Зря Он Сделал Это С Ней #shorts
0:39
ARNAUT 🔥
Рет қаралды 1,4 МЛН
глупый парень и маньяк!  @cooldadru
0:50
Holy Baam
Рет қаралды 2,6 МЛН
Sonic, Knuckles and Shadow in Frog Prince Rush
0:28
Intalord
Рет қаралды 14 МЛН