Slay the Spire Clone Godot 4 Tutorial: Card Visuals + Logic, Mana Management (05/08)

8,409
0
Published 2023-12-03
Welcome to the fifth installment of the "Slay the Spire Clone in Godot 4" series using the powerful Godot Engine! 🎮
In this beginner-intermediate tutorial, we'll continue our game development journey by overhauling Card Visuals, implementing Card Logic and Mana Management for the game. Let's get coding!

🚀 Part 5 - Card Visuals + Logic, Mana Management
00:00 - Demo
00:44 - Actually Using the Arrow We Added Last Episode
03:18 - Card Visual Overhaul (step 1)
05:19 - Card Visual Overhaul (step 2)
09:51 - Card Visual Overhaul (step 3)
14:16 - Card Visual Overhaul (step 4)
20:01 - Creating the ManaUI Scene
26:56 - Implement the Effects System
34:15 - Making Cards Playable (step 1)
45:27 - Making Cards Playable (step 2)
49:03 - Card Disabling and Visual Feedback for Unplayable Cards
58:42 - Updating Card Reparenting so CardUIs Keep Their Original Position

👩‍💻 Source code for Season 1 on GitHub:
github.com/guladam/deck_builder_tutorial/tree/seas…

🎓 Learn More About Godot:
Godot Docs:
docs.godotengine.org/en/stable/getting_started/ste…
docs.godotengine.org/en/stable/getting_started/fir…

☕ If you want to support me, buy me a coffee at:
ko-fi.com/godotgamelab

🔥 Connect with Me:
Instagram: www.instagram.com/adamgulacsi/
Twitter: twitter.com/adam_gulacsi
Mastodon: mastodon.gamedev.place/@guladev

#godot #godot4 #godotengine #2d #tutorial #godotgamelab

All Comments (21)
  • @Greeesey
    Another fantastic video, been learning a lot with this series! Also if any Macbook users have trouble dragging nodes into the script, use cmd + drag instead of control + drag. Took me way too long to figure that out lol
  • @Bad.At.Guitar
    Woooo if you're reading this, you're halfway done with season one, congrats! Thank you for these videos dude
  • @andrewg5373
    Just commenting just in case any one else has this happen to them. If you drag and drop your nodes into the script as he does around 9:50 and your script autocompletes to "@onready var panel = $Panel" instead of "@onready var panel: Panel = $Panel" then go into your editor settings and turn on Type Hints under Text Editor > Completion.
  • @beta_J
    Thank you! really helpful! Awesome seeing it coming together working through these.
  • @oogie-duke
    Great, i just finished the 4th part and was wondering when this one would be released. Great timing :) And amazing work btw !
  • @TheDonValerianos
    Thanks for this part. That was amazing. I really didn't think we can go that deep with effects and virtual functions. Now I am looking forward to see how this effects complexity pays off in a future. I would also love to see an implementation of effects that modify other effects. Such as permanent damage increase or adding new mechanics to block effect via relics.
  • @CaptainDC-ji4sd
    Hey, another upload, been checking this channel everyday for the next part. Keep up the good work.
  • @rechnight
    Amazing tutorial, thanks so much for this! Been following along to test out my custom ECS framework and it's been great! For the Playable and Disabled, I ended up adding two new states to the CardUI and I think it's cleaner this way.
  • @RafaMartinelli
    I'm still following and loving the tutorial series! No typos from me this time. 🤣
  • @Ignawesome
    Great, this is what I needed! Trying to make my own mini-RPG I got stuck when trying to implement different effects. Using RefCounted is a great idea, and it seems to be very similar to what I've heard should be the Command Pattern. It's just that I couldn't find examples of this pattern used for combat systems.
  • @armarosniak
    I've been studying Godot C# on my own for six months and making a deck-building game, and a lot of progress has been made this month. Damn, I probably could have saved more time if I had found this tutorial sooner.
  • @user-ix7es4iw8b
    Amazing video, thanks for this series! I do have a question though, so after implementing the effects and assigning everything, the cards still don't work. They will disappear after being used but the stats are not updated and the crab does not disappear (which means the stats are actually not being update and it's not a visual issue). I double checked the code and it's all the same as in the video outside of a few names (I use stamina instead of mana) but all the names are correct. Any other places I should look to find errors?
  • @maliktot7182
    Hey, nice tutorials, you got yourself another subscriber. If you haven't anything planned yet, would you try making a inscryption clone in godot after this? Would be a great tutorial too.
  • @gbort1
    hooray we can finally defeat that crab!
  • @davidReyGD
    Perfect! as always, thnx! One question, do you plan to include in this tutorial the procedural map system that the original game has?
  • @DJFariel
    Hi! I'm sorry to bother you. Much appreciation for these tutorials so far. I do have a question - Why are we implementing a class for each card? It seems like the Warrior Axe Attack (and later the Warrior Slash) could be the same resource - something like "Deal Damage" resource. Why are these classes mirroring the cards rather than mirroring the effects?
  • @AirspaceSlayers
    Hi, at 2:20 you've made a _input function, is it normal i don't have it at this moment?
  • @thomasparas5668
    Hey all, encountering a bug about 20m into this video. When I hover over the cards, on_mouse_entered is never called and I never get the hover_stylebox loaded. I discovered that I'm not receiving any mouse movement from my control nodes. I created a test ColorRect in the same project, but in its own scene, and rigged it to change color on_mouse_entered, and it's not working. When I create a new project and copy/paste my ColorRect scene and script, it changes colors and works as expected. Mouse Filter for all my control nodes are set to Stop. Any ideas what could be happening?
  • @monamibob
    Great tutorial! I'm having an issue where my arrow is visible from the start. I set the arrow as hidden in the enemy scene. I re-instanciated the enemy in my battle scene, I even made a new _on_ready() in the enemy.gd script that does arrow.hide() and still, my arrow is visible when I launch the game. However if I hover over it with a card target then leave the area, the _on_area_exited() finally hides the arrow and it disapears Which other part of the code could be telling my Arrow to be visible? Is there a tracking tool in Godot that I could use to know who/what/when is telling my arrow to stay visible?