tonybaloney / vscode-pets

Adds playful pets 🦀🐱🐶 in your VS Code window
https://tonybaloney.github.io/vscode-pets
MIT License
2.18k stars 345 forks source link

Pets chase slower pets causing glitches #585

Open tonybaloney opened 2 months ago

tonybaloney commented 2 months ago

One of the features of the "friendship" graph that's built into vscode-pets is that friends will chase each other.

See https://github.com/tonybaloney/vscode-pets/blob/main/src/panel/states.ts#L343

But the pet will chase at it's own pre-set speed, so when you have something fast like a horse chasing a dinosaur it glitches by running back and forth:

screenshot 2024-06-21 at 10 06 58

There are a two solutions for this that I can think of:

  1. Friendships are made with pets of similar speeds - add condition here https://github.com/tonybaloney/vscode-pets/blob/main/src/panel/pets.ts#L108-L110
  2. The chasing pet moves at the speed of it's friend - https://github.com/tonybaloney/vscode-pets/blob/main/src/panel/states.ts#L363

Other ideas welcome. This issue is up for grabs

lahrims commented 1 month ago

Hi, @tonybaloney ! I would love to work on this issue, Please assign this issue to me.