 This video was brought to you by my patrons. Thank you so much for your support Platformer is a game genre that focus on testing the player's ability to move on uneven terrains and floating platforms It's a common type of game to start with game development. It's simple to implement Yet you can explore the mechanisms to build complex designs. A platformer game is so simple that I didn't pick in some of the basic mechanisms into five steps In a 2d platformer is essential that the player can move in both axes But they only have true control over the horizontal long To achieve that we can use the move and slide with snap Then we add some gravity and whenever the player presses the left and right action We change the horizontal movement direction. To perform a jump we can apply an input force upwards Not forgetting to disable the snap vector. If you want to get more details on player character movement I will put it in the description to a written story that I made about moving on slopes and jumping with snap Every game needs a goal. In platformer's ultimate goal is to parkour through the whole level and progress to its end But we need to give players some incentives in order to hook them into this goal. A Simple yet effective way to achieve that is to add what we call breadcrumbs a trail of positive incentives that can lure the players to a given path For instance coins can be good breadcrumbs So let's use them to get the players through the level in order to allow the players to grab the coins The players character has a pickup area a simple error 2d that the coin can detect Then the coins have another error 2d that messes the players pick up errors layer Whenever they detect the players pick up area they vanish and emit a signal not find that they were picked To make this an actual goal We need an object that tracks the progress and not files it for that I created this object that subscribes to the coins picket signal and iterates a variable When the current variable matches the goal amount it emits a signal not find that the goal is completed Of course, this wouldn't be a platform game without platforms, right? So for static platforms that designs quite simple They are basically static bodies with a collision shape and some graphics for instance. I'm using a polygon 2d in my case But we can add some moving platforms as well I'm going to use a method that I call path follow platforms They're basically kinematic bodies sync to a path follow which has its unit offset animated using an animation player Then to be able to design the movement. I use a path 2d With this approach I can make all sorts of movement patterns I will add a link the descriptions for a tutorial that I made about the path follow platforms If you want to add some to your game as well Well, the next step is to subscribe to this channel and hit the like button Just kidding, but take the chance to do so it will help this channel to grow and reach more people We have positive incentives for our players to complete our goal of moving through the level But a games also made out of punishments Now since we are going to test the players mastery with the games physics We need to punish them when they miscalculated jump for instance for that we can add what we call dangers Dangers are objects that hurt or kill the players But they don't have any intentional behavior like an artificial intelligence that changes the player for instance a good example of dangers are spikes in lava They are part of the level environment and the player just have to avoid them To achieve that punishing behavior We can create a killing error 2d an error 2d that will use another physics layer different from the one that we are using For the goals for instance for the coins and when the player that acts this layer when the place that this killing area it will die We can then add this killing error to deal with a collision shape polygon for instance to design the spikes and the lava Whenever the player dies the level will restart Not enough this would make sense if the players couldn't progress towards more challenging levels So we need a way to keep challenging players for that we can add some level progress mechanisms For instance when the players have accomplished the levels go a portal to a next level can open and once the players enter into the portal They will be teleported to the next level We can export a string variable to allow us to select the next level sync path Then we can use the get three dot change sync method to teleport the players to the next level From here there is nothing too specific to platformers You can add some interface elements a pause menu if you want some screens as well Like a main menu and an end screen and start to polish the game with animations visual effects on the facts message Guys as you know all my content is sponsored by my beloved patrons I'm thinking about making a complete series here on YouTube about how to make a platformer game once I hit $200 monthly support on patron the series will cover way more than just the basics topics like interface Saving and loading players progress screen flow local multiplayer support and more We're currently at a hundred forty four dollars at the moment. So what about helping with five dollars so you can achieve this goal real quick Well, that's it. Thank you so much for watching keep developing and onto the next time