Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In the last video, we set up the animations for our character.
However, as you can see, it still doesn't feel fun to control.
There are some easy tweaks we can do to make the character feel fun in a platformer game.
The first thing is something that isn't quite obvious, but we want to make a 2D or a 2d 3D hybrid game,
and we don't want to allow our character to walk backwards or forward, just left and right.
And in terms of the inputs, this is fine.
We cannot walk back and forward.
However, physics and other things can still push us back or forward, and this is very problematic.
If we built our game around the assumption that our character is always on the same lane.
To demonstrate that, I can just go here and add a sphere shape.
And I want to drag this on the same lane as the character.
Back here.
So the character walks into the sphere, not directly in the middle, but kind of at a side angle.
And you can see that.
Hmm.
Okay.
This is too much in the middle.
A little bit more forward.
This kind of pushes us forward, right?
So you can see I walk in here and the physics push us forward, and now we're off our original lane.
And this is very problematic with the kind of game we want to make.
However, there is a very easy solution and this is something we want to apply not just for the player,
but also for all of the enemies.
So we want to go to blueprints characters, not the player, but actually the action base.
Again, because we want to apply this to everybody.
Open it up.
If it doesn't show the full blueprint, open the full blueprint editor.
And we want to go to the character movement component because again, this is a component made by Unreal
Engine that has a lot of functionality built in already that controls the movement of our character.
And on the right side in the details panel, we just have to look for constrain and it's going to show
us constrain to plane.
And we want to turn this on.
So this will force our character to always stay on the same plane that we set.
And we also have to give it a direction for the plane constraint normal.
Because if it's just 000, it's not going to do anything.
We have to set the direction in which we want to lock the movement.
And you can see here if we for example.
Select this sphere.
We don't want to move on this axis.
Right.
You can see here on the bottom right, the green axis is the one that is moving.
So we want to prevent movement on the y axis the green axis.
And this means here on the y we just have to put in 1.0 and 1.0.
In this case just means active and zero means inactive.
So we don't apply any constraint to the x and the z only to the y.
And this is a very important setting for 2D and 2D 3D hybrid games.
So let's try it out.
I can now go start the game.
And even if I walk into the sphere, well, we have a weird angle again, just like this.
Like before.
And I'm not being pushed forward or backward.
I rather just stop in place and this is exactly what I want, so nothing can push us forward or backward.
We are certain that we're always going to be on the same lane, and we can build our levels around that.
Now we can just select the sphere, hit delete on the keyboard, get rid of it.
And another issue that isn't quite apparent happens if we walk to the edge of the map.
Once we are here, you can see that we don't just fall down.
We kind of awkwardly, slowly go downwards.
And this happens because our character is using a capsule component.
And this is the standard thing that most game engines do because this is good if you go up slopes,
if you go up stairs, it's just the best shape to use.
However, for these kind of retro platformer style games, it feels very unresponsive.
If you just kind of slide down on ledges.
There is a setting we can change easily though.
To fix this and again, we want to go to the character movement component.
And again, we can do this for everybody, not just the player, for all of the action charts and look
for floor.
And it's going to show the.
Use flat base for floor checks.
Variable here.
And for floor checks like this, it's basically just going to ignore the capsule and just use a square.
And this will fix the situation we just had.
So we can just turn it on, compile and save.
And if I do the same thing now.
And now at the edge you can see that we don't slowly go down, but once we hit the threshold, we just
fall down immediately.
And this is how it is in most of these old, uh, 2D kind of games.
This doesn't come without trade offs, though, because now we implement stairs or slopes.
The movement gets a bit awkward, but we don't plan on using them in this game, so it's kind of a trade
off.
You have to think about, depending on what kind of game you're making, if you want to use this or
not.
Next up we want to look at the jump speed and gravity in these Megamind clones.
The jump is very distinct, and you have this jump that you can hold, and you have a lot of control
over which we're going to implement in the next lesson.
But for now, I just want to use the general settings you'd use in most platforms to make them feel
good, and we can then tweak them to better fit this Megaman clone type of game.
The biggest problem right now is that gravity is very low, and it kind of feels like we're jumping
on the moon.
So again, in the action chart, because we want to apply this to everybody, we can again go through
the character movement component.
And we want to look for gravity scale.
And you can see here gravity scale is one.
And we can just make gravity heavier for example by using three.
So the gravity is three times as heavy.
And I can now compile and save.
And if we jump now, you can see that first of all, we barely lift off.
But also we fall to the floor very quickly.
And I like this falling feeling.
However, the jump is too low now, so we have to adjust the jump height to fit this gravity.
And again, in the action chart we can just look for jump velocity.
And set this from 420 to 900.
And these are just some values I found while prototyping.
But I just I was just going through some trial and error, trying out different values and see how they
feel, but this is what I ended up with.
And please use the same while we make this game.
But later on you can change these if you want to and again compile and save.
We can check it out and this is a lot better, a lot more responsive already.
We still have the same jump height we had before, but now we fall to the floor much quicker.
Which makes the game much more responsive.
If you try to move in the air, though, hold right or left while you're in the air.
We actually cannot control our movement a lot.
We're kind of locked into a jump direction once we start, once we lift off the floor and again, there's
an easy setting we can use for this.
Uh, in here character movement component.
We can look for air control.
And air control is a very low right now by default 0.05.
If we put it to one, it would be the same amount of control we have on the ground, which is a little
bit too much.
And usually I just go for a 0.7, which gives us a lot more control than before, but less than we have
on the ground.
Compile and save and let's try it out.
So now even if I jump to the left, I can kind of steer against it in the air.
And this makes platforming a lot more precise and a lot more fun.
And these are the general settings I always use when making a platformer.
But again, in the next lesson we're actually going to implement the iconic Megaman clone jump.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.