How to Make a Bullet Hell Projectile Pattern Generator in Godot 3

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 98

  • @NADLABS
    @NADLABS 3 ปีที่แล้ว +22

    I LOVE IT WHEN PPL USE PAINT TO EXPLAIN STUFF! MADE MY DAY!

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +2

      LOL good to know

    • @ligthking0014
      @ligthking0014 23 วันที่ผ่านมา

      WAZAZAZAZAZZAZA,AZAIAIAIAIAIAIAIAIIAAIAIAIAIAIAIAIAIIAIAIAIAIAIAIAIAAIIAIAIAIAIAIAIAIAIAIAI🚶‍♂️🚶🚶‍♀️🚶‍♂️🚶🚶‍♀️🚶‍♀️🚶‍♂️🚶🚶‍♂️🚶‍♀️🚶‍♂️🚶🚶🚶‍♂️🚶‍♀️🚶‍♂️🚶🚶‍♂️

  • @hamsterbyte
    @hamsterbyte ปีที่แล้ว +6

    Great tutorial, I do have one problem and it is nothing that anyone else is going to care about, but I still feel it is worth noting. Instead of teaching people to use a built in Godot function to rotate and place the bullet spawners, I would have preferred the trigonometry done out in long form so that information would be applicable across any engine, regardless of API. A brief description of how to use sine and cosine to calculate points in a circle would have been slightly less consumable, but infinitely more informative. Keep up the great work, you earned a sub. It's also worth mentioning the benefit that object pooling may have on this sort of system vs. instantiation.

  • @massiveCheese
    @massiveCheese ปีที่แล้ว +14

    I just did it in Godot 4 - It worked great. Really happy with this tutorial. Just needed to change instance to instantiate when creating the bullet and I did my global vars a little different

    • @DoubleDotStudio
      @DoubleDotStudio ปีที่แล้ว

      I did the same but I'm using it for a player attack and so it calls when you shoot but after a couple of shots it gets very laggy. I don't know why.

    • @massiveCheese
      @massiveCheese ปีที่แล้ว

      @@DoubleDotStudio Not sure what to try other starting the profiler in the debugging tools and see if you spot anything using up loads of time

    • @DoubleDotStudio
      @DoubleDotStudio ปีที่แล้ว +2

      @@massiveCheese I worked it out. Because I use a if Input its creating new spawn points every time in the same place so it spawns more and more bullets every time you shoot. This can be fixed by using a final for loop where you queue free the spawn points and re create them the next time you shoot.

    • @TheTeyKiller
      @TheTeyKiller 10 หลายเดือนก่อน

      how did you do the global vars differntly im currently stuck on the issue and cant figure it out.

    • @massiveCheese
      @massiveCheese 10 หลายเดือนก่อน

      @@TheTeyKiller It was a while back. I was thinking I must have done them differently because of changes between godot 3 and 4 but I'm not sure that's true. I have: @export var rotate_speed: int = 30 for example, instead of it being a const.

  • @real_rumin
    @real_rumin 3 ปีที่แล้ว +25

    This is very nice ! I really loved the mathematical explanations as a lot of people just tend to skip them or simply explain them without any illustration. You on the other hand explained everything with grace. Looking forward to more tutorials from you..

  • @WrathOfWood
    @WrathOfWood ปีที่แล้ว

    awesome tutorial, now things are spinning and shooting, pretty flexible too

  • @Kuma04
    @Kuma04 3 ปีที่แล้ว +3

    Really good tutorial, comprehensible, and just plain awsome.

  • @avikarefin7137
    @avikarefin7137 3 ปีที่แล้ว +3

    Choosing the "No comment" instead of "Default" will create scripts with no comments and when creating new script, Godot will remember your previous choice. I am yet to see a video where it is used. Seeing everyone delete the comments after the creating scripts every time made me write this comment... Great video BTW.

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +3

      Omg this is life changing. Thanks for that tip!!

  • @poseiso
    @poseiso 3 ปีที่แล้ว

    to the point, easy to understand and nice sounding keyboard
    i approve

  • @DrCJBoduma
    @DrCJBoduma 3 ปีที่แล้ว

    Thanks really helpful tutorial. just to echo all the others who appreciated the maths explanation too.

  • @BurritoByte
    @BurritoByte 11 หลายเดือนก่อน

    Very excellent video! This helped greatly for a game I'm working on for a game jam.

  • @AgnisNeZvers
    @AgnisNeZvers 3 ปีที่แล้ว +11

    I love seeing more tutorial makers.
    Amazing explanation!

  • @anfi8673
    @anfi8673 3 ปีที่แล้ว +1

    Now I think i can take part to the jam.

  • @Chevifier
    @Chevifier 3 ปีที่แล้ว +7

    6:44 Just a tip about adding stuff to the root. Whenever you instance object you should realistically be adding it to the last child of the root. Its fine for small projects but I found out the hard way working on a large project with loading screens and reparenting.
    i.e
    var root = get_tree().get_root()
    var current_scene = root.get_child(root.get_child_count()-1)
    current_scene.add_child(bullet)

    • @Chevifier
      @Chevifier 3 ปีที่แล้ว

      While running the game you can click the remote button in the scene tree view to see where youre adding the bullets in real time

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      @@Chevifier Thanks for the tip, I'll definitely keep that in mind!

    • @DankMemes-xq2xm
      @DankMemes-xq2xm 2 ปีที่แล้ว

      What happens if you add stuff to the root?

    • @Chevifier
      @Chevifier 2 ปีที่แล้ว

      @@DankMemes-xq2xm they stick around if you dont remove them when switching scenes. Most time stuff we add we usually remove before like bullets for example so we don't notice. get_tree(). get_root() is the top most node for the entire project not the current scene. I may be wrong though ill double check

    • @DankMemes-xq2xm
      @DankMemes-xq2xm 2 ปีที่แล้ว +1

      @@Chevifier Ohh, now that I think about it I don't think I add to the root either, I just add stuff as a child directly below the scene, or in a ySort below the scene.

  • @whoeverofhowevermany
    @whoeverofhowevermany 3 ปีที่แล้ว +5

    I've looked at a lot of these kinds of tutorials and I feel qualified to say that this is very well done

  • @JAY_BE955
    @JAY_BE955 3 ปีที่แล้ว +4

    Awesome tutorial You my friend got yourself a new subscriber!!

  • @alfredogrande413
    @alfredogrande413 ปีที่แล้ว

    Thank you very much, your explanation was very understandable, I was able to use this algorithm in another game engine as well

  • @Biffmin
    @Biffmin 2 ปีที่แล้ว +3

    This tutorial is so damn good. For once, It actually feels like I'm getting somewhere with making a game.

  • @collinvisser7108
    @collinvisser7108 3 ปีที่แล้ว

    Thank you so much doing LD48 - This really helped

  • @snesmocha
    @snesmocha 3 ปีที่แล้ว

    i've been looking for a tutorial like this for a while, thanks a lot

  • @hass89
    @hass89 3 ปีที่แล้ว

    Top top toppppp quality. Great job Robyn!

  • @AncientSionX
    @AncientSionX ปีที่แล้ว

    Such a fantastic showcase. Hats off.

  • @crunchylemon10
    @crunchylemon10 3 ปีที่แล้ว +1

    GREAT TUTORIAL GOT YOURSELF A NEW SUB!

  • @arcticblitz9630
    @arcticblitz9630 ปีที่แล้ว +1

    Great tutorial! I do have one issue however, even though I have spawn_point_count set to 8, it’s only spawning one bullet at a time

  • @abstractqqq
    @abstractqqq 3 ปีที่แล้ว +2

    Hey there! Thank you for the video. I am making a bullet hell game rn. I want to point out that having a timer for each bullet might not be the optimal way. One central timer is in fact enough as long as you connect it to each bullet and run a count down function in each bullet. Another little trick to save you two lines of code is to put queue_free directly when connecting on_killTimer_timeout by going into the advanced options. :)

  • @PlayWithFurcifer
    @PlayWithFurcifer 3 ปีที่แล้ว +1

    Nicely done :)

  • @pixelsurfergames
    @pixelsurfergames ปีที่แล้ว

    Thanks! :) It works also in 3D and within UE5 ;)

  • @IsaacPeek
    @IsaacPeek 3 ปีที่แล้ว +3

    UuuhhhMmmaaazziiing! Exactly what I needed for a number of projects I want to do! I enjoyed your explanations and look forward to future videos. Are you signed up for the bullet hell jam?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +2

      Thanks! I'm not participating in the bullet hell jam unfortunately. I have no time for game jams these days :(

  • @OneBillionHorses
    @OneBillionHorses 3 ปีที่แล้ว

    What a neat tutorial! Excited for future videos ^^

  • @RyanScottForReal
    @RyanScottForReal 3 ปีที่แล้ว

    Love it keep making tutorials!

  • @SnowyyAI
    @SnowyyAI ปีที่แล้ว

    Great tutorial, thanks!

  • @chaoscifer1483
    @chaoscifer1483 2 ปีที่แล้ว

    this helped me a lot! thank you!

  • @whynotusepaper468
    @whynotusepaper468 2 ปีที่แล้ว

    Love the tutorial sooo good!

  • @lexflow2319
    @lexflow2319 3 ปีที่แล้ว

    That is some clean code!

  • @davidmurphy563
    @davidmurphy563 3 ปีที่แล้ว +2

    Oh goodness this was the most relaxing tutorial ever, I could feel the stress melting away. :) I really like the pixel art on your logo, was that your own work?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      Haha it's great that this video helped you relax, I suppose those patterns are almost a bit hypnotic 😂 And yup my logo is my own work, glad you like it!

    • @davidmurphy563
      @davidmurphy563 3 ปีที่แล้ว

      @@bitbirdy Wow, that's really top draw work on the pixel art, hats off to you. Genuinely impressed. I do 3d so I can kinda go off a reference image in blender but with pixel art there's no getting around the need for talent (that's the step in the creative process I usually skip...)
      Well I look forward your next stress therapy video, oops, I mean godot tutorial. ;)

  • @RadioactiveMoth
    @RadioactiveMoth 3 ปีที่แล้ว

    Nice, I'll have to use this when I inevitably make a shmup game.

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      Yea go for it!

  • @uovo
    @uovo 2 ปีที่แล้ว

    cool tutorial, i cant help but ask what keyboard did you use at the time you posted this video? i like the sound.

  • @DrNabeel20
    @DrNabeel20 2 ปีที่แล้ว

    Super useful thank you!

  • @odinmagick
    @odinmagick 2 ปีที่แล้ว

    So clever, thank you

  • @3mar358
    @3mar358 3 ปีที่แล้ว

    Thanks just what i needed :)

  • @krisitak
    @krisitak 3 ปีที่แล้ว +1

    Good job!

  • @meey-
    @meey- 3 ปีที่แล้ว

    Thank you very much , you are so talented;)

  • @xleb_bulka
    @xleb_bulka 2 ปีที่แล้ว +1

    Thx a lot

  • @jeppy4021
    @jeppy4021 5 หลายเดือนก่อน

    could you pls make this video for Godot 4? Thank you!

  • @menoobsad
    @menoobsad 3 ปีที่แล้ว

    omg i love you thanks so much

  • @caiokotan2
    @caiokotan2 3 ปีที่แล้ว +1

    Thank's guy

  • @enviycarim1000
    @enviycarim1000 3 ปีที่แล้ว

    This is so cool! I'm trying to implement something similar. Have you run into performance issues instantiating and deleting so many new bullet scenes?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +1

      I haven't tested the performance, but one of the Godot developers tweeted that obejct pooling doesn't give much benefit in Godot, so constantly instantiating and deleting scenes should be fine twitter.com/reduzio/status/1073284242086551552 . If you find that it does affect performance, implementing a bullet pool is pretty easy too.

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +1

      I also have a blog post about how to use multithreading to optimize many moving physics bodies which might be helpful! bitbirdy.dev/posts/godot-1000-bodies/

  • @NgaeGameStudio
    @NgaeGameStudio 10 หลายเดือนก่อน

    add_child and then queue_free() is totally ruin the engine to process the task. using pool system where load all the data then use em back is saving more energy.
    i dont say any of bad using this method but specially for you working on mobile. i think is, way better using ( object pooling system ) fuc# with exploration or experiment about knowing how do we spend the time to just see the optimization work well with kind of this code. but the fact dont do simple thing always save your engine workload! thank you anyway of the tutoral :D keep the good work!!

  • @zyxoto1264
    @zyxoto1264 3 ปีที่แล้ว

    I transformed this into 3d. It was so cool

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      That's awesome!

  • @Dylan-mo6bm
    @Dylan-mo6bm 3 ปีที่แล้ว

    Thank you for the tutorial! This helped me so much. How does transform.x work when you use it in the Bullet.gd code? I get that position += speed * delta will move the object in the speed direction, but how does transform.x work to make it travel like relative to the angle?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว +1

      transform.x is the "forward" direction of any node2d, so the bullet is basically going in whatever direction it's facing. At 6:58 I set the bullet's rotation which determines the bullet's forward direction.

  • @timpruitt23
    @timpruitt23 2 ปีที่แล้ว

    Wow thanks you

  • @menoobsad
    @menoobsad 3 ปีที่แล้ว

    hey i have the same exact code as you and for some reason my bullets dont appear can you help me?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      Have you made sure to assign a texture to the Bullet's sprite? If you've already done that, DM on Twitter, maybe we can figure it out!

  • @mdnghtppl0000
    @mdnghtppl0000 2 ปีที่แล้ว

    great tutorial! ive got everything working except that the rotator isnt rotating? any thoughts?
    *edit*
    figured it out :)

    • @MIGUEL-zm7iv
      @MIGUEL-zm7iv 2 ปีที่แล้ว

      i have the same problem how did you solve it

    • @Jabaz_
      @Jabaz_ 2 ปีที่แล้ว

      Having the same issue how did you fix it?

    • @JubyReboucas
      @JubyReboucas 2 ปีที่แล้ว

      @@Jabaz_ did u fixed it?

  • @g0ldhat55
    @g0ldhat55 3 ปีที่แล้ว

    Epic :>

  • @GlisteRminsk
    @GlisteRminsk 3 ปีที่แล้ว

    Well done video... BUT the only pattern it generates is (I don't know what's the correct name, but some kind of) "rotator".

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      Let me know you have any other ideas for other types of attack patterns! I might make it into a tutorial later on

    • @ralsei7170
      @ralsei7170 3 ปีที่แล้ว

      Actually you can create different types of patterns by playing around with radius and stuff.

  • @TheBigMug
    @TheBigMug 3 ปีที่แล้ว +1

    I also have Game dev channel like your

  • @shawermus
    @shawermus 2 ปีที่แล้ว

    Time to create touhou project fan game lol

  • @peptstar
    @peptstar ปีที่แล้ว

    unfortunately it did now worked, I copied everything to a T and now matter what, the bullets wont spawn, a shame really

  • @Zappro74
    @Zappro74 2 ปีที่แล้ว

    good tutorial, is there a way to make this in game maker studio 2?

  • @icephonex
    @icephonex 3 ปีที่แล้ว

    and how can you make an enemy spawner?

    • @bitbirdy
      @bitbirdy  3 ปีที่แล้ว

      It really depends on what kind of game you're making and how you want them to spawn. The official "Your first game" tutorai in the Godot Engine docs has a good example of spawning enemies randomly at the edges of the screen docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html

    • @icephonex
      @icephonex 3 ปีที่แล้ว

      @@bitbirdy thanks a lot i'm going to check that

  • @peptstar
    @peptstar ปีที่แล้ว

    tried again, now the rotator doesn't follow the enemy when the enemy is instanced in the world, and the bullets won't move, either the people in this comment section are bots or this method is really old, anyway, wouldn't recommend to people

    • @1nopinate
      @1nopinate 3 หลายเดือนก่อน

      just go learn the basic for godot , then come back... it works because we know how to actually use the algorithm there's people here who uses completely diffrent engine and have it working. So scaled down your project save this video and comeback when u have the basic understanding of the engine. Goodluck

  • @yujukiyuuki7203
    @yujukiyuuki7203 6 หลายเดือนก่อน

    Thank you for script 😢