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.
Thanks a lot, it helped me to move forward with my game!
That's cool! Good luck with your game.
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.
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.
hi, I have error in line 14 "error(14): Invalid arguments to operator '-=': 'float, vec2'."
In what part of the video? (time) The line numbers change while the code is added.
Thanks for your nice Shader, is there a posiibility to link the beginning of a Explosion to a Firework sound?
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.
@@FencerDevLog If i find a solution i will post it here :)
@@FencerDevLog I find a solution :), i made a lot of firework and play random explosion sounds ^^, is not linked, but looks and sound nice
@@Kadad65 Good job! 😎