Add Enemies and Traps to your GAME (Godot beginner tutorial)

🆓 FREE BONUS LESSON: cococode.net/courses/godot-me... 🆓
🎁 Support Coco Code! / cococode
🤯 Join Coco Code members: / @cococode
This tutorial/guide will show you how to add Enemies to your Godot Game. I will also teach you how to add traps (ground holes) and lives system. That way you will be able to introduce a challange to your game
--------------------------------------------------------------------------------
📋 CREDITS:
Some images have been generated using Adobe Firefly
Additional graphics: www.flaticon.com/
--------------------------------------------------------------------------------
👨‍💻 SOCIALS:
💜 Join our Discord: / discord
🔵 Follow me on Twitter: / cococodeyt
--------------------------------------------------------------------------------
🎓 YOU WILL LEARN:
- How to create enemies in Godot
- How to create hearts in Godot
- How to implement health system in Godot
- How to code jumping on enemies
- How to create Pause menu in Godot
- UI design in Godot
- How to create an animated sprite
--------------------------------------------------------------------------------
⚙️ VIDEO CHAPTERS:
0:00 - Intro
0:19 - Health points I
2:50 - Enemies I
5:32 - Traps (ground falling)
9:08 - Project cleanup
10:36 - Enemies II
13:52 - Pause menu
18:18 - Health points II

Пікірлер: 82

  • @CocoCode
    @CocoCode18 күн бұрын

    ➡FREE Bonus lesson here: cococode.net/courses/godot-mega-tutorial - Double jump ⏫ - Background parallax 🌃 - and more!

  • @Kharliito
    @Kharliito12 күн бұрын

    Thank you very much for this series of videos. I am an indigenous person from Quebec, and with these videos, I will be able to create a small 2D platformer with legends from my ancestors to interest young people in their history. I wish you a beautiful day. May the Creator protect you, my friend.

  • @CocoCode

    @CocoCode

    11 күн бұрын

    That sounds amazing! Good luck on this and your future projects! Pssst: Remember that you can access 4th video in the series here: cococode.net/courses/godot-mega-tutorial

  • @cleric4933
    @cleric493318 күн бұрын

    HECK YEAH! I have been waiting for this part!

  • @opoboi

    @opoboi

    14 күн бұрын

    Me too! I've been trying to make enemies forever and I can finally do it >:D

  • @Phoenix_Emperor
    @Phoenix_Emperor18 күн бұрын

    Omg good job! Can’t wait for part 4

  • @CocoCode

    @CocoCode

    18 күн бұрын

    Thank you! Be sure to check out the bonus video on cococode.net/courses/godot-mega-tutorial

  • @KIMSMAKINGGAMES
    @KIMSMAKINGGAMES18 күн бұрын

    it's been so long finally

  • @Hazarone
    @Hazarone16 күн бұрын

    Finally! I have been waiting for this for so long!

  • @TechnicallyRipped
    @TechnicallyRipped18 күн бұрын

    This guide is so helpful!

  • @_linkou1881
    @_linkou188113 күн бұрын

    Thanks ! Best tutorial

  • @SpiffyDEV
    @SpiffyDEV5 күн бұрын

    This is genuinely SO polished. It helped me more than those GDquest tutorials!

  • @Ralke1
    @Ralke117 күн бұрын

    very very good, each step easily followable

  • @CocoCode

    @CocoCode

    17 күн бұрын

    Thanks for the feedback! I was afraid some of the sections might be harder to follow 😮‍💨

  • @Quick_Noise
    @Quick_Noise6 күн бұрын

    Visualizing the process with animations is considered a quality content in my book. love your content. can't wait for more !

  • @Gergo_kecske
    @Gergo_kecske10 күн бұрын

    really liked this video also and really excited to go to your website

  • @user-rz5ex7pw5s
    @user-rz5ex7pw5s17 күн бұрын

    Love your tutorials so much😭💯❤‍🔥❤‍🔥❤‍🔥❤‍🔥

  • @_The_Dark_Knight_Official
    @_The_Dark_Knight_Official11 күн бұрын

    Omg yes I've been waiting for this part tysm I love your platformer series

  • @NormIy
    @NormIy10 күн бұрын

    these videos are always so well done and high quality

  • @Ogu1547
    @Ogu154710 күн бұрын

    Thank you so much! the bonus lesson was exactly what I needed. I was so frustrated by the extra parts of some tiles which the character's collision box always detected. but then your extra lesson helped me fix it.❤

  • @CocoCode

    @CocoCode

    10 күн бұрын

    Thanks! Glad you enjoyed it 🔥

  • @mariamshahin199
    @mariamshahin19915 күн бұрын

    I’ve been waiting for this for so long

  • @Shinzen996
    @Shinzen99618 күн бұрын

    Thank you! I'll try it 😊🎉

  • @Noah-pT
    @Noah-pT17 күн бұрын

    Thank you, U helped me too much, Much love

  • @mesoipextra
    @mesoipextra18 күн бұрын

    Thanks man you are really helping me with my coding journey ❤🔥🔥

  • @dcholaart
    @dcholaart15 күн бұрын

    Thanks very much. you are the best

  • @orangemonks894
    @orangemonks89417 күн бұрын

    YESSSS YESSS I LOVE YOU MAN. YOU DONT KNOW HOW MUCH YOU HELPED ME

  • @xkasley
    @xkasley18 күн бұрын

    I love your tutorials!

  • @CocoCode

    @CocoCode

    18 күн бұрын

    Thank you so much! 💙

  • @noron8967
    @noron896714 күн бұрын

    thanks, im waiting for continuation

  • @KeetoIsCultured
    @KeetoIsCultured4 күн бұрын

    I would love to see a tutorial with check points next! making a level with lots of holes on the ground and dying only for the game to restart might be quite annoying to some, is there a possibility that we get a checkpoint system in the next video?

  • @darilrafansyah5947
    @darilrafansyah594712 күн бұрын

    On 10:02 I'd usually prefer to do @export on the script and drag the scene file on the node inspector, this really helps to avoid breaking the path file if we decided to move around the mentioned scene. Oh yeah u would also need to use "change_scene_to_packed" instead for this one. Anyway, great video Coco! You've been helping me so much on my early gamedev project!!

  • @TAPSPatrik2500
    @TAPSPatrik250018 күн бұрын

    Yeah! finally I needed this so bad Heck I'm actually watching your 2nd tutorial right now for a project for school

  • @aggaming8055
    @aggaming805518 күн бұрын

    Big fan I watch all your tutorials and learn something new ❤❤❤❤😊😊

  • @mini_fox1666
    @mini_fox166618 күн бұрын

    finally after your last second godot video tutorial you made new best tutorial

  • @zinkanimater
    @zinkanimater17 күн бұрын

    thanks a lot for making such a tutorials i just started making game with your videos now i am a very good developer

  • @Nowarhia
    @Nowarhia18 күн бұрын

    NEW DROPP!!!!

  • @OllieDawson-zg6gc
    @OllieDawson-zg6gc14 күн бұрын

    Ur content has actually saved me for school

  • @dinobro3253
    @dinobro325317 күн бұрын

    YES!

  • @DAFE3blurrr
    @DAFE3blurrr18 күн бұрын

    I love you I watch you from egypt❤❤😂🎉

  • @EzPeezy091
    @EzPeezy09113 күн бұрын

    im so confused (and a little tired, it was late) i followed it exactly and when i jump on the enemies it says its been destroyed but the sprite and collisions are still there they haven't been cleared

  • @tekkerzdesigner5435
    @tekkerzdesigner543516 күн бұрын

    finallllllyyyyyyyyyyyyyyyyyyyyyy!!!!

  • @Nowarhia
    @Nowarhia18 күн бұрын

    maybe tutorial for how to add lucky blocks from mario? and power ups??

  • @entertainerq6839
    @entertainerq683913 күн бұрын

    Is anyone facing the problem in which when we touch the enemy from the side,we donot go flying in the opposite direction if we are still pressing the movement keys?

  • @zpiks6729

    @zpiks6729

    2 күн бұрын

    Yes

  • @Nowarhia
    @Nowarhia18 күн бұрын

    Spoko film, tylko brakuje mi tej rzeczy w prawym górnym rogu co pokazuje ile do nastęnego etapu :// (schociaż co ja narzekam patrząc na jakość moich filmów)

  • @CocoCode

    @CocoCode

    18 күн бұрын

    Oops 🙈 Remember to check out the video chapters for faster navigation 🏎️💨

  • @iraklichkhikvadze5056
    @iraklichkhikvadze50569 күн бұрын

    Thx for the videos, they're super insightful! Quick question: at 08:04 - why not attach the script to collision child directly? Is it because the collision is a behavioral property of the "area 3D" and needs the latter to dictate what to collide with? I'm assuming it's like with world blocks - collision alone can't do much unless it has a parent to dictate what the object is colliding against.

  • @funtimedestroyer2794
    @funtimedestroyer27943 күн бұрын

    Let's go, yes sir. Hey CocoCode can you do a gameover screen UI where you can restart from the gameover screen after you die in the levels. I'm doing that for my game but, I'm having serious trouble for implementing the feature, can you make a tutorial about it please.🙏

  • @markosaw7355
    @markosaw7355Күн бұрын

    Thanks! Could you make a tutorial how to make Isaac-like game in Godot?

  • @kostadinpetrov1253
    @kostadinpetrov125322 сағат бұрын

    Can you make a video where you attack the enemy head on with a punch pressing on a certain key. Also the enemies to move around would be cool

  • @OOGWAYnewcp
    @OOGWAYnewcp9 күн бұрын

    10:11 Disclaimer please! Now i have to change the paths again :(

  • @officialdreamplayz
    @officialdreamplayz18 күн бұрын

    👍

  • @user-if6zq4jz6s
    @user-if6zq4jz6s15 күн бұрын

    yaaaaaaaaa bro you can pley my game

  • @olivierdulac
    @olivierdulac17 күн бұрын

    I notice you always change the texture filter from "inherit" to "nearest" : why not do it globally via the top menus? (the project settings, where you set the value it inherits from)

  • @CocoCode

    @CocoCode

    17 күн бұрын

    Hey! I’m aware of this setting but I prefer to always mention it in order to avoid confusion from newcomers

  • @mohamadaldimsqi8845
    @mohamadaldimsqi884510 күн бұрын

    Finally this part has been released, but I have encounter an issue and cannot find the solution, please help me, the enemies are dying wherever my character touch them, and everything in the code is similar

  • @willuchabratucha
    @willuchabratucha6 күн бұрын

    Music in Different Areas with area2D and CollisionShape2 I am Currently developing a game for a projact at my university (simple 2D Topdown game). I have a map with 4 different areas. I want to change the background music as i enter the each area (area2D & CollisionShape2D). But i dont know how to do that. Could anyone help me?

  • @OverLord019
    @OverLord01911 сағат бұрын

    A question for anyone who can answer: when hitting on my first enemy, i get a value of 5.etc, when jumping on it i get a value of -3.etc however this enemy is rather ight up on the map. an enemy directly under it (to the lower end of the map) gets a value of -400+ and when jumped on it gets a similar value. How do i fix

  • @Histryphy.
    @Histryphy.10 күн бұрын

    Can you please name another app for a hear

  • @Sa3i_barid
    @Sa3i_barid2 күн бұрын

    hello dev i did make a good progress with ur tutorials but i lost the game file from a trojan ransomware can u help me to remove (vepi) format from my file?

  • @arkmr8426
    @arkmr842618 күн бұрын

  • @atrim.
    @atrim.13 күн бұрын

    Hey! Do you know why the function "jump_side" doesnt work for me? I copied that exact script but instead of doing a side jump, it does just a normal jump.

  • @_The_Dark_Knight_Official

    @_The_Dark_Knight_Official

    3 күн бұрын

    Do jump_slide

  • @Quick_Noise

    @Quick_Noise

    2 күн бұрын

    same problem here

  • @_The_Dark_Knight_Official

    @_The_Dark_Knight_Official

    2 күн бұрын

    @@Quick_Noise do jump_slide instead of jump_side

  • @Quick_Noise

    @Quick_Noise

    2 күн бұрын

    @@_The_Dark_Knight_Official is jump_side a function built-in godot ?

  • @_The_Dark_Knight_Official

    @_The_Dark_Knight_Official

    2 күн бұрын

    @@Quick_Noise idk I just know that jump_slide works but jump_side doesn't so it must be

  • @The_Soul_King
    @The_Soul_King11 күн бұрын

    Hello, first of all thanks for your tutorials, but I got an issue. I copied and pasted all the content we did in this video to my second level (like the hearts, the void, the enemys) but now when I touch an enemy on the second level, I just crash instead of loosing a life (killing them works tho)

  • @VictorTheVictini
    @VictorTheVictini18 күн бұрын

    Hey Coco Code? I have a question.

  • @CocoCode

    @CocoCode

    18 күн бұрын

    👋

  • @VictorTheVictini

    @VictorTheVictini

    18 күн бұрын

    @@CocoCode When I try to run my game it gives me the "Unable to initialize vulkan video driver" error... How Do I fix this? (Version 4.2.2 btw!!)

  • @snasdev2
    @snasdev217 күн бұрын

    Man what happened to unity tutorials

  • @KIMSMAKINGGAMES
    @KIMSMAKINGGAMES16 күн бұрын

    hey coco code , i start creating games after founding your channel , i started also a youtube channel , any kinds of advices can you give me, such as how to edit my videos or how to make a tutorial series

  • @xtreame_here
    @xtreame_here18 күн бұрын

    Hell yeahh!! ❤️‍🩹

  • @1Darr
    @1Darr12 күн бұрын

    12:40 I'm stuck at this point because the values for walking into the enemy and then jumping on top of the enemy are the same or at least really similar Here's my code: func _on_hit_box_area_entered(area): if area.get_parent() is Player: var y_delta = position.y - area.position.y print(y_delta) And then what it printed out: 143.92399597168 143.92399597168 btw I tried doing the body entered thing but it wasn't printing out any numbers. This was the only way I could get it to give a value

  • @darilrafansyah5947

    @darilrafansyah5947

    12 күн бұрын

    u would probably need to use on body entered instead, because the characterbody2d is inherited from the body instead of area, u should check out the signals too if it somehow not connected properly

  • @1Darr

    @1Darr

    12 күн бұрын

    @@darilrafansyah5947 still not working Edit: I figured it out eventually lol

  • @jasonwilliams8730
    @jasonwilliams873018 күн бұрын

    👍