Tip:
Highlight text to annotate it
X
Nothing
Welcome to the Godot Engine tutorial
I Decided to record that one because i didn't find any polish tutorialds
There are some of platformer tutorials in english, but i think in polish would be good too
And we're gonna to make a simply platformer game with Godot and gimp
First Episode: Basics of basics Show the Sprite Simply physics
This is Godot engine
It's really over 40mb
This is project manager
New project
Then choose your direction for project, create folder for create project folder
I will name it Star Bucket, because i want to do game about bucket in universe
Sorry, let's make a folder
Open the folder, and that's our project
And now we have our project
Now press edit, or double click on project to open it
And that's our Godot Engine
It's really smillar to Unity
We have inspector, nodes window and resource window.
There will be show all our resources, scripts, textures etc.
Godot has 2D editor, 3D editor, and script editor
In godot script's are in GDScript - it's language very smillar to python, but remember that's not the same.
We are going to do 2D game
This is our actual game window resolution
For now it's 800px X 600px, but we can change it any time
in project settings
Let's try to show any image on the screen.
There we have window, where we have our Nodes
Nodes are something like objects
Click on paper to create new Node
At start we need main parent node
In 2D game it will be Node2D, in 3D it will be spatial
We can add to this main node "Sprite2D"
We have sprite joined to the Node2D, we can move it everywhere
but it havn't any texture
So let's go to the right side to the inspector
and we have there "Texture", we can choose our image file
There is always icon.png, so we don't need to draw anything at start
And now let's try to run our project
There is play button under the bandicam logo (XD)
We can also test our application on android device
It seems we need to save this scene before running
So let's save this scane in new Folder called Scenes
Okay, we have scene saved, let's try now
Now, we don't have main scene selected
We can do this in Scene ->Project Settings
Application - > main_scene, click on the folder at the right side
and choose our main scene
It will always run with game start
And now we can run our game
As you can see we have there sprite, and that's all for now
We can change window resolution as i said before
Display : "width" and "height"
And now game is running in 1280x720px
In project setting we have really a lot of variables to change our game preferences
Okay, showing the image works fine
Now it's time for basic physics
So we have 3 body - nodes in 2D
Static - gravity not working on this node
Rigid - for every normal object like player, moving blocks etc.
Kinematic - like static but we can't move it
For player we need RigidBody
But nothing changed
because our rigidbody has no texture
Then we can connect the sprite to rigidbody, it will follo its parent - rigidbody
With using this button
Parent
Children
Try to always have children position on 0,0
and always move all objects, not only sprite, u need to care of that
And now our rigidbody with texture falls down
For it collide with other bodies, it needs connected collision shape
CollisionShape2D can be ractangle, circle, capsule etc. just regular shapes
And CollisionPolygon2D is using to make irregular shapes with for example 9 verticles
But for us normal rectangle is enough
Scale it this way
And we have RigidBody with sprite and collision shape
We need something to collide with
We can duplicate all nodes with children with this button
But i did mistake there we need to create new static body instead of changing rigidbody to staticbody, it won't work
So create new static body with collison shape and texture
And now everything is working fine
Lets scale this shape better
And at least
How to make good rigidbody to the player
As you can see, now everything works on our player, it will rotate when collide on side
But we don't need that in player
So we can change in rigidbody's inspector
from RigidBody to Character
That's the same as rigid body, but it won't rotate by itselfs
That's all for this part ( I'm sorry for my english words pronunciation XD )
Next ill show how to make player moving and jumping