Godot is a free, open source game engine that you will be using to make your game. It is very easy to learn as a beginner! First, go to godotengine.org and download it on your computer.
Click the Create New Project Button, and name your platformer. Then create a new folder that will have all your future Godot games. Use the Mobile renderer. Finally, click Create at the bottom.
Also, make sure you setup a Github repo for your project using the video below! You'll need it to submit your project.
In Scene section in the top left, you will see the options to create a root node, which is the starting point for your section. All the other components will be in the main Node. Godot can be used to make 2D games and 3D games. Choose Other Node and select Node.
Then save the scene, and call it main.tscn. You will see it show up in the FileSystem below the Scene area. Later in your project, you will use this area to find different scenes, scripts, and assets.
At the top bar, change to 2D view instead of 3D view. The purple-outlined rectangle near the center is the view of the game. Click ctrl-A or use the plus button to create a new node, CharacterBody2D.
Sprite2D is a node that displays textures (images). Create a Sprite2D node under Player. On the right bar, you will see the Texture and that it is empty. In the FileSystem, there is icon.svg of the Godot logo. Drag it to the texture box. Then you can resize it however you want.
Add a CollisionShape2D to the Player. Then select Rectangle for the shape in the Inspector on the right. Resize the blue box to cover the player. This will help with the physics when the player is jumping and walking around.
Tilemaps are used to easily make grid-based 2D maps. Add a TileMapLayer node under Player. Go to the Inspector and select New Tilset in the Tile Set option. Then on the bottom bar, navigate to TileSet. Import a image to the FileSystem, then drag it into TileSet. Select Yes to modifications.
Just like the player, each block of the map needs a collision box too. Open TileSet in the Inspector and under Physics Layers, Add Element. Then in the TileSet in the bottom area, change to Paint and select Physics Layer 0 as the Paint Property. Finally, select all of the squares.
In TileMap, use the pencil tool and select one cube. Then you can draw a map in the purple rectangle in the main view. You can also adjust the size in Transform and Scale.
To make it so the player can jump and walk around, you need to code a script for the player. Select the player, then click the scroll with a green plus above to create a script. Choose GDScript (the language Godot uses), check template and choose CharacterBody2D: Basic Movement, and then create the script.
Godot does come with a template for player movement, but there are many ways to make the movement and code better. First, you should understand the template code. Look at the photo below and read through why each of the lines of codes works!
In the template code, keys are with ui_accept, left, and right. These are not very adjustable, so using input map is a good idea. Go to Project in the top bar, Project Settings, Input Map,
Now, replace the ui controls in the code with the new input map. For example, replace ui_accept with jump. Then, replace the left and right with the new input map.
The current code works, but you can make lots of changes to make it better. For exmaple, on line 19 where the slowing down of the player is controlled, it is very sudden. You can change the last value (which says SPEED) with other numbers to make the player slide more.
Also, in Project, Project Settings, General, and 2D Gravity, you can adjust the gravity to be higher. Finally, you can adjust the SPEED and JUMP_VELOCITY to however you want. Remember, the lower jump velocity, the higher the jump. Press ctrl+b or use the play button in the top right to run your game and see the changes.
To make the camera follow the player, you need to add a camera. Add a Camera2D node under Player. You need to make sure it is centered around the player, so switch to 2D view in the top and drag the camera's center to the player. Finally, you can add a little bit of camera lag for a cool effect by going to the Inspector, and under Position Smoothing, enable it and set to the speed to around 7. The lower the speed, the more camera lag there is.
Click ctrl+b or use the play button in the top right to start the program. Set the default scene to main. Congrats!! You now have a platformer game!