vscode-pets icon indicating copy to clipboard operation
vscode-pets copied to clipboard

Pets chase slower pets causing glitches

Open tonybaloney opened this issue 8 months ago • 1 comments

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

tonybaloney avatar Jun 21 '24 00:06 tonybaloney