Secret weapon how to promote your YouTube channel
Get Free YouTube Subscribers, Views and Likes

Slay the Spire Clone Godot 4 Tutorial: Card Dragging u0026 State Machines (02/08)

Follow
GodotGameLab

Welcome to the second installment of the "Slay the Spire Clone in Godot" series using the powerful Godot engine!
In this beginnerintermediate tutorial, we'll continue our game development journey by implementing the main card dragging mechanic for our game. Let's dive in!

Part 2 Card Dragging Mechanic & State Machines
00:00 Slay the Spire demo
00:40 End result
01:29 Creating the CardUI Scene
08:23 Adding CardDropArea and Hand to the Battle Scene
13:06 State Machine explanation
15:43 Basic CardUI and CardState base class scripts
18:47 Coding the CardStateMachine
21:06 Adding Nodes and Scripts for the 4 States
23:00 Coding the Base State
25:09 Coding the Clicked State
26:21 Coding the Dragging State
30:27 Coding the first version of the Released State
30:55 Hooking up all the systems, fixing bugs
42:10 Using the CardDropArea do detect if we should reset the CardUI
46:27 Fixing one last bug and wrapping up

‍ Source code for Season 1 on GitHub:
https://github.com/guladam/deck_build...

Learn More About Godot:
Godot Docs:
https://docs.godotengine.org/en/stabl...
https://docs.godotengine.org/en/stabl...

Heartbeast:
   • Godot 4 Tutorial  Heart Platformer  

Card Fanning Tutorial by Bramwell:
   • How I Fan 3D Cards in Godot 4  

☕ If you want to support me, buy me a coffee at:
https://kofi.com/godotgamelab

Connect with Me:
Instagram:   / adamgulacsi  
Twitter:   / adam_gulacsi  
Mastodon: https://mastodon.gamedev.place/@guladev

#godot #godotengine #2d #tutorial #godotgamelab

posted by staglieloo2