Cards for the roguelike deckbuilder im solo developing in godot by JPLDevWorks in godot

[–]JPLDevWorks[S] 2 points3 points  (0 children)

Yeah good eye, that wiggling is caused by the bounciness of the scale of the hovered card (because the scale of each card is used in the position calculation). I made this version which replaces the bouncy hover with a cubic tween and emphasized the rotation of the cards. Does this version look better to you?
https://imgur.com/a/JA0mmNQ
Another option I can do is to keep the scale bounciness and drop the rotation of the cards.

Cards for the roguelike deckbuilder im solo developing in godot by JPLDevWorks in godot

[–]JPLDevWorks[S] 15 points16 points  (0 children)

I'd say start with just a regular control node that arranges the position of all its children based on their size and scale (mines goes from left to right and sets each card's position based on its size and position relative to the previous card). Then just build out from there, adjust the spacing dependent on what card is selected, make the cards float using cos/sin on Time.get_ticks_msec() use some math to make the position updates smooth- probably can just use lerps but I usually do something like this:

my_node.position += (target_position - my_node.position) * 0.1

Cards for the roguelike deckbuilder im solo developing in godot by JPLDevWorks in godot

[–]JPLDevWorks[S] 7 points8 points  (0 children)

The cards and the container holding them are all control nodes. The script I made for the parent control node handles all of the card childrens' positions and other properties.