In this third part, we will proceed to design the character so that it can move, animate it.
| Join the channel Telegram of the AnonyViet 👉 Link 👈 |
In this part, it’s not too difficult, I will explain the code closely so that you can understand it more easily.
Tilemap
Before that, in the previous post, I showed you how to design the level, but that part we have not added CollisionShape to the tilemap.
So, now all you need to do is add it or else our character will fall to infinity because CollisionShape has not been added.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 33 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 31](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-06-43.png)
First, you go back to the Tileset section and then choose for yourself Collision.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 34 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 32](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-08-02.png)
After selecting, click 1 box below.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 35 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 33](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-08-39.png)
Then click on the square (the collisionshape square is next to the collisionshape polygon).
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 36 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 34](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-09-42.png)
Then the square is green.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 37 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 35](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-10-10.png)
Then click on the box next to it twice and you will see that the cell we just selected has been filled with a collision shape.
Please continue to finish the Region we have selected.![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 38 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 36](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-12-50.png)
Like I’ve finished filling here, because I only use these regions, I can only fill this one, not fill it all because it takes time + no longer uses it, so it’s a waste.
Character
About the character, you can download it at the following link: 3 Character Sprite Sheets
Here, I will use AnimatedSprite, not Spritesheet because this character Art is separated so I can’t use SpriteSheet.
Download & Install
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 39 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 37](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-20-20.png)
You download and then go to the Assets folder to create a new folder named NhanVat (this is where the character art is located).
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 40 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 38](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-20-53.png)
After that, you copy all the files from the downloaded zip file into the character folder
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 41 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 39](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-22-42.png)
After you are done, the Editor will display like this.
Character creation
Coming to the most important part.
First, to create a character you need to create a new scene by clicking the button on the image.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 43 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 41](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-25-02.png)
Here I do not add it to a scene like the image above because doing so will take time to redo.
Therefore, I create a new scene and can Instance (add the created scene to another scene) it into other Scenes quickly.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 44 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 42](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-26-36.png)
You add your own Root Node is Kinematicbody2D (This node is the node that Godot defaults to as the Node used to create characters because this Node contains functions to help us move.In addition to this node, there are also 2 types of Body Nodes. other are Rigidbody and StaticBody).
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 45 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 43](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-29-29.png)
After that, I renamed the Original Node to Player and added 2 more AnimatedSprite nodes (I use it instead of Sprite because the art I downloaded has many Animations and is divided into many images, so I will use AnimatedSprite instead of Sprite) , CollisionShape2D.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 46 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 44](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-31-25.png)
You click AnimatedSprite in the Inspector panel select [empty] -> New SpriteFrames![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 47 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 45](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-31-36.png)
Then click on the newly created SpriteFrames.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 48 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 46](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-31-46.png)
Then the AnimatedSprites tab will appear.
You will see the Animations column on the left is a list of Animations.
On the right are the frames of Animation.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 49 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 47](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-32-05.png)
I will change the default to dungyen by double clicking on it.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 50 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 48](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-32-46.png)
Next, I will select the button on the image to add the sprite.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 51 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 49](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-33-10.png)
Here, I am creating a stationary Animation so I will find the appropriate Animation. In here idle by standing still.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 52 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 50](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-33-25.png)
After that, a new table will appear and I will edit it properly.
You notice on the top left there are 2 adjacent lines are Horizon (horizontal) and Vertical (vertical) . You have to adjust it properly to select frames.
![]()
Here, my animation has 4 frames. Horizontally, it has 4 pictures so Horizon is number 4, Vertical is only 1 so Vertical will be number 1![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 54 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 52](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-34-14.png)
Then you select each cell in order from left to right because it calculates the frame order in the order you choose. Then press Add Frame.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design [Tạo 2D Platformer Game với Godot] Part 3: Character Design](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-44-39.png)
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 56 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 54](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-45-09.png)
This will be the interface after adding.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 57 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 55](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-46-27.png)
Then you add the corresponding animations as shown on the table for yourself.
This is also an exercise for you.
Here, if you don’t know which photo to choose, I will say it below:
- run = run
- chet = deah
- jump = jump
- tancong = attack1
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 58 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 56](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-50-07.png)
To run Animation, you can select Animation in the box Animation and tick Playing to run.
![[Tạo 2D Platformer Game với Godot] Part 3: Character Design 59 [Tạo 2D Platformer Game với Godot] Part 3: Character Design 57](https://anonyviet.com/wp-content/uploads/2021/11/09-11-2021-10-51-09.png)
If your character is blurry like the picture, you need to Reimport 2D pixels again.
After Reimport our character will be sharper.










