Monster shadow


Unity Player Controller - Based on Celeste

Creating the perfect player controller takes time, but once done, creates an amazing experience for your players. I originally set out to recreate the Celeste controller, but for a 3D world... That was not accomplished in this video. Not because of time, or patience, but because I created something which feels so magnificent to play it would just be a shame to not release it as it is so that other indie game devs can take it and run wild. Play the game: Script: 'Better Jumping' by Board and Bits: ❤️ Become a Tarobro on Patreon: ========= 🔔 SUBSCRIBE: 🗨️ DISCORD: ✅ MORE TUTORIALS: Chapters: 0:00 Intro 0:25 Recording references 0:34 Creating test scene 0:46 Creating the perfect jump 1:20 Dash 1:31 Wall climbing 2:06 Coyote time 3:07 Showcasing the controller 3:44 Postmortom 6:18 Future of the controller

For my second semester project we created a 2D platformer using Celeste as reference. I would have loved to see this video back then, especially the workflow. We used overlapcircles as well, though we had some problems with tile corners where it would conflict between onGround and onWall. To make it our own we skipped dash but instead introduced a grappling hook mechanic. So if I may suggest a future video, try out grappling hooks, they are super fun to play around with! Could be used for movement (swinging, hoisting) but also pulling objects to you Scorpion style, pull an stone down hitting some enemies below or pull oneself to the target. Endless possibilities!
Thanks for the video! I attempted to do a similar thing about 4 years ago and I would kill for this video at that time. There were a lot of simple platformer tutorials (as always) but not one of them covered all of the things I wanted to implement (double jump, dash, super meat boy-style wall jumps and some other things) and combining things from different tutorials was really hard thing to do. I was a complete beginner and it took me several months to get things working the way I wanted. It was a tremendous learning experience for me though.
Saeed Barari
You're awesome! By seein how much code u wrote in such short time, I really got inspired
K Ken
wow cool i think i'll use it in my little game. thx~
Have fun with it :)
marco araujo
OMG such a nice video <3 thank u
Satyam Vishwakarma
Jump Section Saved my Life :)...thenks
Now you owe me.
0:05 Where be ye semicolon? Joking aside, this is awesome to see, I'll definitely check it out! Thank you for making this.
This won't compile! I'll need to redo the video
for more pretty gameplay add jump buffering
Jump buffering... I was trying to find what that was called! Thank you! Yes, this controller would certainly benefit from jump buffering.
Arcanoid Streamsky
Hi. can you please share unity proj for this?
@Arcanoid Streamsky I've finished with this for now, but come into the discord and I can certainly help you accomplish it! Sounds fun
Arcanoid Streamsky
@Tarodev can you please make steep/slope/slide for this movement please ? :)
Hey, I can't share the whole project, but I've provided the source code in the description
Cauldron Revs
Hi! i love the change of gravity, it is anormal gameplay but it is good. an old C64 game Hercules. It has got a good idea, make platform invisible until the player touch it, the effect is good, you can add it on your gameplay QueryTriggerInteraction possible act it. Thanks for the code, have a good day.
Invisible platforms, just like invisible blocks in Mario. I like it :)
TGS Nicholas
Not an Unity dev but I like your project, I'll stay to see your future progress, keep up the amazing work!
Thanks mate!
Here from reddit, thanks for sharing your process when recreating Celeste's player controls. This is really interesting, I'm in my first year of game dev at uni and this is so helpful
Came from Reddit!
You found it! Welcome ❤️
Jonathan Vanasco
This is fantastic! would this same controller work for 2D platformer?
Jonathan Vanasco
@Tarodev Thank you! I have been trying to figure out a player controller script with dash, etc. for weeks. I cannot wait to try this out when I get home. I have learned SO much from all of your videos, keep up the amazing work.
That's exactly what it is right now. This is just working on the x and y axis. The script is mainly plug and play. Grab it, chuck it on an object with a collider and rigid body, hook up the script references and it should work
Kevin Chen
Another awesome video. Really love your channel
Kail Soares
cool 👍
Gary Spencer
And that my friends is my SON
This channel needs way more subs/views. Great content and easy to understand even for beginner coders like myself. Keep up the good work!
Thanks mate!
Diru Diaz Rusiñol
Keep it up!
Mandy Lee
I really love this video, I think it’s your best one yet! I’ll be really sad if you don’t turn this into a game! 😊
Antoni Rogala
Cool! Thank you!


[Music] i set out to recreate the incredible
celeste controller now i know what you're thinking this has
been done many times before but i plan on taking it one step further
by turning it into a 3d controller my first task was to recreate the
original controller as it is today working on a 2d plane so i began filming
some reference material some basic running light jump full jump
jump dash etc once done i drew the trajectory
of madeline performing a jump dash and recreated a scene which matches the
layout from the game or close enough this should provide
consistency for my tests i spent some time getting the jump
feeling similar at first i just added additional
downward force when the player was descending
but i found this still a little bit floaty at the top of the jump
i ended up checking if the y velocity was less than my jump velocity falloff
variable and then apply the additional gravity at
that point it yields a snappier less floaty jump
using this same artificial gravity line i also checked to see if the user has
stopped holding down the jump button and apply it early to give the player
control over the height of the jump i created a dash by adding velocity
according to the player input and disabling additional input for a
short time i also found disabling the player's gravity during the dash
yielded better results wall sliding and grabbing
was achieved by checking for a collider on either side of the player using
overlap sphere and then detecting if the player was
pushing in that direction i set these to global variables as
they're used in multiple places through the flow
if the player is pushing against a wall i simply slow their y velocity
once i was happy with the movement i recorded the same move set as the
trajectory line i drew earlier and then popped them into premiere to
compare frame by frame close enough a member of my discord
server suggested that i add coyote time which is basically a cute name for
allowing the player to jump even if they've slightly missed the
platform i did this by checking when the player stopped
being grounded and if the jump is triggered within the delayed coyote time
i still execute the jump it actually makes the game feel much better
at this point i had a controller which was starting to feel pretty similar to
celeste but still felt crap to play when i'm
just controlling a boring white capsule so i got stuck in to
making the game look sound and feel nice by adding a proper
player model particle effects post-processing camera
shakes and animation now at this stage i pretty much went
into full derp mode and tunnel vision for about three hours without recording
a damn thing but who wants to see that anyway so i'm
afraid you won't see the journey but i will show you the destination
ready by the way be sure to hit the like button if you're
enjoying this video alright here we go
[Music] shortly after the release of celeste the
developer showed the world his player controller script
and i remember staring at the ungodly line count and thinking
wow this screams for some organization this was nothing against the developer
after years of professional development i know all too well how things can
spiral out of control and before you know it the refactor you
always had in mind turns into a monumental task which is
not even worth attempting even so there was a bit of harsh
feedback regarding the giant file and its lack of modularity the developer
responded to the feedback defending their move
to us due to how much interaction there is between states
and the nuance in how players move this would turn into a giant messy web of
references between classes if we were to make a tactic scan then
yes a more modular system makes sense and although one large file is generally
considered bad design and the very definition of
unmaintainable the developer said one reason we like having one big file
with some huge methods is because we like to keep the code
sequential for maintainability if the player behavior was split across
several files needlessly or methods like update will split up
into many smaller methods needlessly this will often just make it harder to
pass the order of operations in a platformer like celeste the player
behaviour code needs to be very tightly ordered and tuned
and this style of code was a conscious choice to fit the project and team
i wasn't entirely sure i agreed with this and there are certainly design
patterns to help keep it organized and sequential across multiple files
so my secondary goal was to enforce some code organization but
it just didn't happen i began by using a more structured approach
each character's state like walk jump dash wall climb etc
were all in their own separate scripts but it simply made it a nightmare to
work on each ability relies on other ability
variables to operate correctly this is where the developer's first
point shows its merits a messy web of references i felt like at
this stage it was separation of concern for the
sake of separation of concern it certainly didn't make it easier to
work on or add maintainability as it was hard to keep track of the
sequential order of things in the end i have no idea how similar my
implementation was to the original but the end result feels pretty damn
great it's responsive and you always feel in control of the
character i also added a toggleable double jump
because i feel like it made it even more fun
it was a blast to work on and i'm sure with just a little bit of love the
controller could be turned into something truly special
i'm going to save turning this into a 3d controller for a later video
so if you're keen to see that be sure to subscribe and hit that notification bell
i've included this script in the description if you'd like to check it
out if you just want to play around with the
character i've also included a link to the built game files
if any of you decide to use this player controller in one of your projects
come into the discord server and show me what you've done it'd put a smile on
this game developer's face