drwhut / tabletop-club

An open-source platform for playing tabletop games in a physics-based 3D environment for Windows, macOS, and Linux! Made with the Godot Engine.
https://tabletopclub.net
MIT License
1.3k stars 57 forks source link

Shuffling a deck of cards sometimes causes the game to lag. #243

Closed drwhut closed 1 year ago

drwhut commented 1 year ago

Describe the bug When shuffling cards, especially when doing so with the mouse, there is a chance the game's frame rate will tank. It seems to only happen with release builds of the game, and almost always happens when there are exactly 52 cards in the deck - removing one card from the top stops the lag, but placing it back onto the deck cause the lag to occur again.

To Reproduce Steps to reproduce the behavior:

  1. Go into a singleplayer instance.
  2. Spawn a deck of 52 playing cards.
  3. Pick up the deck and shake the mouse to shuffle it.
  4. See the frame rate drop.
  5. Remove one or more cards from the deck, and shuffle as before.
  6. See the frame rate remains consistent.

Expected behavior Shuffling the 52-card deck should not tank the frame rate.

Environment Linux (Fedora 37)

Version master

Additional context This bug also occurs in v0.1.0-beta1.

drwhut commented 1 year ago

After further testing, I cannot replicate this issue anymore, on both v0.1.0-beta1 and v0.1.0-beta2... will close until it comes up again. My current theory is that it was a previous update of my desktop environment (GNOME) that was causing the issue before.