I've used Unity for 7 years and watched hundreds of tutorials, now I've been using Godot for 2 weeks and this was the most professional and informative tutorial I've ever seen. Thank you very much for this quality tutorial!
You should multiply values by delta in _process functions to make it framerate-independant. Pretty intersting, I wonder how much projectiles can you run before having severe drops.
Yes! Absolutely true, I forgot about it... But then I at least have the tick which gives it some stability as it only updates every 0.05s. I tested scenes with a pretty absurd amount of bullets and so far everything seems fine. But yeah. It a lot of stuff happens with all those iteration through the points array.
At 13:59, your animated explosions are below the Collider (the wall), but at 15:21 your animated explosions are above the Collider. I've tried increasing the Z Index of the ExplosionSprite and the Bullet, and tried decreasing the the Z Index of the Collider, but nothing brings the animated explosion above the Collider, and I don't see any controls for moving the AnimationPlayer up/down in the Z Index. How did you get your animated explosion to appear above the Collider? Thanks!
Ah, I forgot to edit that part in. Damn. The Smoke trails scene is added to the Teststage. In the Teststage _process function, the global_position of the Smoketrail is set to get_global_mouse_position()
Just to clarify on Raffa's reply (since I'm fairly new to this and had to experiment), I think the teststage.gd script should initially look like: ~~~ extends Node2D onready var smoketrail = $Smoketrail func _process(_delta): smoketrail.add_point(get_global_mouse_position()) ~~~
Haha! I though nobody would care/notice. I finally was too annoyed by my 1 year no-cut covid hair... So I cut it myself and can finally not wear a beanie without looking like a wookie.
Good Video!. I am in Godot 4 but still dont manage to understand how you made func add_point() to work , when it also overrides the property add_point , and also you never seem to call that function anywhere , lol
So... In Godot 4 it's not possible to override native methods. How can I make this work on the newer version? I cannot wait to be able to make this work, it looks amazing!
I was kinda able to work around this, but I need to remove the "set_as_top_level(true)" because the trail is above everything but when I do this the trail spawn in a random location... Do you know why this happens?
gone back to this as its a wealth of knowledge. i got a question in the game.gd script on line 45 rocket.direction = Vector2.RIGHT.rotated(rand_range(-0.6, 0.6)) looks like it can be repurposed for my project. i have a shoot function that i want to shoot projectile at mouse location, currently my shoot function just shoots forward, as im using a muzzle to spawn the bullet, to rotate the muzzle i used look at mouse position qhwn hte project was using top down assets, now though i'm using 2dside scroller graphics so look at mouse position no longer works, I've tried a number of workarounds but my head logic doesn't cut it.still new to godot. func fireshot(): mouse_posi = get_local_mouse_position() target = get_angle_to(mouse_posi) var bullet = BULLET_SCENE.instance bullet.transform = mouse_posi.global_position() bullet.global_rotation = global_rotation get_parent().add_child(bullet) how would u used .rotated(get_angle_to(mouse_posi)) to shoot a projectile at the mouse cursor as my experimentation comes up with nothing, its important to note this is in the kinematic body player scripted
Yes, that was a very unfortunate edit. I added a script to the teststage where I do that. You can find the line here: github.com/RPicster/Godot-Advanced-Trails-Examples/blob/8867bb9b7ea6ae740c002afc5a3b6821b73c7469/src/Scripts/teststage.gd#L12
@@picster man, this tutorial is so well done but I could not get the exact same result. I did some workaround to make it look like laser, but I'm not convinced yet, I feel there's a lot to do to make it better. Do you think about creating a new tutorial like this to create similar results on the new Godot version? I'm creating a 2d shoot'em up game and this effects would make it look so much better!
@@picster haha no biggie :) But great stuff came out of that video, for example one person implemented variable Line2D width based of that into the Godot Core :D (cant recal their name) Yeah after that tutorial I had no idea what to record next so I was just not doing anything, but considering making more :)
@@kryperdev It's a ton of work making tutorials, even if they look really simple. So I can totally understand you stopped making tutorials. But the ones on your channel are really cool, so would be great to see more :)
@@picster oh for sure it is difficult. For me main struggle is to keep good flow. However after speaking with some people on Godot facebook group they gave great suggestion to code it before hand and keep that as reference of separate screen :) Also thank you, and sure will do more, got plan to make destructable tilemap tutorial with "sprite chunking" :) Hmmm if you would be interested I could drop you a link once it is out on YT (maybe implementation for Franz Fury for some game elements?)
@@kryperdev yes, planning it out is pretty helpful. I don't plan to add and tilemap based things to Franz, but I'm looking forward to the tutorial, I'm sure it's very interesting!
Hi, I have a question about your video at 4:57. It appears that you overwrote "add_point" function in Line2D and then called the native one in the end using a short code ".add_point(point_pos, at_pos)". I tried this in Godot 4, but it didn't work for me. I also attempted it using "super.add_point(point_pos, at_pos)" but that didn't work either. Do you know how to rewrite it in Godot 4? Thanks!
@@picster Thank you for your reply. Finally, I discovered that Godot throws an error: "The method add_point() overrides a method from the native class Line2D. This won't be called by the engine and may not work as expected." It seems that rewriting any native function in the original class has been prohibited in Godot 4. Since I am still a newbie with the engine, please let me know if you have any ideas to work around this problem.
@@vcd200044 you can just write your own method and from there, call the original add_point() method. Then call your own method instead of the (in G3) overwritten add_point()
i know it´s been two years, but Godot 4 won´t let me overwrite the add_point() function. Do you know of a fix or other tutorial that can help me with a similar effect but in Godot 4? Most i found don´t really have the same look / behavior. The removal of the tween node really messed things up at first, but now that I got that handled, the overwrite really seems to be the last straw causign issues
25 minutes programming and tons of separate scripts just to make bullets looks better - you do it WRONG Godot. At least I understand now why Godot is still a failure.
Engineering unique solutions for specific effects is why a lot of people code.. The component structure is very intuitive and powerful but if it's not your thing I'm tickled you feel so confident as to express your distaste under a clear assumption that anyone cares :)