📰 This year I've started a Game Design Newsletter: dawnosaur.substack.com/ Hey! Thanks for watching any future corrections to my platformer controller will be posted here. 🎮Demo: dawnosaur.itch.io/platformer-... 📜Code: github.com/Dawnosaur/platform... (platformer controller & Unity demo) 💬 Discord: discord.gg/KkcC9hVwKf 🦚 Twitter: twitter.com/DawnosaurDev
@flyingdutchman2692 Жыл бұрын
Would be great if code link was accessible.
@DawnosaurDev Жыл бұрын
@@flyingdutchman2692 There's a link in the description :D
@flyingdutchman2692 Жыл бұрын
@@DawnosaurDev Well, I know there is a link, but it's not working. 404
@hozuki2495 Жыл бұрын
Truly incredible and helpful video. Love your videos and this is one of my fav one. Though this is helpful enough even for beginners like me, it would be great if you include example input values just like in your "Improve Your Platformer with Forces | Examples in Unity" video. Again truly appreciate your efforts for all these great video.
@Catuta Жыл бұрын
@flyingdutchman2692, still not solved😢
@Rotaka Жыл бұрын
It’s incredible the amount of techniques used to make a platformer fun to control, awesome video ! Adding the code examples was a great idea as well!
@sathyanarayananviswanathan3770 Жыл бұрын
FINALLY, a masterpiece after decades. Keep going!!!! I love these
@DawnosaurDev Жыл бұрын
Thanks!
@madlad255 Жыл бұрын
I've been eagerly awaiting the release of this video for so long now, and it turned out amazing IMO! I dunno if you remember, but on your last video, I commented on how the editing was a little too much and became a bit disorienting. With this video, you've definitely found a balance. I also like how you summarize everything near the end; normally I'm not a fan of repetition, but with a topic as complex as this, it can be good to get a high-level summary afterward.
@DawnosaurDev Жыл бұрын
Thanks so much! Really tried to focus on balancing the pace of this video, awesome to here it worked great for you!
@joemorris423 Жыл бұрын
This video series was super helpful in making my group project for school feel a 1000 times better! The logic for accel and deccel is genius, and making the gravity scale higher only when falling made a huge impact. Thanks!
@curlus Жыл бұрын
Quick and easy to grasp the ideas without getting bogged down with code. Great vid!
@lizardltd Жыл бұрын
The hades ost in the background is so fun lol You made this video very well, it's clear and fun to watch!
@minoupitou1503 Жыл бұрын
i've watch the first video of the series, and it greatly helped me understand how physics in unity works (and that i don't need kinematics physics to achieve a great player movement) I wanted to point out that your analysis are great, you know what you are talking about. I want to give you kudos for the wall jump approach. every time i want to make a walljump in a game i fall in a great depression cause it is so frustrating to get it right... i always choose to disable horizontal movement when doing a wall jump, never thought of just tweaking the player horizontal input speed. thanks for sharing all of these. every tips you give gets me more motivation to actually finish my celeste rip off! it sounds stupid, but great and smooth controls comes with lots of easy and small tweaks, and you pointed out a lot of them in your series. Thanks again Dawnosaur! i should have sub way earlier. wish you success in all your project!
@DawnosaurDev Жыл бұрын
Thats awesome, happy these helped you out!
@vinhnguyen-o5z Жыл бұрын
I really appreciate the change in pacing since the last video was a little bit fast for me to grasp
@DawnosaurDev Жыл бұрын
That's great to hear, really tried to focus on that this time
@early2000skid Жыл бұрын
Well edited and paced, and informative. Good stuff Dawnosaur :)
@DawnosaurDev Жыл бұрын
Thanks a lot!
@hyper190 Жыл бұрын
really underrated content, glad i found this rare gem :)
@brucelee7782 Жыл бұрын
Man great video but I feel like half frustrated? Sometimes things are said with code snippets and sometimes without. Like give me all or nothing man
@miserablepile Жыл бұрын
This is crazy good. Very meticulously analyzed and applied, with expertly clear explanation!
@turbo8628 Жыл бұрын
You do a great job at explaining things. If you could show some specifics of unity (such as showing the difference both visually and from the different cose value attached to it) think that will add more depth and understanding for the viewer. Subbed. Keep up the good work 👍
@alicegiraud8543 Жыл бұрын
Wow this is an incredibly impressive and useful work! Just when I was about to abandon making a decent wall jump for my first game. Thanks a lot! Subbed and eager to watch all of your other videos, you really made my day! :)
@DawnosaurDev Жыл бұрын
Thank so much, happy to hear this helped you out!
@XionBrown Жыл бұрын
This video was exactly what I was looking for, thank you!!
@JasonWelch Жыл бұрын
Thanks! I didn't know about the cayote time thing. Got that taken care of in a few minutes.
@dobydaoud3346 Жыл бұрын
Thanks dawnosaur for your tip soon I'II work at my dream game with nintendo :D
@DawnosaurDev Жыл бұрын
Let's go!
@theothetorch8016 Жыл бұрын
This video is so HELPFUL! FINALLY!
@DawnosaurDev Жыл бұрын
Thanks!!!
@Kalilak11 Жыл бұрын
I appreciate your code comments so much thank you! They are so helpful! Awesome job on the code and the video!
@TurtleGamesStudios3 ай бұрын
I know who I'm reading notifications from now. *subscribes*
@sunionbro880629 күн бұрын
I always love hearing people say nice things about Hollow Knight. Definitely my favorite game of all time.
@brutexx2 Жыл бұрын
Thank you for these videos. You are awesome, man.
@denn501 Жыл бұрын
Yo this video is great!! There's so many good info
@Ringocos Жыл бұрын
He's back!
@jarusca3933 Жыл бұрын
Man! Incredible research!
@loupandsnoop Жыл бұрын
Nice video. I tried your code. Most of it works great, but I found a pretty major bug. 1) If ground hitbox doesn't cover whole player, you can be stuck jumpless on edges. 2) If ground hitbox is wider to cover floor, then you can clip into walls => normal jump on walls. My solution was to make the ground hitbox wide, and make sure you are grounded for at least 3 physics frames in a row before attempting any normal jump. This way the physics engine has time to eject you from a wall. Deets: I make a private int continuousGroundedFrames. In FixedUpdate, if grounded, continuousGroundedFrames++. In Update, only give coyote time if you've been grounded for 3 physics frames continuously. When jumping, set continuousGroundedFrames to 0. To walljump condition, add "and not grounded" to prevent jumpbuffer from giving walljumps on floor. I know it's been a while, but I hope this helps. Cheers.
@radiomuranatsu721 Жыл бұрын
Thanks for sharing! Amazing!
@nanditavenkat8368 Жыл бұрын
well explained, and extremly useful.
@DawnosaurDev Жыл бұрын
Thanks a ton happy it helped!
@BABAPLAYTOOMUCH Жыл бұрын
Incredible video 🙏🙏🙏
@sadsadsad5000 Жыл бұрын
great tutorial!
@itaymadeit6069 Жыл бұрын
Great Video!
@Paruthi.618 Жыл бұрын
awesome video, thanks
@Guts___ Жыл бұрын
I used ur example code and it works really good and i feel like i learned a lot about movement from your videos, i really appreciate the free education you are providing, Thank you very much. But i have one question, is there a possibility to get some example values for the jump ? Like you did in one of your other videos, for the "Run" where you showed what values you used to come close to a ceartain move style of a game.
@DawnosaurDev Жыл бұрын
Thanks a lot! If you dowload the unity demo from Git Hub you can have a look at the jump values I thought fit a Celeste, Hollow Knight and Super Meat Boy style character. You can find all the values under the "scriptable objects" file
@Guts___ Жыл бұрын
@@DawnosaurDev oh this is super nice, im gonna check it out immediately, Thank you :D
@markorossie929610 ай бұрын
Thank you!
@lloydkuijs Жыл бұрын
Great video
@thefunnybuddy4138 Жыл бұрын
One thing I've noticed is when you have a double jump and jump buffer, you could end up using a double jump instead of a jump buffer. Once you're airborne you'll try to double jump but can't since you technically already used it.
@loicpernot8779 Жыл бұрын
I'm sure you figured out how to fix that already, but just in case someone else sees this: you can simply set your jump buffer timer to be over as soon as you perform the first jump. Similarly, you can prevent an accidental double jump by adding a buffer check gameobject below the one that checks if you're grounded. This way, jump buffers are only allowed if you're close to safe ground.
@Shinos_99 Жыл бұрын
Your videos helped me so much, this is a smack to the face to all the people saying that you cannot build a nice platformer controller with built-in physics, this is excellent. PS: did you manage to get slopes working right too?
@DawnosaurDev Жыл бұрын
Haven't tried slopes yet, but I believe other have had some success! From what I've seen it's kind of difficult to get the acceleration to feel natural on a slope but definitely doable :D
@Shinos_99 Жыл бұрын
@@DawnosaurDev would be really cool if you'd ever look that out too a lil in some video, keep your good work!
@TripFAU9 ай бұрын
Great video, it's helped me a lot in my coding! I was wondering if there would be a way to alter the script so that the player character's direction changes based on rotation so that the x axis always faces the way the player is looking - rather than by flipping the x-axis as the code is currently written
@daniinkidar99 Жыл бұрын
More videos like this and the channel will boom I promise.
@DawnosaurDev Жыл бұрын
Thanks!
@trashcaster Жыл бұрын
What's the game at 5:11? It looks really cool Edit: Screenshotted and used Google search by image, the game is Ori and the Will of the Wisps
@KebxaiAod Жыл бұрын
Hello, i don't know how to implement player animations in this script. Can you say where i put the animator variables, how to check if player is moving and etc?
@blackdevilb4 ай бұрын
Great fucking video, thank you
@moelow5385 Жыл бұрын
incredible video, I find myself coming back to it many times! just wanted to ask how does the player data script work? is it a separate script referenced in the player controller with all the variables set to public?
@DawnosaurDev Жыл бұрын
So the Player Data is this thing called a Scriptable Object. It works pretty much as you've described. They way you use it, is by creating a new asset inside your project (there you be an option at the top for Player Data) then you can use this to set all of your movement parameters. I'd recommend Brackey's video on the topic. Let me know if you need any more help, thanks!
@trip7141 Жыл бұрын
Just something I've been thinking about, is it common to see games use an equivalent of coyote time and jump buffering for wall jumps? I'm thinking of something like a situation where you bounce off of two closely spaced walls to scale a narrow passage. Coyote time seems like it would give the player a short grace period if they fall off the wall to make the jump to the opposite wall. Buffering doesn't seem like it would be as useful because I can't recall any games where you'd get penalized for hitting the jump button too early in that situation, but it still might come up.
@DawnosaurDev Жыл бұрын
Yeah, I'd say so. It's probably not used as much as normal coyote time but I'd it's pretty common as well :D
@trip7141 Жыл бұрын
@@DawnosaurDev Thanks for the response! It took a little fiddling off and on over the span of a few days but I got both working well for wall jumps too and it helps the feel massively!
@timel11xgdsideswap6 ай бұрын
Great tutorial and it also helped me a lot to think how i actually want my game to be. Although I have 1 problem: I have copied and changed some code to make it fit my game and everythings seems to work perfectly fine but when i open the game to test and press teh jump button it doesn't actually jump. It just resets the jump timer. Anyone knows how to fix this please?
@PaonSol Жыл бұрын
Thank you for this! Excellent stuff. I'm curious how hard this would be to convert into 3D platforming? There is so very little stuff about Unity 3D platforming on KZfaq... Edit: Well, I tested it, and I can jump infinitely, so it's kinda broken.
@DawnosaurDev Жыл бұрын
It's definitely doable. I believe I tried it out and got some really cool results, however there's a lot more vector math involved that you'll need to use combined with what's in this video. I think Dani's movement tutorial might use some similar techniques for movement as I do, so that may be a great starting point. Good luck!
@nonamee694203 ай бұрын
awesome video, many thanks! what is the game at 3:24 by the way?
@kardokdelikaya9570 Жыл бұрын
Do you plan to make a video about moving platforms?
@DawnosaurDev Жыл бұрын
Not planning to make any more videos on platformers for a while sadly : ( I've struggled with moving platforms myself. I believe the method I've used in the past was to use OnCollisionEnter and Exit to check when the player touches a moving platform and then try and then try and orient their position around the platform. Might be tricky to get working with acceleration though good luck!
@kardokdelikaya9570 Жыл бұрын
@@DawnosaurDev I actually think I did a good job on changing some parts of your code. I added wall climb and hang too. Thanks a lot for this code.
@DawnosaurDev Жыл бұрын
@@kardokdelikaya9570 Neat, that sounds awesome
@user-en8ep5gq1b12 күн бұрын
its just me or when i try to implement coyote if i press faster enough the jump button i can make a doble jump/longer jump is there any way to fix it ? i tried jump buffer time not results
@truanthh Жыл бұрын
hey, what is vs code theme u are using? at 3:08 that's insanely good looking🙂
@DawnosaurDev Жыл бұрын
Why thank you
@Derkells10 ай бұрын
How do I create the Player Data Object? I don't have the option to create that. Is it something I have to create myself? If so, how do I do that?
@Sllendar Жыл бұрын
Hmm, at 0:30 You're talking about increasing gravity scale at peak of the jump, but at 2:05 You're talking about lowering the gravity at the peak of the jump. So this techniques should be used separately or there is a way to combine them?
@wafflydig2457 Жыл бұрын
Hi Dawn thank you so much for the code and tutorial very informative! Is there any chance you could show/tell where in the code to switch animation parameters set up in the animator? I think a simple idle, run, jump and fall would do a lot of people wonders. In my case I have an idle and jump parameter setup correctly but am having problems getting a "running" boolean to turn to true while on ground. (Strangely it seems to work after a jump though). Regardless thank you so much for the hard work you clearly put into this
@DawnosaurDev Жыл бұрын
Hiya! So I would say the best place for your animation parameters would be I the update loop where the movement functions are called. For example I would put an animation Trigger call for jumping/wall jumping where we call those functions. For the running or and idle animation I would (like you said) have those as books. Here I would probably do a few extra checks. First where were calling the run function I would add in an if statement checking the move input. Based on this you could then set the animation to a run or idle. I'm thinking you might also want some more checks to see if we want to play say a jump or falling animation instead for example. Or alternatively add in a stop animation. I hope this can give you some pointers and starting ideas. Overall however it largely depends on your animations. Lastly if this is a larger project I'd also recommend controlling the players animations through another class. Similar to what I did in the GitHub project. Hope this helps thanks!
@wafflydig2457 Жыл бұрын
@@DawnosaurDev Hi Dawn, thank you so much for the reply I really appreciate you taking the time to help me out and I'm happy to say I've got it all working now! Very excited, having working animations really brings the whole thing to life and now I have proper Idle, running and jumping animations that all look and feel nice! I did handle the transition to run a little differently by using a float that picks up on the movement detected on the horizontal axis and using Mathf.Abs to convert the negative value to a positive one. Then I used the Animator to switch running to true when I am grounded (not jumping) and that new float value was > 0.1 and transition back to idle when grounded and the running float value < 0.1.
@DawnosaurDev Жыл бұрын
@@wafflydig2457 That's awesome, no worries!
@danbam9018 Жыл бұрын
Hello Can you tell me how did you do the jump animation? Im struggling with the code.
@wafflydig2457 Жыл бұрын
@@danbam9018 Hi Dan. There is a little more to it than coding, you also need to do some work in Unity. I'm not sure exactly where you are in the process but generally speaking I have the animator set up using two conditions. First a condition I called "grounded" which is a boolean I set to true or false depending on whether Dawn's collision detector was touching the ground or if I know we are not supposed to be on the ground. If we are supposed to be on ground this is set to true. If not it is set to false. The other parameter I'm using is called "horizontal" and this is a float that is set to Mathf.Abs (Input.GetAxisRaw("Horizontal") If a player lands from a jump (setting onGround to true) and horizontal is >0.1 I'll have the player transition from jump to run. Other wise they transition to idle. I use a separate script called AnimationController for handling changing all of these conditions depending on player input. I'm also using Unity's Input System. The AnimationController script is defined in the variable section and called in the awake section of the movement script. There are a series of if statements in the AnimationController script that trigger these conditions. When I want to update a variable in that script I'll write (in the movement script): "AnimationHandler.onGround = true; " which will go to my AnimationController script and set the onGround variable in that script to true. In the AnimationController script I have an if statement that says when onGround is true set the "grounded" condition to true. else set it to false. It was very daunting to me learning this so I can relate to the struggle but keep at it! I highly recommend looking up all the tutorials you can get your hands on, even if they do not directly do exactly what you want to do you may still learn some handy code. Tarodev and Brackeys are very good off the top of my head. I've also asked ChatGPT a number of questions and was pleasantly surprised how helpful it's been. GMTK isn't exactly for writing code but Mark has some excellent videos about his experience and the early videos are more about him getting work flow down and are particularly interesting. The best advice I have is to break down your problems as small as possible and look up how to do one of them at a time. Debug.Log(stuff to check); is your friend. It's not easy, it's not always fun but you've gotta have some faith and put in the work and do it consistently. You got this and I hope this got you a little bit closer to your goal!
@godzil711 ай бұрын
HAWLLOW KNIFT?
@felipezymor99706 ай бұрын
I noticed that when we press jump two times fast, the character jumps so much higher than the double jump expected height. Has anyone fixed that?
@karthikeyanpandiyan73334 ай бұрын
Change the Jump Buffer Timer
@ShaktiUtada8 ай бұрын
im not understanding what is happening. I cant move, jump or do anything
@zorroinfernal4087 Жыл бұрын
you have video of dash in games?
@TheSleepKing8 ай бұрын
I am really not understanding the ground and wall checks. My character still won't jump. Is there something I'm doing wrong? (Based on debug, the input for jump works, but the ground and wall checks are not detecting anything.) Also, my character feels slippery despite the change of values.
@loop3454 Жыл бұрын
can you do soundtrack next?
@JakeTheJay Жыл бұрын
My jump doesn't work for some reason. The key detection works but the jump function doesn't seem to be called when I press the button. I triple checked to make sure my code was exactly the same and I am just confused as to how this is happening.
@JakeTheJay Жыл бұрын
Ok I found out what my issue was. Layers and tags were being dumb.
@GebakkeSushi Жыл бұрын
Can someone help me? I downloaded the scripts and imported it to my scene and i copied the celeste example to see how it feels and to change it from that, but my character doesn't move or fall or anything. How can i fix it? Update: My player now moves but it falls over everytime and i cant jump before falling over
@darwisybaqir5877 Жыл бұрын
question, i might've missed this when watching the video, but what is the code format for the script you shown in the video? python or C#???
@DawnosaurDev Жыл бұрын
everything is in c# :D
@darwisybaqir5877 Жыл бұрын
@@DawnosaurDev noted. thank you
@brucelee7782 Жыл бұрын
Anyone managed to implement this script into their own game? My player's x and y velocity keeps changing for some reason even though im not moving
@jusminyip89156 ай бұрын
1:58
@Khang-lt4gk Жыл бұрын
xin code
@dmas7749 Жыл бұрын
uses old input manager, trash /s tried the demo but i found you could jump in the Super Meat Boy by pressing jump before landing, however, if i released the button before landing as well, i would get a full jump, and a rewrite using the new input system would be better
@emeraldcubegaming8018 Жыл бұрын
All of your videos are amazing, and I appreciate your work as well as the fact that it's free. However, I wanted to ask something. When adding your double jump code to your given Player Movement script, I got four compiler errors all relating to the same thing; the variables weren't given any definition / they don't exist. I assume there's is an easy fix but since I'm pretty new to game making, I don't know what to do. Can you help me on this one? Much appreciated @DawnosaurDev