Тёмный
Michael Games
Michael Games
Michael Games
Подписаться
Join me and learn how to make video games! Working with Godot 4, Aseprite, and more...
Комментарии
@bobbodaskank
@bobbodaskank 22 часа назад
Sometimes I feel like I'm not keeping up with the amount of information you're providing. However, the structure of your code makes it pretty easy to read through it a couple times until I understand how it works. I think I'd be doing myself some favors if I kept notes, lol.
@1tsKayne
@1tsKayne День назад
thank you for this tutorial! Looking forward going through this now :) Hope you add some quest/dialogue system as well in the future
@lightmilky918
@lightmilky918 День назад
To anyone not wanting to click on each "download" button to download the assets, use the following code in your browsers console (click "F12" and go to "console"). Thanks for the author for these assets and tutorials of course, but I do not want to click on each and every. // Get all elements with the class 'download_btn' var downloadButtons = document.querySelectorAll('.download_btn'); // Iterate through each button and simulate a click downloadButtons.forEach(function(button, index) { setTimeout(function() { button.click(); // Wait a bit for the modal to open, then click the download button in the modal setTimeout(clickDownloadInModal, 1000); }, index * 2000); // Adjust the interval between clicks if slow});
@LigerX25
@LigerX25 2 дня назад
Thanks for the tutorials!
@Tuto1902
@Tuto1902 2 дня назад
For anyone else watching, this helped me solidify all the things I'm learning here. Go get yourself a different asset pack with a top down character and try to recreate what you've done here but from memory alone. Fail a few times. Then reference the code for this project to refresh your memory BUT DON'T COPY/PASTE. Fail a few more times and then rewatch whatever video you need. Do this a few times with a few different asset packs. This will commit your knowledge to memory and you'll be able to do it with your eyes closed in no time (not literally, but you know what I mean)
@aliensnail7173
@aliensnail7173 3 дня назад
Incredible. You are making learning godot a breeze.
@jasmine1995-wt3ry
@jasmine1995-wt3ry 3 дня назад
thank you
@Tuto1902
@Tuto1902 3 дня назад
I'm new to Godot and making games in general and I'm thoroughly enjoying this series. Please don't stop making content around this subject. You're doing great!
@dominikstandardowy166
@dominikstandardowy166 4 дня назад
Oh my god Michael you saved my sanity! I'm quite new to the Godot in fact i started doing games 3 days ago with month of programing background in python. I was losing my mind trying to stop the guy from running after pressing the button by myself with something like this. Not only that Because you are going such a lengths with writing code it's really easy to understand!! Thx you for your materials! "If direction.x == -1: anim.play("move_right") if direction.x == 0: anim.play("idle_right")"
@simspam87
@simspam87 4 дня назад
Thank you.
@rovshansalahov1446
@rovshansalahov1446 4 дня назад
Amazing video! I need help though ;--; For some reason when I run the game, I get a black screen and the debugger says " Invalid get index 'player_damaged' (on base: 'Nil') Help pliz
@LigerX25
@LigerX25 4 дня назад
I am getting this on line 45. Line 45 "INCOMPATIBLE_TERNARY):Values of the ternary conditional are not mutually compatible." what does that mean?
@Necrincito
@Necrincito 4 дня назад
Please tutorial platform2d gathering, (the player cuts a tree), (the tree shakes due to the cut), (put the number of times the action is performed to cut down the tree), (example: large tree 5 times, medium tree 3, small tree 2) , (when you reach the maximum number of times the tree falls in the animation), (and drop objects on the tree)
@genarc2166
@genarc2166 5 дней назад
so far... this is the best Godot tutorial I have ever seen. Cant wait to share this to my fellow game dev friends!!! Thanks for the series, i'm looking forward for this exciting journey! keep doing more videos!
@genarc2166
@genarc2166 5 дней назад
AND ITS FREE!! love it
@AutMouseLabs
@AutMouseLabs 5 дней назад
What an excellent breakdown of how to use a state machine! I have created machines using the string method but this is much better. It reminds me of lifecycle functions in some other game engines. Cheers for these excellent tutorials!
@CptTiki
@CptTiki 6 дней назад
Very Cool! i can see some breakable pots - with buttons that were depressed until they're broken - opening the door. One question though! most of these dungeon levels usually have some sort of "platform" that can be raised or lowered. lets say - lava floor tile, but when you press a button a walkable tile comes up to let you walk across the area. is there some way to programatically change the tiles? or would you add a dungeon door type object - that's not visible... but then the lava would still hurt you - cause its only visual? anyway - Ideas for another episode!! Loved this one!!
@MichaelGamesOfficial
@MichaelGamesOfficial 5 дней назад
Yeah, the raised bridge/lava is a great idea - I'll give that one some thought :)
@Godot-sv7jk
@Godot-sv7jk 6 дней назад
Thanks! :))
@Sea_Frieren
@Sea_Frieren 6 дней назад
good job
@CptTiki
@CptTiki 6 дней назад
Brilliant! love how we can see what's in the chest from the editor - error checking is great to! Doesn't look like GODOT is very good at stepping through code - or at least, as far as i can tell so far. so any type of help in fixing your levels is greatly appreciated :D
@MichaelGamesOfficial
@MichaelGamesOfficial 5 дней назад
You can debug your code in Godot, and set break points, etc. Not something I do a whole lot, perhaps it's even worth making a video covering the different ways you can debug and troubleshoot (I think someone else requested such a video)
@AliceMadTeaParty
@AliceMadTeaParty 7 дней назад
very good tutorials! thx man
@7_rlz_714
@7_rlz_714 7 дней назад
very good tutorials!
@wolfHKS
@wolfHKS 7 дней назад
Do you use discord? Please share your videos with the godot discord community
@MichaelGamesOfficial
@MichaelGamesOfficial 7 дней назад
As weird as it sounds I hadn't posted these in the discord community until I read your comment... thank you!
@wolfHKS
@wolfHKS 7 дней назад
My friend shared this video of yours. wow thank you !
@Furina-lc9dl
@Furina-lc9dl 7 дней назад
hope there will be some more videos on this topic
@MichaelGamesOfficial
@MichaelGamesOfficial 7 дней назад
I've got one more dungeon Puzzle video in the works - and I am considering more :)
@Furina-lc9dl
@Furina-lc9dl 7 дней назад
thank you
@truonghai9999
@truonghai9999 7 дней назад
wow thank you
@moonnight9474
@moonnight9474 7 дней назад
thank you
@filipporottigni2743
@filipporottigni2743 7 дней назад
Thank you for these tutorials, keep doing them!
@CptTiki
@CptTiki 7 дней назад
So i think i've missed something - when i click load - the player moves, health restores - inventory stays empty. i close the pause menu, and reopen the pause menu - and my inventory has actually loaded correctly. Its like - its not updating when i press load - it has to reopen the pause menu for it to pull in the data?
@CptTiki
@CptTiki 7 дней назад
ah - i know what it was - i'm a dummy - i didn't put hide_pause_menu() on the save and load functions - cause i was leaving the menu open until i manually closed it.. so yours is probably doing the same thing - its just auto hiding the menu during the load function.
@MichaelGamesOfficial
@MichaelGamesOfficial 7 дней назад
@@CptTiki Yeah, I do hide the load menu in the pause_menu.gd script in the _on_load_pressed() function. There is a "data.changed" signal we are hooked into in the InventoryUI Script - but if that doesn't do the trick you could have the inventory UI script connect to the SaveManager.game_loaded signal and clear/reload your inventory UI when it emits, something along those lines?
@CptTiki
@CptTiki 8 дней назад
Got going on inventory - and like 3 hours slipped by :D
@CptTiki
@CptTiki 8 дней назад
Forgot to comment on this one - i was excited to get the inventory loading!! :D
@CptTiki
@CptTiki 8 дней назад
Another great one Michael! Nice wrap on the inventory - time for mob drops!!
@aliensnail7173
@aliensnail7173 8 дней назад
the goat
@NastroGG
@NastroGG 8 дней назад
Do you happen to have a discord that I could join to ask a few questions?
@bobbodaskank
@bobbodaskank 9 дней назад
For some reason, my character is moving WAY slower than yours. I had to set the move_speed float all the way to 3000 to get him to move similarly to yours. The rest of the code matches exactly as far as I can tell. Any ideas? Edit: never mind, I didn't notice you'd gotten rid of the "* delta" on the velocity set.
@CptTiki
@CptTiki 9 дней назад
My char would change scene - and then instantly go back to the original scene - back and forth. If anybody has the same bug as me - this is how i fixed it: i increased the offset from 16 to 32. I think where i set up my character, and i moved the sprite up / down - its not the same place that Michael did.. so the offset needed to be a bit larger than just half a tile.
@owlcaps7876
@owlcaps7876 9 дней назад
There is a weird bug for me, the destroy animation doesn't play when the destroy_down stc. animations are played but they do work when I scrub the timeline, also it works properly in the destory sprite animation player, both when the animation is played and scrubbed. Have created it multiple times again but it just sticks to the first frame. Hard to debug.
@guillermomoral8344
@guillermomoral8344 8 дней назад
It happens the same to me. Did you find any solution?
@owlcaps7876
@owlcaps7876 8 дней назад
@@guillermomoral8344 I didn't spend much time to figure out how to fix it, because I removed it and created a separate effect scene that I instantiate when the enemy dies to play an animation. It's much more robust and general way to handle effects than build it into enemy scene. Just make a new scene with animation player and instantiate it and play animation, then queue_free() it after the animation ends. It has the benefit of getting rid of the enemy shadow as well because the enemy is removed instantly when it does.
@guillermomoral8344
@guillermomoral8344 8 дней назад
@@owlcaps7876 Thanks! Sounds like a good solution
@Tuto1902
@Tuto1902 3 дня назад
@@owlcaps7876 had the same issue and your idea helped a lot. The only thing I didn't do is queue_free() the effect scene since I added it as a child of enemy, which calls queue_free() on itself at the end of the destroy state, removing the effect child. I added a new track to the destroy_* animations to set the shadow sprite visibility to false in the first frame. It's unnoticeable since the destroy effect plays on top and hides the shadow disappearing.
@owlcaps7876
@owlcaps7876 3 дня назад
@@Tuto1902 Nice to hear I could help. The reason why I made the effect standalone and que itself free is that I can now use the effect node freely on things that don't necessarily exit the scene, like some effect animation on the player for example, the animation node gracefully handles it self on every situation, encapsulating the component and it's logic.
@CharlieGorrill
@CharlieGorrill 9 дней назад
My player is not getting into the stun state and not taking damage. The _take_damage() function in Player is never being invoked. My code seems to be the same aside from naming convention differences from previous videos. I think it might have to do with hit and hurt box collision layer and mask issues? Does anyone know what the layer and mask for player and enemy hit and hurt boxes should be?
@MichaelGamesOfficial
@MichaelGamesOfficial 8 дней назад
In my project I have the following: Player > HitBox: Monitoring: OFF Monitorable: ON Collision: Layer 2 only Collision Mask: NONE Enemy > HurtBox: Monitoring: ON Monitorable: OFF Collision Layers: NONE Collidion Mask: Layer 2 Only Not sure if your issue is there, but I hope that helps.
@CptTiki
@CptTiki 10 дней назад
Hey, @Michael , Would it not be better to have the player that gets spawned - tell the player manager Player_spawned = true - instead of just using a timer on the ready func? seems like, once you get some larger levels, that .25 seconds might not be enough - so you might introduce errors down the line?
@pushox8505
@pushox8505 10 дней назад
I love your tutorial! thanks for that but for me in the SetDirection() function the Part: if new_direction == cardinal_direction: return false, make a bug: If i click twice left or any kind of the direction, my animation sent no state to the UpdateAnimation and i "walk" left in the Idle animation 😀 *I hope i was clear to understand* -> Click double Left, in the first left click the animation start but than stop and click again left, the animation is gone and i walk in the idle animation :-D -> i have to comment this 2 lines out and it worked. So idk why this code should be useful ? 😕
@CptTiki
@CptTiki 10 дней назад
Hey Michael, any reason why you didn't make the HP for the player an export value?
@MichaelGamesOfficial
@MichaelGamesOfficial 8 дней назад
That's an excellent question... and not one I really have an explanation for.... other than I felt no desire to change the HP in the inspector? :)
@CptTiki
@CptTiki 8 дней назад
@@MichaelGamesOfficial :D fair enough!
@owlcaps7876
@owlcaps7876 10 дней назад
Some helpful changes for code readability for your future self, make the spooky one line direction_id into a function, call it with a verbose name like get_direction_index, then store the steps into variables with descriptive names like var bias = 0.1 and var angle = (direction + cardinal_direction * bias).angle() also var normalized_angle = angle / TAU etc. typehint the function with inputs as Vector2 for direction and cardinal_direction and int for dir_size, return value should be int, something like below func calculate_direction_index(direction: Vector2, cardinal_direction: Vector2, dir_size: int) -> int: var direction_bias = 0.1 var angle = (direction + cardinal_direction * direction_bias).angle() var normalized_angle = angle / TAU var direction_idx = int(round(normalized_angle * dir_size)) return direction_idx use like var direction_idx: int = calculate_direction_index(direction, cardinal_direction, DIR_4.size())
@CptTiki
@CptTiki 10 дней назад
Had to figure out my first debug session for this one.. without the destroy, I could hit the slime 3 times.. once I added the destroyer script it instantly destroyed the slime.. woof! 😂
@CptTiki
@CptTiki 10 дней назад
godot doesn't have the debugging suite that unity and visual studio do, but i eventually found it- in case it helps somebody in the future: make sure you change the enemy_state_destroyed init function to connect to the enemy_destroyed signal.. if you leave it at enemy damaged it just goes poof any time you hit an enemy :D
@CptTiki
@CptTiki 10 дней назад
Love the slime! I can see the next couple videos coming from this.. hit the slime.. slime hits you… destroy the slime and drop some items… all coming together!
@CptTiki
@CptTiki 10 дней назад
Oof! I can imagine having a LOT of plant entities like that in the scene tree… any way of doing that without having do drag nodes to the playground? Maybe paint them on with a second tileset?? Can you paint scripts??
@CptTiki
@CptTiki 10 дней назад
Glad you fixed the player walking.. pretty elegant solution too!
@CptTiki
@CptTiki 10 дней назад
I’m glad you named the hurt boxes.. I’ve always reused the hit boxes.. got confusing.. this makes a lot more sense
@CptTiki
@CptTiki 10 дней назад
Dood.. the self pathing is righteous! I’ve never seen that in any engine.. liking Godot more and more!
@CptTiki
@CptTiki 10 дней назад
I’ve always loved a good state machine!