Godot 4: Learn to code a shader with fireworks (tutorial)

Поділитися
Вставка
  • Опубліковано 10 лют 2024
  • 📖 Godot 4 book: filiprachunek.gumroad.com/l/g...
    💡 Get exclusive content on Patreon: / fencerdevlog
    🔥 Godot Shaders: godotshaders.com/shader/2d-fi...
    #godot #godot4 #godotengine #shaders
    Hi everyone! This tutorial will teach you how to display a fireworks effect on the screen using a shader, which can be a nice reward after successfully completing a level in your game. Let's get started.

КОМЕНТАРІ • 11

  • @SphinxKingStone
    @SphinxKingStone 4 місяці тому

    Thanks a lot, it helped me to move forward with my game!

    • @FencerDevLog
      @FencerDevLog  4 місяці тому

      That's cool! Good luck with your game.

  • @mrdixioner
    @mrdixioner 7 днів тому

    As I noticed, the initial position of the explosion, the direction of movement of the particles and their trajectory are the same all the time. This can be seen in your video as well. Those some part of the code simply does not work. I don't know how to fix this.

    • @FencerDevLog
      @FencerDevLog  6 днів тому

      Yes, that's quite possible, although I am pretty sure that all parts of the code work. Feel free to improve the algorithm. All the code I publish in the videos is CC0.

  • @bayarabj2504
    @bayarabj2504 5 місяців тому

    hi, I have error in line 14 "error(14): Invalid arguments to operator '-=': 'float, vec2'."

    • @FencerDevLog
      @FencerDevLog  5 місяців тому

      In what part of the video? (time) The line numbers change while the code is added.

  • @Kadad65
    @Kadad65 Місяць тому

    Thanks for your nice Shader, is there a posiibility to link the beginning of a Explosion to a Firework sound?

    • @FencerDevLog
      @FencerDevLog  Місяць тому

      Thanks for watching! Unfortunately, shaders cannot communicate with other Godot components. The only way I can think of right now would be to control the start of the firework effect from GDScript, where the sound would also be played simultaneously. However, this would have to be done for each explosion individually, so the shader code would need to be rewritten a bit.

    • @Kadad65
      @Kadad65 Місяць тому +1

      @@FencerDevLog If i find a solution i will post it here :)

    • @Kadad65
      @Kadad65 Місяць тому

      @@FencerDevLog I find a solution :), i made a lot of firework and play random explosion sounds ^^, is not linked, but looks and sound nice

    • @FencerDevLog
      @FencerDevLog  Місяць тому

      @@Kadad65 Good job! 😎