I LOVE YOUR VIDEOS MAN! Even tho i dont learn to make games anymore. Your input on Godot tutorials is one of the most important ones out there! Good luck with these videos, long time fan! 10/10
Awesome tutorial! I think that concrete examples like this are the best way of learning Godot. Not sure if I'll be implementing a minimap in my game yet, but this video made me more confident about the prospect of doing it. Thanks for this great channel.
I made some helpful tips for beginners (this will work if you followed the entire video tutorial first): 1. To remove the minimap icon, send this signal when the object is destroyed, along with a link to itself so the map can identify it: emit_signal ("removed", self) 2. To add an icon to the minimap, create this method in the minimap script: func new_marker (item): var new_marker = icons [item.minimap_icon] .duplicate () grid.add_child (new_marker) new_marker.show () markers [item] = new_marker item.connect ("removed", self, "_on_object_removed") and call it when the object is spawned and set the object itself as a parameter. For example: My final part of the weapon drop script: func drop_weapon (): var pickup = Global.instantiate_node (weapon_pickup, $DropPoint.global_transform.origin) find_parent ("Stage1"). get_node ("Interface / MiniMap").new_marker (pickup) Please pin this at the top, I hope this helps beginners a lot)
Hey Ivan, a little confused on removing the minimap icons. Would the emit_signal be on the mob script or is an Events autoload script needed? Also, would you need to remove the instance from the array and the sprite? I could very well be overthinking it.
After spending much of the day and evening working on this, I did manage to figure it out. I'll post what I came up with to show others if they are having similar issues. Any feedback would be greatly appreciated as I am still very new to this and have much to learn. :D Mob.gd Events.emit_signal("object_destroyed", self) queue_free() Events.gd: signal object_destroyed(target) Minimap.gd func _ready() -> void: Events.connect("object_destroyed", self, "_remove_object") func _remove_object(target): var object_destroyed = markers.keys().find(target) var object_sprite = markers.get(target) background.remove_child(object_sprite) markers.erase(target) I would also like to thank @KidsCanCode for this tutorial. your videos help me a lot with the game that I am working on. :D
Your video modules titled "Godot Recipe", are so useful, thank you estimated instructor, I have always considered you the best, thanks for giving you the time to make these videos, you are a great human being
when an object is removed, even when i call removed from the object before queue_free(), i get the error "Invalid get index 'position' (on base: 'null instance')"
Really cool. For some reason, though, my markers don't stay inside the outline... and I can't figure out where to fix it... lol, thanks though! I'll probably figure it out sooner or later.
Thank you! This was very helpful. However, since all this logic is calculated at every tick in the process function, do you see this hindering performance if there are a lot of units?
Lots of things happen every frame. As with any performance issue, it's meaningless to guess. *If* the game has a performance issue, and *if* profiling leads to the conclusion that this code is contributing to it, *then* I'd think about changing something.
Can you make a video on how to make a visual novel themed game on godot like a new layer of screen pop up when the player try to interact with objects or NPCs. I heard that Godot is better with UI than game-maker studio, but i don't see much videos on how to make it.
this could be a preference thing, but how would I go about using a texture of the map as the background of the minimap but zoomed in, I think maybe using a shader could work, but I am not a shader pro so I am not sure how to do this, have any ideas?
I've been struggling with this for several hours, if I am spawning in my enemies after the game starts it creates a slew of markers on the minimap, giving it a streak effect of generated markers. I can't have the update map code in _ready because the enemies don't exist yet, and I've tried using signals but cannot for the life of me get in working. Any advice?
Hi Chris, thank you for your tutorials. Can you make a series about helping new programmers better 'visualize' vectors? Perhaps a series of exercises that visually create the vectors on the screen. So that we can see how they actually work?
Anybody have some tips on how to implement a map outline that resizes along with the icons? I've implemented a dirty way to show it, but I lose the zoom functionality, because it resizes from the wrong pivot point
How about resize it to Vector2(0, 0) so that if the item re-enters the screen it'll not need to be instantiated afresh and can just scale back up into a visible icon?
Sorry, I'm a little late XD, but, could you teach us how to fix that little bug in the end of the video? about nodes that disappear during the gameplay, it could be through messege, plz! Thanks for it in advance, and for all your videos!!
I solved XD, here's the code (it is only in the minimap script): if !is_instance_valid(item): # it checks if it is valid(not queued free) markers.erase(item) # it erases the marker from the script else: # < -----you have to use this identation level! var obj_pos = (item.position - get_node(player).position) * grid_scale + grid.rect_size/2 if grid.get_rect().has_point(obj_pos + grid.rect_position): markers[item].scale = Vector2(0.5,0.5) else: markers[item].scale = Vector2(0.2,0.2) obj_pos.x = clamp(obj_pos.x,0,grid.rect_size.x) obj_pos.y = clamp(obj_pos.y,0,grid.rect_size.y) markers[item].position = obj_pos Thx a lot for your videos bro!
I'm pretty sure I spoke about how to do it. Emit a signal from your nodes that connects to the minimap and removes that item from the "markers" dictionary.
I love how you handled the resizing of the UI. It almost seems like magic.
Godot's UI Containers are magic. Well, first they drive you crazy, but once you get used to how they work, they're great. :P
Thank you for all your Godot recipes and videos, they help a lot.
I LOVE YOUR VIDEOS MAN! Even tho i dont learn to make games anymore. Your input on Godot tutorials is one of the most important ones out there! Good luck with these videos, long time fan! 10/10
I'm so excited to try to implement this into my game! You're an inspiration 😍
Awesome tutorial! I think that concrete examples like this are the best way of learning Godot. Not sure if I'll be implementing a minimap in my game yet, but this video made me more confident about the prospect of doing it. Thanks for this great channel.
I made some helpful tips for beginners (this will work if you followed the entire video tutorial first):
1. To remove the minimap icon, send this signal when the object is destroyed, along with a link to itself so the map can identify it:
emit_signal ("removed", self)
2. To add an icon to the minimap, create this method in the minimap script:
func new_marker (item):
var new_marker = icons [item.minimap_icon] .duplicate ()
grid.add_child (new_marker)
new_marker.show ()
markers [item] = new_marker
item.connect ("removed", self, "_on_object_removed")
and call it when the object is spawned and set the object itself as a parameter.
For example: My final part of the weapon drop script:
func drop_weapon ():
var pickup = Global.instantiate_node (weapon_pickup, $DropPoint.global_transform.origin)
find_parent ("Stage1"). get_node ("Interface / MiniMap").new_marker (pickup)
Please pin this at the top, I hope this helps beginners a lot)
thanks
Hey Ivan, a little confused on removing the minimap icons. Would the emit_signal be on the mob script or is an Events autoload script needed?
Also, would you need to remove the instance from the array and the sprite?
I could very well be overthinking it.
After spending much of the day and evening working on this, I did manage to figure it out. I'll post what I came up with to show others if they are having similar issues. Any feedback would be greatly appreciated as I am still very new to this and have much to learn. :D
Mob.gd
Events.emit_signal("object_destroyed", self)
queue_free()
Events.gd:
signal object_destroyed(target)
Minimap.gd
func _ready() -> void:
Events.connect("object_destroyed", self, "_remove_object")
func _remove_object(target):
var object_destroyed = markers.keys().find(target)
var object_sprite = markers.get(target)
background.remove_child(object_sprite)
markers.erase(target)
I would also like to thank @KidsCanCode for this tutorial. your videos help me a lot with the game that I am working on. :D
i have issues adding icons , do you have a github with the minimap?
Such an unappreciated channel. Give a thumb up for the knowledge and sharing experience at least!
Your video modules titled "Godot Recipe", are so useful, thank you estimated instructor, I have always considered you the best, thanks for giving you the time to make these videos, you are a great human being
TYSM, Great Video as always! Keep it up! This will really help me in my game! I've been wanting a vid like this forever!
Finally.. . minimap
when an object is removed, even when i call removed from the object before queue_free(), i get the error "Invalid get index 'position' (on base: 'null instance')"
Try to validade if is_instance_valid(object_to_remove) before trying to access position of the object
@ just a little late on that reply there
Could you make a video on how to do an inventory system with possibly a character screen?
3:42 this was all 48 for me. I don't know why it took me so long to figure out. 64 didn't work, it like quadrupled the whole thing.
Can we get a tutorial on how to remove the objects from minimap
Really cool. For some reason, though, my markers don't stay inside the outline... and I can't figure out where to fix it... lol, thanks though! I'll probably figure it out sooner or later.
Very well done!
This guy a legend!
17:42
LOL
Thanks for all the good content. A suggestion: Can you do a fighting game in Godot?
Of course you can
Thank you! This was very helpful. However, since all this logic is calculated at every tick in the process function, do you see this hindering performance if there are a lot of units?
Lots of things happen every frame.
As with any performance issue, it's meaningless to guess. *If* the game has a performance issue, and *if* profiling leads to the conclusion that this code is contributing to it, *then* I'd think about changing something.
Can you make a video on how to make a visual novel themed game on godot like a new layer of screen pop up when the player try to interact with objects or NPCs. I heard that Godot is better with UI than game-maker studio, but i don't see much videos on how to make it.
Can you make tutorial on
Minimap like metroidvania games has
For example Castlevania and bloodstaind
how can i make it circular?
this could be a preference thing, but how would I go about using a texture of the map as the background of the minimap but zoomed in, I think maybe using a shader could work, but I am not a shader pro so I am not sure how to do this, have any ideas?
I've been struggling with this for several hours, if I am spawning in my enemies after the game starts it creates a slew of markers on the minimap, giving it a streak effect of generated markers. I can't have the update map code in _ready because the enemies don't exist yet, and I've tried using signals but cannot for the life of me get in working. Any advice?
Hi Chris, thank you for your tutorials. Can you make a series about helping new programmers better 'visualize' vectors? Perhaps a series of exercises that visually create the vectors on the screen. So that we can see how they actually work?
Great suggestion, thanks!
@@Kidscancode It would also be great to implement an overlay with the vector variables in action.
Anybody have some tips on how to implement a map outline that resizes along with the icons? I've implemented a dirty way to show it, but I lose the zoom functionality, because it resizes from the wrong pivot point
I could create this tutorial and the others you did in C#.
And a series of FPS.
Have channel?
thank you
how do I delete the icon if it's outside the grid?
How about resize it to Vector2(0, 0) so that if the item re-enters the screen it'll not need to be instantiated afresh and can just scale back up into a visible icon?
Sorry, I'm a little late XD, but, could you teach us how to fix that little bug in the end of the video? about nodes that disappear during the gameplay, it could be through messege, plz! Thanks for it in advance, and for all your videos!!
I solved XD, here's the code (it is only in the minimap script):
if !is_instance_valid(item): # it checks if it is valid(not queued free)
markers.erase(item) # it erases the marker from the script
else: # < -----you have to use this identation level!
var obj_pos = (item.position - get_node(player).position) * grid_scale + grid.rect_size/2
if grid.get_rect().has_point(obj_pos + grid.rect_position):
markers[item].scale = Vector2(0.5,0.5)
else:
markers[item].scale = Vector2(0.2,0.2)
obj_pos.x = clamp(obj_pos.x,0,grid.rect_size.x)
obj_pos.y = clamp(obj_pos.y,0,grid.rect_size.y)
markers[item].position = obj_pos
Thx a lot for your videos bro!
I'm pretty sure I spoke about how to do it. Emit a signal from your nodes that connects to the minimap and removes that item from the "markers" dictionary.
@@Kidscancode really? which video? and about adding new markers?
can this be used for 3D games?? i want to use it for my maze 3d game :)
Certainly. Use the x/z coordinates of the objects to position them on the minimap.
does this same code work with a 3d game?
Certainly. You can project their positions onto the 3D grid (using their x & z coordinates).
Can you make your voice even more fake scratchy?
Bonjour merhaba please make a game released and we want to play your game
Hello
dialogue pliss
I don't understand.
@@Kidscancode Sorry,could you practice making dialogues
@@Giovaniniii there is actually some Assets in the asset library that handle dialogue systems.