Platformer Game Quick Start Guide for Godot 4 Beta

  Рет қаралды 38,605

Chris' Tutorials

Chris' Tutorials

Күн бұрын

Basic setup for a platformer game in Godot 4 using the new CharacterBody2D template as the basis for the platformer character. This is meant to be a quick introduction to the Godot 4 Beta.
Finished Demo ~ / 72183449
Asset Pack for Tutorial ~ pixelfrog-assets.itch.io/pixe...
Check out this too! ~ pixelfrog-assets.itch.io/pixe...
➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
/ christutorials
chris-tutorials.itch.io/
linktr.ee/ChrisTutorials
◢ Chris Recommends ◥
Master Skills with Skillshare Video Courses ►► www.skillshare.com/r/user/chr...
Save Money Shopping Online with Honey Extension ►► joinhoney.com/ref/qd04c25
00:00 - What to Expect
00:28 - Project Setup
01:09 - Creating a Player Character
05:46 - Character Body Platformer Template
07:20 - Adding Ground Tiles with Tilemap
12:22 - Create a Follow Camera
13:23 - Scaling Up Game Size
14:05 - Setting Up Animations for Player
20:58 - Make a Tiled Background

Пікірлер: 119
@ShawnGardner11
@ShawnGardner11 Жыл бұрын
If you're getting an error on the if statement, make sure you're using == instead of just =
@mcbobstudios2176
@mcbobstudios2176 Жыл бұрын
Thanks because I wouldnt konw what to do other wise
@squanktheduck7909
@squanktheduck7909 Жыл бұрын
thanks
@bensonshiu3945
@bensonshiu3945 Жыл бұрын
Excellent video. Straight to the point. It gets me started in 23 minutes. Cheers.
@como000
@como000 Жыл бұрын
Finally... easy and understandable tutorial! Thank you 👏👏
@neozoan
@neozoan 11 ай бұрын
Excellent work on this tutorial. Showing how to "fix" problems is a wonderful way of demonstrating why things work and you do it time and time again. Very well done. Thank you! I was able to quickly put together a starting point with my 5 year old (who did most of the artwork).
@select_from_users5842
@select_from_users5842 Жыл бұрын
tip for separating animated sprites: if you know the size of each sprite (in this case 32x32), you can plug that into the size fields and it'll automatically separate each sprite.
@AndreaDoimo
@AndreaDoimo Жыл бұрын
This is the first Godot tutorial that didn't scare me about Godot, it was very clear and detailed. Thanks!
@hello_terebi
@hello_terebi Жыл бұрын
pretty straight forward and easy to understand, thanks a lot !
@hellgrim3837
@hellgrim3837 Жыл бұрын
Nice tutorial, easy to follow. Thanks
@AlexandreToledoPerez
@AlexandreToledoPerez Жыл бұрын
This is the best starter video I've seen.
@spamMarty
@spamMarty Жыл бұрын
Excellent tutorial, thank you! This has inspired my 7 year old son and I to create some simple little games.
@dpajc056
@dpajc056 Жыл бұрын
i think this tutorial is great but as TOTAL BEGINNER who's NEVER done any game design, I find it way too fast to follow and need to pause every few seconds just to have a moment to do what he did in split second on my second monitor in Godot. On top of that, it would appear that my version of Godot doesn't have the same exact options like "Animate" the sprite (frog idling) so I'm stuck trying to figure that out. I mean, if the tutorial is made for total beginners, my advice is please be a bit slower, don't skip any steps, maybe explain more why is this the way it is, and at the start tell us which version of Godot to download or at least which version you're using for this tutorial. Or maybe I just need a real basic Godot tutorial from absolute zero.
@mrdixioner
@mrdixioner Жыл бұрын
Спасибо огромное! Делайте побольше видео по Godot 4!
@sigterm_
@sigterm_ Жыл бұрын
Great quick start video. No fluff. You just jump right into all the relevant pieces and explain it clearly and concisely.
@chriscarmonte997
@chriscarmonte997 Жыл бұрын
Excellent tutorial :D
@MauroC74
@MauroC74 Жыл бұрын
very good tutorial, thanks!
@giantfrogstudios839
@giantfrogstudios839 Жыл бұрын
Great tutorial
@mikadini88
@mikadini88 Жыл бұрын
Very good introduction
@mmettler42
@mmettler42 Жыл бұрын
Great video!
@alexandervazquez7501
@alexandervazquez7501 Жыл бұрын
great tutorial for basics
@dharmasutraa3992
@dharmasutraa3992 Жыл бұрын
thank you chris ur a legend
@user-nu7yb1gm3m
@user-nu7yb1gm3m Жыл бұрын
nice work. Just subscribed!
@eduardofernandez6626
@eduardofernandez6626 Жыл бұрын
What is the difference between animationSprite2D and animationPlayer? and when is it appropriate to use them respectively?
@ammarazzan5874
@ammarazzan5874 9 ай бұрын
You are him!! Thanks
@bini420
@bini420 Жыл бұрын
thx dude
@dusuhiller9886
@dusuhiller9886 Жыл бұрын
oh my god, thank you very much.
@KabirsFamilyVlogs
@KabirsFamilyVlogs Жыл бұрын
best tutorial .
@chriscarmonte997
@chriscarmonte997 Жыл бұрын
you can also use animated_sprite.flip_h = clamp(-velocity.x, 0, 1) to resume flip direction to one line :3
@theARDISAN
@theARDISAN Жыл бұрын
Neat!
@wulfsnack3594
@wulfsnack3594 Жыл бұрын
Another alternative (from HeartBeast): animated_sprite.flip_h = (direction
@unadulterated
@unadulterated 9 ай бұрын
@@wulfsnack3594 wouldn't that make the sprite systematically face left when you stop moving?
@fekhreddinebouziane7084
@fekhreddinebouziane7084 Жыл бұрын
Excellent video thanks. idel animation not playing
@Icecrembars
@Icecrembars 10 ай бұрын
Every time I. Go into the debug test menu everything works accept the sprite animation even tho it works when I click the unpuase in the normal menue just wondering if u know what I’m doing Rong ?
@jaybugo
@jaybugo 11 ай бұрын
Anybody have an idea as to why my other animations stop working after I jump?
@asd1-so5sl
@asd1-so5sl 2 ай бұрын
Question regarding the camera2d. Why not just make the camera the player's child node instead of using the remote transform node?
Жыл бұрын
I don't have the "Playing" property on the AnimatedSprite2d -> Animation category. Only Animation, Frame, Speed scale. Was this changed in a later version of Godot 4? I'm using 4.0 RC2.
@niira8575
@niira8575 Жыл бұрын
i solved it in the script, by using the play method on the animated sprite: _animated_sprite.play("run")
@mystic839
@mystic839 Жыл бұрын
i think it was changed. "speed scale" is effectively the same thing, where 1 is play (at normal speed) and 0 is don't play. (negative values reverse the animation.) you might also want to autoplay on load (part of the sprite frames, not animatedsprite2d) depending on your use case.
@infiniteproduction1906
@infiniteproduction1906 Жыл бұрын
@@mystic839 Great tips, thanks. Although, with Godot 4 RC 2, animations plays only once then it reset back to pause state, those constant changes in editor just kills me :) ! I've added "animated_sprite.play()" in a ready function, also make sure "loop" is set in SpriteFrames animation (little icon left to the FPS) to make animations works with this release.
@RichardPerfectKiwi
@RichardPerfectKiwi Жыл бұрын
@@infiniteproduction1906 So total newbie here too, but i think the answer is that there is a "Autoplay on Load" button in the Animations SpriteFrames editor at the bottom of the screen it's the icon button 3rd from the left with a tiny little A inside of a arrow'ish chape pointing to the right.
@NezcalSpindrake
@NezcalSpindrake Жыл бұрын
@@RichardPerfectKiwi Thank you so much, that solved the problem!
@MichaelCoorlim
@MichaelCoorlim Жыл бұрын
Is there a benefit to adding the camera to the scene root with a remote link to the player vs just tossing the camera2D directly on the player itself?
@__________g5894
@__________g5894 Жыл бұрын
I'm very new too, but I think that for any instance where the player dies or is "deleted" you don't want the camera to go away too.
@psyboyo
@psyboyo Жыл бұрын
Nice video!!! Had to play at 0.75 speed, because you had a bit too much coffee! XD I really need to learn what changed in Godot 4 / GD Script 2.0, can you point out the best url where we can find all those changes? Hugs
@peterbelanger4094
@peterbelanger4094 Жыл бұрын
I have been noticing this with a lot of content creators lately. It's kind of annoying, but I don't know how it can be stopped, all you can do is set the video slower, like you did. The person doing it doesn't even realize they are doing it. I think an unconscious side effect comes from making YT videos, where people start talking faster, maybe because they are nervous making the video or pressed for time. And along with the one way nature of talking to a camera preventing a natural regulation of the pace of speech, they start talking faster. This gets re-enforced by by people who make videos in this habit continuing to talk faster with others who talk faster, creating a whole sub culture of people who talk that way. The ever increasing pace of society does not help. But it is essentially the fact that they by talking to a camera, for various reasons, it will train you to talk faster.
@janners365
@janners365 Жыл бұрын
@@peterbelanger4094 it comes from the fact that the content is well prepared and practiced. I much prefer this style to someone going "um ahh hmmm wheres that button?". My advice for people watching tutorials has always been to just watch if first without opening the application, then when you go back and are following along you'll know where things are going and will most likely have to pause much less frequently.
@warrior8034
@warrior8034 Жыл бұрын
i want to know how to make slope movement in a 2d platformer work correctly on godot 4
@KateYagi
@KateYagi Жыл бұрын
This tutorial is very helpful, thank you! Much easier than older versions of godot. I even did a little game design thing in my tilemap where I had 4 platforms--the ground, a rock that's too short, but first thing you notice, and a hill that's just tall enough to reach the gold platform. Question: If an animation consists of only one frame, would having it not loop make the game more performant, or does the engine detect that and do it for you?
@badatspeedruns
@badatspeedruns Жыл бұрын
I do not have the bar at the very top that says scene, project, debug, that stuff. How do I make something my main scene? Also, when my animated player is a child node, the animation doesn’t run. How do I get it to start?
@paulosullivan3472
@paulosullivan3472 10 ай бұрын
There is no "physics layer" on the tilemap node. There is a layers, and you can add an element but there are no collision layers and you cannot seem to add any physics to it, is this a change in godot?
@DalphineNim
@DalphineNim Жыл бұрын
the animations like idle, run don't work the character is just still. does anyone know why? I followed other comment's solution which is "var animated_sprite = $AnimatedSprite2D func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta animated_sprite.play("jump") else: if(velocity.x == 0): animated_sprite.play("idle") else: animated_sprite.play("run")" but this doesn't work for me...? help? Y-Y
@ItsLars2828
@ItsLars2828 Жыл бұрын
What is the license regarding the use of this code?
@onlinesoftware4466
@onlinesoftware4466 Жыл бұрын
can i understand why moving left doesn't work for me?
@Cross_Contam
@Cross_Contam 11 ай бұрын
Everyone has no issues dropping art in from various sites but when I drop in a .png spritesheet I made myself they're always read only and I can't split them up to be used properly.
@Dent42
@Dent42 Жыл бұрын
When I write “var animated_sprite = $AnimatedSprite2D”, I get an error saying “Error at (9, 1): The default value is using “$” which won’t return nodes in the scene tree before “_ready()” is called.”
@resin01
@resin01 Жыл бұрын
He fixes it later in the tutorial. But just add @onready infront of that line to fix it.
@lexflow2319
@lexflow2319 Жыл бұрын
There is no physics layers attribute in the inspector for tilemap in godot 4 stable. How do we enable physics for the platform now?
@tamilthagaval7360
@tamilthagaval7360 Жыл бұрын
Click on the Tile map node and select Tile set in Inspector Pane. it should turn into blue and then the Physics Layers will be visible.
@jekskarter2727
@jekskarter2727 9 ай бұрын
когда он пишет в конце кода move_and_collide() она у него загорается красным и код не работает,посмотрел в коде с анимацией так этой строки у него нету.
@TorbenPedersen-nk3by
@TorbenPedersen-nk3by Жыл бұрын
How do you type in the less-than-or-equal-to sign?
@mystic839
@mystic839 Жыл бұрын
my recommendation is don't (and i think this is just the author's font for the normal
@pr9039
@pr9039 Жыл бұрын
I love how your keyboard automatically does
@MrZelnoth
@MrZelnoth Жыл бұрын
Look for a monospaced font with ligatures.
@benmcwhirter4566
@benmcwhirter4566 Жыл бұрын
At 17:24 when I hit play, I get an error saying Invalid set index 'animation' (on base: 'AnimatedSprite2D') with value of type 'String' It occurs on line 16 where ="jump" happens. I tried adding extend AnimatedSprite2D at the top above and below the first line "extend CharacterBody2D". It played although I lost all movement and gravity also failed.
@mraqone
@mraqone Жыл бұрын
me to
@svbwoofer
@svbwoofer Жыл бұрын
Hi, not sure if this would solve your issue, but in the vid he spelt it "$AnimatedSprite2d", make sure yours is spelt "$AnimatedSprite2D".
@Margerrat
@Margerrat Жыл бұрын
@@svbwoofer tried it, didn’t work
@justingrassmyer4747
@justingrassmyer4747 Жыл бұрын
run current scene works, but running the project just has the guy fall, with no background or floor.
@weeelum
@weeelum Жыл бұрын
When I press play to test the gravity and move the character left and right, the play window is zoomed in really close on my character and I can't figure out how to zoom out.
@weeelum
@weeelum Жыл бұрын
Never mind, figured it out!
@Candylectric
@Candylectric Жыл бұрын
Not only does the code for playing other sprite animations not seem to work, but it also disables the controls. The game will still play but the playable character will not move no matter what button I press.
@Kats_Sad
@Kats_Sad Жыл бұрын
the arrows
@maxgtm2202
@maxgtm2202 11 ай бұрын
putting this at the top works: extends CharacterBody2D @onready var _animated_sprite = $AnimatedSprite2D func _process(_delta): if Input.is_action_pressed("ui_right"): _animated_sprite.play("run") else: _animated_sprite.stop()
@paulbecket7399
@paulbecket7399 Жыл бұрын
so I'm trying to work with godot 4 and follow your video...there doesn't seem to be any "Playing" button in the inspector any where so while I can get the sprite to animate in the sprite frames area it doesn't animate when the scene is played what am I missing ?
@niira8575
@niira8575 Жыл бұрын
i solved it in the script, by using the play method on the animated sprite: _animated_sprite.play("run")
@marconovelomijangos6991
@marconovelomijangos6991 Жыл бұрын
You have to go in animated sprite where all the animations are, the there is a tag that says idk if play when load or autoplay, srry if idk the name exactly im using it in spanish
@paulbecket7399
@paulbecket7399 Жыл бұрын
@@marconovelomijangos6991 thanks to all the responses ..I figured out my problem thanks again
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
@@marconovelomijangos6991 Worked for me ! Thanks !
@kunodev
@kunodev Жыл бұрын
@@paulbecket7399 how did you do it it's still not working for me. I hate this fucking pc, it's not even a pc it's a piece of paper i can do nothing on it.
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
Is this tutorial still up to date ? I've just downloaded Godot 4.0. For me the player is not getting animated in the Level1 scene. The animation is playing in the Player Scene, but at the step of dragging the player scene into the level scene, on the video the player animation is running straight, but me I don't get any animation. The "playing" animation property is not present in my interface for AnimatedSprite2D. Instead there is a play button in the animation frames interfaces (if that matter...). Anyhow, as i said, when dragging the Player.tscn into level, I don't get animation and I don't see any property there to enable it...
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
Also adding "var animated_sprite = $AnimatedSprite2D" in the script triggers an error : the default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
Ok so the solution for that is indeed @onready as explained later on the video. Applying the script modifications I have the first sprite of each animation which is indeed displayed depending on wether the player is still, jumpring or running. But animations are not getting played... I've gone through the beginning of the video several times and I don't think I missed anything except this "playing" property which I don't find in my properties tree.
@squanktheduck7909
@squanktheduck7909 Жыл бұрын
@@potentiometer7431 ty
@brosrproz1407
@brosrproz1407 Жыл бұрын
fr sum reason, my character doesnt animate when the respective keys r pressed. the frames r present, I followed all steps in tutorial, (i am using godot 4.0.1)
@kimrosvol6205
@kimrosvol6205 Жыл бұрын
@onready var animated_sprite = $AnimatedSprite2D func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta animated_sprite.play("jump") else: if(velocity.x == 0): animated_sprite.play("idle") else: animated_sprite.play("run")
@Grapeminecraft
@Grapeminecraft 10 ай бұрын
I cant see my sprite
@niilokolehmainen
@niilokolehmainen Жыл бұрын
For some reason, my sprite's animations only show the first frame. Any ideas why?
@kimrosvol6205
@kimrosvol6205 Жыл бұрын
@onready var animated_sprite = $AnimatedSprite2D func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta animated_sprite.play("jump") else: if(velocity.x == 0): animated_sprite.play("idle") else: animated_sprite.play("run")
@TheWildSimmy
@TheWildSimmy Жыл бұрын
@@kimrosvol6205 Thank you🙏 had the same issues - wouldn't load the debug game menu. This works 👍
@marconovelomijangos6991
@marconovelomijangos6991 Жыл бұрын
Hi, I have a problem when i put the animations it doesnt play it, just put the first frame :c
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
Yes I have the same issue...
@nicolaslance8518
@nicolaslance8518 Жыл бұрын
Found it thanks to an older comment : in the Sprite Frames panel you have to check the "Autoplay on Load". It is kind of a square button with a pointy side and an "A" in it, above the "Filter Animations" search field.
@lithrean739
@lithrean739 Жыл бұрын
@@nicolaslance8518 Thank youuuu
@suttoo85
@suttoo85 Жыл бұрын
@@nicolaslance8518 legend
@kimrosvol6205
@kimrosvol6205 Жыл бұрын
@onready var animated_sprite = $AnimatedSprite2D func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta animated_sprite.play("jump") else: if(velocity.x == 0): animated_sprite.play("idle") else: animated_sprite.play("run")
@agoniavr
@agoniavr Жыл бұрын
Trying this tutorial on Godot 4 release version and the part at 17:19 gives an error that says Error at (18, 25): Assignment is not allowed inside an expression. I copied everything you did, how do I solve this?
@vladkajdanovich1491
@vladkajdanovich1491 Жыл бұрын
if (velocity.x == 0):
@agoniavr
@agoniavr Жыл бұрын
@@vladkajdanovich1491 it works! Thanks, I can finally go ahead with the tutorial :) I'll do the GDQuest GDScript tutorial next but I wanted to try and replicate this one first just to test Godot quickly. Do you know why there's an error here? Did they change GDScript's syntax?
@vladkajdanovich1491
@vladkajdanovich1491 Жыл бұрын
@@agoniavr i don't know, I just used ChatGpt to solve the problem
@agoniavr
@agoniavr Жыл бұрын
@@vladkajdanovich1491 really? Well that's cool
@MrZelnoth
@MrZelnoth Жыл бұрын
The error message tells you what is wrong. You're not allowed to do an assignment inside an expression. This means you can't assign a value to a variable inside a if statement. The font used in the video has ligatures so == just looks like a longer =.
@andyapricot4104
@andyapricot4104 Жыл бұрын
Bookmark 6:55
@xerxlugner9076
@xerxlugner9076 Жыл бұрын
My "idle" and "run" animation doesn't seem to work..how do you fix it?
@kimrosvol6205
@kimrosvol6205 Жыл бұрын
@onready var animated_sprite = $AnimatedSprite2D func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta animated_sprite.play("jump") else: if(velocity.x == 0): animated_sprite.play("idle") else: animated_sprite.play("run")
@xerxlugner9076
@xerxlugner9076 Жыл бұрын
THANKS A LOT BRO. Do you mind explaining about it?
@DalphineNim
@DalphineNim Жыл бұрын
@@kimrosvol6205 it says Identifier "animated_sprite" not declared in the current scope. how do I fix it? ;-;
@weeelum
@weeelum Жыл бұрын
I've tried every little step in this video up until around 17:30, but no matter what, the only run test animation that works is "jump". This is killing me! Please, if you're going to make a "quick start guide," perhaps slow down and go into more detail, because you skipped a lot of small steps I had to figure out on my own. A much smaller scope would probably benefit everyone.
@joshua7426
@joshua7426 Жыл бұрын
Love expanding my knowledge in coding and game engines. but i have to comment , with what literally took an hour or so in godot following along and trying to remember the syntax, I could have done in construct 3 in a matter of mins with so much more polish , sounds music enemies and pixel perfect collisions. still was fun though trying to figure things out on my own before unpausing video in certain sections to see if where and how i arrived there was the correct way
@chelsiekristyn589
@chelsiekristyn589 Жыл бұрын
I love you. Please marry me. You are the best. Literally saved my life three times. Naming my first born kid after you.
@NetherCat_studio
@NetherCat_studio 10 ай бұрын
the pixel frog is $2.00 NOT FREE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@Icecrembars
@Icecrembars 10 ай бұрын
click download without buying in grey text and dont be rude
@Ateur_Dev
@Ateur_Dev Жыл бұрын
Tanx
@kimbaptempura4073
@kimbaptempura4073 Жыл бұрын
This is utterly worthless why do people refuse to show how to anchor your character on a moving platform, they changed how this works and NO ONE WILL wants to drop a 2 minute tutorial on that, only self explanatory crap like this, stuff you can see on their site.
10+2 AWESOME ADDONS for GODOT 4
8:36
MrElipteach
Рет қаралды 125 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 121 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 78 МЛН
Roadmap to learn Godot 4 as quick as possible
4:01
JumboGamedev
Рет қаралды 43 М.
How I published my first game at 16 years old.
12:35
Strudel Studio
Рет қаралды 8 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 448 М.
What size should your assets be? | HD 2D GAME ART
12:10
Nonsensical 2D
Рет қаралды 108 М.
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 317 М.
I Made a Desktop Pet in Godot
16:02
RachelfTech
Рет қаралды 80 М.
How to Make a Good 2D Camera
11:38
Game Maker's Toolkit
Рет қаралды 387 М.
Particle Systems From BEGINNER To PRO | Godot Engine
10:59
PlayWithFurcifer
Рет қаралды 82 М.
Странные штыри с кольцами из сарая
0:31
А на даче жизнь иначе!
Рет қаралды 1,7 МЛН
The little girl just wanted to help 😭😳😔
0:45
Family Fast Five
Рет қаралды 9 МЛН
🎂They Ate Mom's Cake And Got Away With It😲🤪
0:49
BorisKateFamily
Рет қаралды 3,5 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
0:31
火影忍者一家
Рет қаралды 23 МЛН
#狼途新品lt75机械键盘 #funny #comedy #memes #baby #icecream
0:15
Reuse ♻️
0:32
Yoshipapa / よしパパ
Рет қаралды 18 МЛН