Beginner Godot Tutorial - Make Flappy Bird in 12 Minutes!

  Рет қаралды 59,165

Coding With Russ

Coding With Russ

Күн бұрын

Пікірлер: 142
@bedang1058
@bedang1058 6 ай бұрын
Annnnd thats how you watch a 12 minutes video in 1.5 hours !
@jankutac9753
@jankutac9753 4 ай бұрын
hell yeah. I mean would it kill him to pause a little bit between actions, and show what he is clicking on a bit longer than half a second? :-D
@Ranamo_
@Ranamo_ 3 ай бұрын
​@@jankutac9753 so true
@Jetski1Teterium8402
@Jetski1Teterium8402 2 ай бұрын
That's why i dont like the video and i didn't understant nothing
@excelucate
@excelucate 10 ай бұрын
Thank you very much, I'd say one of the best explained. You do need a high level of attention to detail, it took me two attempts to make it work (says a lot about me i guess). I can understand the editing took a lot of time and effort but in some places it was not easy to follow so lowering the setting playback speed helped. Having said that this was a brilliant video and great to see someone make a complete game with all of the code available. Keep up the great work it is appreciated!
@CodingWithRuss
@CodingWithRuss 10 ай бұрын
Thanks! The funny thing is that with all the editing, this video took me about as long to make as it would have if I made a full length tutorial 😅 Glad you found it useful though!
@moza1793
@moza1793 11 ай бұрын
Thank you so much for the guide! I just tried godot this year and haven't fully grasp the UI yet. But, this video explained it very well for a beginner. of course it's probably will be better if you can slow it down at some specific point. I'll definitely watch the other guide to make games!
@محمدالكهالي-ف3غ
@محمدالكهالي-ف3غ 9 ай бұрын
i agree :)
@ilhomsoliev275
@ilhomsoliev275 Жыл бұрын
Keep doing complete projects on Godot 4, you are gold!
@yeaglaceshorts546
@yeaglaceshorts546 8 ай бұрын
I used this to spawn in a ball for a new plinko clicker I am making. It was super helpful. Thanks!
@Sabbalab92
@Sabbalab92 4 ай бұрын
Thanks for this. I've been trying to learn GDScript. I didn't understand everything you showed, but this is definitely a good start for when I make more progress.
@CodingWithRuss
@CodingWithRuss 4 ай бұрын
Thanks! Yea this video is a little bit fast, I probably shouldn't have called it a beginner tutorial as it's difficult to follow if you've never used godot before.
@dragosilies5764
@dragosilies5764 8 ай бұрын
Great tutorial, I like that you didn't spend too much time explaining concepts. Great when coming from Unity
@CadeHLife
@CadeHLife 7 ай бұрын
After following a few other in depth tutorials to get a basic understanding of core Godot features, this was a fantastic next step for me! Such a fast and rewarding way to help grasp concepts and actually prove to people that they can make a game. As I was pausing and copying code it had me thinking "oh yeah that makes sense" and "OH so this is connecting from what we already implemented here" I will definitely be checking out your other videos. Thank you!
@zigzag.ahmed2209
@zigzag.ahmed2209 9 ай бұрын
extends CharacterBody2D const GRAVITY : int = 1000 const MAX_VEL : int = 600 const FLAP_SPEED : int = -500 var flying : bool = false var falling : bool = false const START_POS = Vector2(100, 400)
@senlee325
@senlee325 4 ай бұрын
Very nice tutorial. My first time using Godot instead of Unity. There was some hiccups at first, but I learned a lot from this. Got a working game completed.😀
@FriskTemmieGoogle
@FriskTemmieGoogle 7 ай бұрын
Idk if this bug is because of the new Godot version, but 5:28 didn't work for me. After messing around a little, I figured that the reason was that the variable "scroll" didn't have a type assigned to it (I'm sorry if I'm making some kind of mistake with the proper names), so changing the line 5 from "var scroll" to "var scroll : int" fixed the problem and let me run the game with the ground moving
@FriskTemmieGoogle
@FriskTemmieGoogle 7 ай бұрын
09:05 I found another bug here which could also be from the version. My pipes still didn't have collision and the pipe scene had a yellow triangle on the collisions, saying that they couldn't be connected to a sprite2D node. I changed the order, connecting them directly to Area2D "Pipe" node and that fixed everything. I ofc changed the names for better understanding of what was what
@FriskTemmieGoogle
@FriskTemmieGoogle 7 ай бұрын
09:57 now I realize that I just did it wrong when I was setting it up, mb
@Cyynapse
@Cyynapse 9 ай бұрын
i really like how concise this is. it encourages you to actually learn the software instead of just copy what you see
@CodingWithRuss
@CodingWithRuss 9 ай бұрын
Thanks!
@FriskTemmieGoogle
@FriskTemmieGoogle 7 ай бұрын
really good tutorial! It was perfect as a "hello world" to get me used to this game engine. I was easily able to change things to my liking and even add a "Get Ready! "TAP TAP" screen, like in the original game. I'll probably add the ability of changing the color of the bird next as a little challenge
@CodingWithRuss
@CodingWithRuss 7 ай бұрын
Thanks! I like the little tweaks you're adding :)
@rohitsoni2109
@rohitsoni2109 7 ай бұрын
Great tut. On point, no time wasted.
@Wallee580
@Wallee580 Жыл бұрын
I've been playing Marshmallow Land (it's a built-in hidden Android game) so it's quite good timing that you make this. xD
@CodingWithRuss
@CodingWithRuss Жыл бұрын
I had to google that, can't believe I never heard of it before...I've had an android phone for years 😅. Looks like a very similar concept game.
@Multifandomguy
@Multifandomguy 7 ай бұрын
4:07 hey I got an error here when I clicked play, the engine says to me there's an error, which is the reset() function isn't declared in the original Bird scene is there any solution to this glitch ???
@BenitoBeni1414
@BenitoBeni1414 5 ай бұрын
I have the same glitch, idk what to do
@tjjfhdgdhtfwtwthdjffgxhfhxhwjn
@tjjfhdgdhtfwtwthdjffgxhfhxhwjn 4 ай бұрын
this error should mean that you haven't created the function reset in the Bird.gd script. when you declare it it should look like this: func reset(): falling = false flying = false position = START_POS set_rotation(0) You may have accidentally declared it inside another function (for example the _ready() function)
@ttdnz02
@ttdnz02 24 күн бұрын
try using _reset()
@cccornel5965
@cccornel5965 Жыл бұрын
After following the video and doing everything in it, I found out I suck a FlappyBird Thanks for the video
@diegoandradex12
@diegoandradex12 Жыл бұрын
Nice and clearly explained! Everything worked here
@YankaZabka
@YankaZabka Жыл бұрын
Hey Russ, I'd like to ask about the formulas in your tutorial, like: `if flying: set_rotation(deg_to_rad(velocity.y * 0.05))` or `pipe.position.y = (screen_size.y - ground_height) / 2 + randi_range(-PIPE_RANGE, PIPE_RANGE)` As a newcomer to game development, I'm curious about their origin. Are these from your game dev experience, established best practices, or custom calculations for this project? Those techniques work great, and I'd like to learn more about them. Thanks!
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Hello. I'm self taught so this stuff comes from previous experience making these kinds of games (I made flappy bird in pygame a couple years back) and also just trying different things and refining them until they work. I try to avoid manually entering numbers and instead use the data available in the game, so that's what is going on with the second formula. I sketched out the position that I wanted to calculate, then looked at what existing variables I can use for reference and came up with an equation to tie them together.
@gaWalt
@gaWalt 9 ай бұрын
Hello Russ, who did all the graphics for you? I'm still working on your pygame tutorials but I like the look of the Godot games much better. I'll see if I can follow along on this tutorial and just might switch over to Godot for my future games. Thanks, Gary
@CodingWithRuss
@CodingWithRuss 9 ай бұрын
Hi Gary, I just find them online, there are lots of open source images that can be used with or without attribution. I try to credit all my sources in the video description although I couldn't remember where I got the images for this game so I couldn't reference them.
@gaWalt
@gaWalt 9 ай бұрын
Thanks Russ and keep on making these great tutorials!
@vegasdealer777
@vegasdealer777 Жыл бұрын
Thanks, Russ, for sharing your knowledge. I'm trying to convert a video poker app I wrote in Python/Pygame to Godot 4. After Snake and TicTacToe, I'm finally 'getting' Godot a little bit. I haven't watched Flappy Bird yet, but I'm sure it'll be helpful.
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Glad to hear it's starting to come together. I switched from pygame to Godot not too long ago so it's a learning curve for me too!
@GhostGirlBlues
@GhostGirlBlues 11 ай бұрын
been struggling along for hours. more and more issues as i got deeper in. double and triple checked the code compared to the gdscript provided and shown in video. can't get the pipes to appear. and the bird falls through the floor for a very very long time. and the ceiling area detection doesn't seem to be at the right height
@GhostGirlBlues
@GhostGirlBlues 11 ай бұрын
started over from scratch and spent another day struggling through. i finally got it to work. thank you for this and the pong tutorial. what i've learned is that you have to be extremely exactly perfectly precise. part of the difficulty for me is that this one felt a bit too fast. "blink and you miss it" kind of stuff threw a wrench in things several times
@alexxgg9208
@alexxgg9208 6 ай бұрын
idk 12 min. rebuilding and really understanding hours xD. very good video but i like longer videos with more explanations!
@JacobVega
@JacobVega 7 ай бұрын
A really great tutorial. I had managed to get everything working, but after customizing the textures of the pipes to my own designs, the game keeps crashing (freezing/Not Responding) when the "generate_pipes()" function is run. Whenever the timer first ends, it freezes and in the "Stack Trace" window, it says "Cannot call method 'instantiate' on a null value. And then in Stack Frames are below that message in the window, it lists the "at function: generate_pipes" and "at function: _on_pipe_timer_timeout" in the list. I've looked through the tutorial and can't seem to find what's different between the code. Any ideas what could be the problem or how to fix? Note: I don't really know what caused the crashing, because I did get it to work with the different textures for a couple runs of it.
@JacobVega
@JacobVega 7 ай бұрын
Update: I fixed it. For some reason, the problem was that the pipe scene got unlinked from the variable. Idk how it happened, but I linked it back and it works now. Again, thanks for the great tutorial!
@benderrodriguez91
@benderrodriguez91 11 ай бұрын
This was very well done, although 12 Minutes video turned into 1.5h of actually doing the steps :P
@MahmudShuaib
@MahmudShuaib Жыл бұрын
this short video style is awesome. But it helps if one knows a little Godot. i have used Godot 4 for just a week and i can easily follow along. However the classic ross will work effectively for non beginners. either way this is super cool.
@paykol3280
@paykol3280 11 ай бұрын
I love the vid dude but i have one problem when i try to run the game it has a error with $Bird.reset() and the error it gives is main.gd:24 @ new_game(): Node not found: "bird" (relative to "/root/Main"). i tried for so long how do i fix this?
@dezatoosweet
@dezatoosweet 10 ай бұрын
I think it's because your 'bird' has a lower case b. Make the node Bird and it should be okay.
@paykol3280
@paykol3280 10 ай бұрын
@@dezatoosweet I'll try thanks
@theo.researcher
@theo.researcher 2 ай бұрын
@@paykol3280 Did it worked?
@paykol3280
@paykol3280 2 ай бұрын
@@theo.researcher yes
@uh7123zz1azxcv
@uh7123zz1azxcv Жыл бұрын
thanks for the tuts Russ... I really don't like the copy paste approach that you've been using in your latest couple of vids. The old coding along style was much better imho. hope you can return to using that instead
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Thanks for the feedback, it's good for me to know whether people like the new approach or not. I thought people would find the code along style repetitive plus those videos take much longer to make so I switched it up. I have a few more short style tutorials planned so once they are done, I'll look at which style is preferred and try to find a balance.
@TrentonSchultz
@TrentonSchultz 2 ай бұрын
Why dosnt my ground loop i think i did the code right but my window dosnt look like yours
@neverrDiee
@neverrDiee 3 ай бұрын
the floor at the bottom is moving too fast, I don't understand why.
@LucasMagalhães-n2t
@LucasMagalhães-n2t Жыл бұрын
Thank you for sharing your knowledge and for being straightforward.
@kshawn2579
@kshawn2579 Жыл бұрын
THIS MAN IS SO UNDERRATED! HOW DOES HE NOT HAVE 1 MILLION SUBS??
@ZackSadlygrove
@ZackSadlygrove 9 ай бұрын
When I press the mouse button nothing happens
@Lazy2Dev
@Lazy2Dev 8 ай бұрын
Did you set up the input correctly in project settings?
@Multifandomguy
@Multifandomguy 4 ай бұрын
I have a glitch where the pipes don't appear at all, is there any reason ?
@Not_Broken14
@Not_Broken14 3 ай бұрын
thank you this was my first godot game and i leard how to use godot and how to make a game. THANK YOU
@simranjhahere
@simranjhahere Жыл бұрын
loved it !💯💯
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Glad to hear it!
@PabloJFerri
@PabloJFerri 11 ай бұрын
Hello im making this in Godot 4.2 and i did all the same and this happen Invalid get index 'position' (on base: 'previously freed'). and the game instantly crash and doesnt let me even execute it. 2 breakpoints are marked. 1) Line of code 10: var screen_size : Vector2i 2) Line of code 60: for pipe in pipes: pipe.position.x -= SCROLL_SPEED
@itsCH4PO
@itsCH4PO 9 ай бұрын
I had this same issue. Be sure to add the "pipes.clear()" function below this call. It did this because the "queue_free" method removes the pipes from memory, so it's basically looking for a "null" value when accessing the position.x of the pipe in the pipes array (even tho we're generating new pipes... idk memory management 101 I guess). Not sure if this exactly helps, I'm still learning myself! LMK what happens.
@Aoi_Hikari
@Aoi_Hikari 6 ай бұрын
the amount of times i pause in this video prob equivalent to me watching a 1 hour tutorial, but still, i pretty much prefer this type of fast pace tutorial
@MoviesManiac-u7r
@MoviesManiac-u7r 5 ай бұрын
i have a problem my charecter is stuck at one place and doens not go up nor done when clicked it just rotates but does go up or down please help
@TechnicalParadox
@TechnicalParadox 11 ай бұрын
Bird_hit doesnt work for me, My bird continues flying through pipes even after 9:00
@MannaHay
@MannaHay 10 ай бұрын
I had the same issue. Turns out I'd created the node in the Main scene as a "Node2D" instead of just a "Node"
@aija_papaya
@aija_papaya 10 ай бұрын
Have the same issue. I am trying to make a computer game for the first time at all. Don't understand whats nok... My main scene is "Node". @TechnicalParadox did you solve your issue and how?
@TechnicalParadox
@TechnicalParadox 10 ай бұрын
@@aija_papaya I didn't specifically fix this issue but I took a Godot course on udemy. Make sure the area or body of the bird has the on_area_entered or on_body_entered linked to the script. If that's good then check the collision properties of the bird and of the pipes, other than that I can't think of anything else it wouldve been
@aija_papaya
@aija_papaya 10 ай бұрын
I found my issue :) In Pipe script the function "func _on_body_entered(body):" was not connected. :)
@TechnicalParadox
@TechnicalParadox 10 ай бұрын
@@aija_papaya sorry I had typed out a reply earlier but must not have sent it. I never fixed this issue in this project but I took a udemy course for godot since and yeah it's either that the script wasn't connected to the signal or the collision layers are messed up, or you have a mix up between area/body and are using wrong function
@JetFireHawk
@JetFireHawk 7 ай бұрын
my bird doesnt go up and down and i am unsure why i have written your code exactly but my bird just flaps once for a second and then just stays in the animation and doesnt move properly he kind of jolts and tilts a bit but its llike he is stuck with a pin to a certain place. is this because i used a different texture than you?
@brianmcelroy9922
@brianmcelroy9922 7 ай бұрын
I love these videos, but sometimes you go too fast and I miss some code lines or something
@samhagan292
@samhagan292 2 ай бұрын
it keeps on telling me Line 5 (UNUSED_PARAMETER):The parameter "body" is never used in the function "_on_body_entered()". If this is intended, prefix it with an underscore: "_body". and Line 69 (INTEGER_DIVISION):Integer division, decimal part will be discarded.
@BenitoBeni1414
@BenitoBeni1414 5 ай бұрын
Im trying to make it go to the center but it just stays on the corner
@szymon-io8ju
@szymon-io8ju 8 күн бұрын
maybe go into 2D at the top and drag it to the center
@DanielAlvarado-yl3gb
@DanielAlvarado-yl3gb Ай бұрын
how can i download the assets?
@gamepatio1010
@gamepatio1010 8 ай бұрын
do you know why when pipes spawn sometimes there are space between pipes and ground ? and when new game pipe spawn in front of bird ?
@txmasgxmes3597
@txmasgxmes3597 Жыл бұрын
Very helpful and I did learn! Thank you!
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Glad to hear!
@soup_bone
@soup_bone Жыл бұрын
I think I'm cursed i followed this to the exact and i got to 4:05 mins and nothing happened lmao
@Mosaeedaly
@Mosaeedaly Жыл бұрын
same
@Mosaeedaly
@Mosaeedaly Жыл бұрын
found the solution . in bird script i changet this line from = to += ( velocity.y += GRAVITY * delta)
@rezashir3873
@rezashir3873 Жыл бұрын
really nice. thanks a lot
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Thanks!
@hownotto4067
@hownotto4067 Жыл бұрын
I would definitely do code along. it seems like your niche. because people like me who are web developers and want to dabble in video game creation... so those people will love code explanations and walk throughs to increase their knowledge
@mtrtortue5044
@mtrtortue5044 14 күн бұрын
Thanke you it's very useful
@CodingWithRuss
@CodingWithRuss 13 күн бұрын
Thanks :)
@mtrtortue5044
@mtrtortue5044 13 күн бұрын
@@CodingWithRuss i am trying to do like your tutoriel now i am lerning so much withe you
@gustavk5331
@gustavk5331 7 ай бұрын
Hi - When creating the bird you say "Save the scene in that same folder". What do you mean? When I try to save the scene in the same folder as the background, I just get an errorr.
@AliAhmed-ow5qu
@AliAhmed-ow5qu 2 күн бұрын
When i type velocity it show as undefined
@AliAhmed-ow5qu
@AliAhmed-ow5qu 2 күн бұрын
I am on godot 3.6
@BaconEggsRL
@BaconEggsRL 3 ай бұрын
Curious how to solve the "clipping" issue with the bird and the area 2d ground node I'm guessing this is due to gravity force?
@Astral100
@Astral100 Ай бұрын
Stretch collision up a bit higher above ground. No real way to fix it besides using StaticBody2D node instead of Area2D. But that brings its own set of issues.
@ArthurHuizar
@ArthurHuizar 7 ай бұрын
how do i stop Godot from anti-aliasing my pixel art?
@dodsonboys
@dodsonboys 7 ай бұрын
Go into the project settings, under rendering and textures set the default texture filter to nearest instead of linear
@alegamesita4944
@alegamesita4944 3 ай бұрын
hey man when i try to execute the code at 8:03 the " ground_height = $ground.get_node("Sprite2D").texture.get_height()" gives me the cannot call method 'get_node' on a null value not sure what i did wrong any help is appreciated
@killthebeastofwar
@killthebeastofwar Ай бұрын
Im also having the same issue
@Cr7isthenumber1
@Cr7isthenumber1 8 ай бұрын
where can i get the animation
@G-Major
@G-Major Жыл бұрын
I'm new to Godot and I appreciate the example here, thank you. I do have a quick question. Is it normal for autocomplete to sometimes not work? Like while I was following along, when I typed pipe.position or $Bird.falling, it wouldn't autocomplete position or falling. Does it behave that way for you too?
@saifee7899
@saifee7899 Жыл бұрын
yeah it did the same thing for position for me im pretty sure its jsut random
@CubeOrSomething
@CubeOrSomething Жыл бұрын
Hard to follow along, try to show slower steps.
@oxxn111
@oxxn111 Жыл бұрын
thank you!
@SoledadGamingofficial
@SoledadGamingofficial 8 ай бұрын
Is this work on mobile?
@CodingWithRuss
@CodingWithRuss 8 ай бұрын
I haven't tried
@SoledadGamingofficial
@SoledadGamingofficial 8 ай бұрын
Thanks
@SoledadGamingofficial
@SoledadGamingofficial 8 ай бұрын
Can you make tutorial for mobile?
@Not_Broken14
@Not_Broken14 3 ай бұрын
my bird does not work idk why
@crowxar
@crowxar 9 ай бұрын
I wish you would explain why instead of just a step-by-step.
@usateam.
@usateam. 6 ай бұрын
Мне кажется или спрайты дергаются?
@algorif4715
@algorif4715 10 ай бұрын
hopefully with this i can finally get the grade i need to pass one of my tech classes, thank u for giving what was supposed to be gave
@paulpenguin2003
@paulpenguin2003 11 ай бұрын
i'm learning godot but it is just so Madding!
@Hpa-k5w
@Hpa-k5w Жыл бұрын
its says that it doesnt exist
@PaulJonesy
@PaulJonesy Жыл бұрын
Deep.
@VertiDOOM
@VertiDOOM 7 ай бұрын
Please actually explain what your doing at a slower pace, if I just blindly follow along as a beginner I won’t actually learn anything.
@mrfrog0913
@mrfrog0913 Жыл бұрын
Thanks
@vietlongpham
@vietlongpham 11 ай бұрын
6:48
@realovik
@realovik 10 күн бұрын
i am starting! 5 jan 2025 3:19pm gmt+6
@kamnachhoker6860
@kamnachhoker6860 Жыл бұрын
Plz make a 3d foghting game in ursina of guns plz
@reyzet.
@reyzet. 3 ай бұрын
bang ini godot berapa
@azariasbarboza9774
@azariasbarboza9774 Жыл бұрын
Tengo un problema, mis tubos se colocan muy abajo dejando poco y casi nada de espacio para que el ave pueda pasar, cómo lo puedo solucionar?
@Multimassar
@Multimassar 3 ай бұрын
what a great video for people with ADHD 😂 loved it, I implemented this and it would be very good to have a second video to polish this game, like handling different screen sizes...
@Hello-cy4gx
@Hello-cy4gx Жыл бұрын
@Coding With Russ Can you make tutorials for roblox studios please? I wanna learn how to make games in roblox but I don't have that much money. Thanks
@Andr3_Real
@Andr3_Real 8 ай бұрын
it works!
@Ranamo_
@Ranamo_ 3 ай бұрын
Great tutorial but FOR THE LOVE OF GOD SLOW DOWN. Ma smol brain cant keep up
@LaurenOmessi
@LaurenOmessi 11 ай бұрын
Hello nice video, would it be possible to send me the entire code please?
@sleepy_b0iz
@sleepy_b0iz Жыл бұрын
thank you for the tutorial but when i opened it up it said E 0:00:00:0637 Main.gd:28 @ new_game(): Node not found: "ScoreLabel" (relative to "/root/Main"). Method/function failed. Returning: nullptr scene/main/node.cpp:1634 @ get_node() Main.gd:28 @ new_game() Main.gd:20 @ _ready() i did just copy paste the code so im guessing thats where i went wrong but how do i fix it or do i just gotta redo the code parts?
@CHHATRAPHULARA
@CHHATRAPHULARA Жыл бұрын
yeah, really wanted solution to this. I also copy and pasted code and followed all the tutorial but same error is occuring. Please explain whats the issue
@CHHATRAPHULARA
@CHHATRAPHULARA Жыл бұрын
finally found the error, in code of github underscore"_" was missing like _body, _delta and another mistake was i wrote names of node in small letters but in code it was capital
@The-MaliX
@The-MaliX Жыл бұрын
you cant just copy and paste it in the video you gotta type with us
@MEMEBEAN6960
@MEMEBEAN6960 Жыл бұрын
You see what is written, just read
@chrisnorthall8317
@chrisnorthall8317 Жыл бұрын
I actually find this more complex than just coding the game from scratch!😅
@Hpa-k5w
@Hpa-k5w Жыл бұрын
this is a lot of code
@itscine
@itscine 11 ай бұрын
my pro hacker coder friend says ur code is DOODOO please make easier code for us beginners UwU!!!!! TY DADDY mwahh!!!
@cerealkilleryt
@cerealkilleryt 3 ай бұрын
I am a complete amateur and I tried this tutorial, and about half way through when I tested it, it stopped working. I know it wasn't the best idea, but I decided to keep going until the end. On the way though, I encountered several more errors and I was wondering if anyone could help me. Also it should be noted I did this with a standard Sprite 2D and not an animated one. My scripts: Main: extends Node @export var pipe_scene : PackedScene var game_running : bool var game_over : bool var scroll var score const SCROLL_SPEED : int = 4 var screen_size : Vector2i var ground_height : int var pipes : Array const PIPE_DELAY : int = 100 const PIPE_RANGE : int = 200 func _ready(): screen_size = get_window().size ground_height = $Ground.get_node("Images").texture.get_height() new_game() func new_game(): game_running = false game_over = false score = 0 scroll = 0 $ScoreLabel.text = "SCORE: " + str(score) $GameOver.hide() get_tree().call_group("pipes", "queue_free") pipes.clear() generate_pipes() $Bird.reset() func _input(event): if game_over == false: if event is InputEventMouseButton: if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: if game_running == false: start_game() else: if $Bird.flying: $Bird.flap() check_top() func start_game(): game_running = true $Bird.flying = true $Bird.flap() $PipeTimer.start() func _process(delta): if game_running: scroll += SCROLL_SPEED if scroll >= screen_size.x: scroll = 0 $Ground.position.x = -scroll for pipe in pipes: pipe.position.x = SCROLL_SPEED func _on_pipe_timer_timeout(): generate_pipes() func generate_pipes(): var pipe = pipe_scene.instantiate() pipe.position.x = screen_size.x + PIPE_DELAY pipe.position.y = (screen_size.y - ground_height) / 2 + randi_range(-PIPE_RANGE, PIPE_RANGE) pipe.hit.connect(bird_hit) pipes.scored.connect(scored) add_child(pipe) pipes.append(pipe) func scored(): score += 1 $ScoreLabel.text = "SCORE: " + str(score) func check_top(): if $Bird.position.y < 0: $Bird.falling = true stop_game() func stop_game(): $PipeTimer.stop() $GameOver.show() $Bird.flying = false game_running = false game_over = true func bird_hit(): $Bird.falling = true stop_game() func _on_ground_hit(): $Bird.falling = false stop_game() Pipe: extends Area2D signal hit signal scored func _on_body_entered(body: Node2D) -> void: hit.emit() func _on_score_area_body_entered(body: Node2D) -> void: scored.emit() Bird: extends CharacterBody2D const GRAVITY : int = 1000 const MAX_VEL : int = 600 const FLAP_SPEED : int = -500 var flying : bool = false var falling : bool = false const START_POS = Vector2(100, 400) func ready(): reset() func reset(): falling = false flying = false position = START_POS set_rotation(0) func _physics_process(delta): if flying or falling: velocity.y += GRAVITY * delta if velocity.y > MAX_VEL: velocity.y = MAX_VEL if flying: set_rotation(deg_to_rad(velocity.y * 0.05)) elif falling: set_rotation(PI/2) move_and_collide(velocity * delta) func flap(): velocity.y = FLAP_SPEED Ground: extends Area2D signal hit func _on_body_entered(body: Node2D) -> void: hit.emit Game Over: extends CanvasLayer signal restart func _on_restart_button_pressed() -> void: restart.emit() Any advice would be helpful 😊
@thesomeone2nd
@thesomeone2nd 10 ай бұрын
Well done thx dude
@CodingWithRuss
@CodingWithRuss 10 ай бұрын
Glad it helped
How to Make Minesweeper In Godot | Beginner Tutorial
1:39:11
Coding With Russ
Рет қаралды 9 М.
Recreate FLAPPY BIRD in just 13 MINUTES (Godot Game Engine)
13:23
Eli Cuaycong
Рет қаралды 81 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
save hours of programming using curves | Godot Tutorial
2:50
AceSpectre
Рет қаралды 23 М.
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 14 М.
How Much Money my Mobile Game Made (After 1 month)
5:24
SimonKv GameDev
Рет қаралды 1 МЛН
How to make a Video Game - Godot Beginner Tutorial
1:17:12
Brackeys
Рет қаралды 2,7 МЛН
How To PLAN your Game as a Solo Developer
16:26
Heartbeast
Рет қаралды 534 М.
How to Code (almost) Any Feature
9:48
DaFluffyPotato
Рет қаралды 712 М.
Making a Game About Weak Points
21:27
Emis
Рет қаралды 868 М.
Finite State Machines in Godot 4 in Under 10 Minutes
7:16
Bitlytic
Рет қаралды 337 М.
If You Can't Make Games After This Video...
4:37
Fredyy
Рет қаралды 1 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.