Making of LLemMings

Bug fixing

ChatGPT: Had to intervene and do manual bug-fixing


There was frustration. Once I figured out what it was trying to do, I realized it was _so_ close,
so ... I had to manually intervene.

>>> Prompt additions around climber was:

...
will climb up (but not down) steep dirt or rock obstacles. That means it should stick to either pixels on
the left or right of it. You can find out which direction a lemming is walking in by looking at velX (you really
only need to check obstacle in the direction it is walking). The surfaces they can climb is rock and dirt. You
can find out what is what by looking at pixel data in oldImgData.
...
It will walk like any other lemming, the only difference is that it can also ascend steeper obstacles.
...
When it is climbing an obstacles, move it upwards along Y axis at the same speed as it would as if
it was walking. But make sure the lemming move along the pixels it is climbing on (that is, on either side
of the lemming).
...
If a climber is currently climbing, we probably don't want to do the heightAdjustment as that only applies
if the lemming is walking on the ground.

As a hint, since you are struggling, you will want to put the functionality for this inside
if(this.action === "Climber") { ... }, in the appropriate place in the update function. You will probably
also need a flag to check if a lemming is currently climbing.
...
"|" is either rock or dirt too, but it's very steep and would stop a normal lemming from going further - it should climb up this obstacle at walking speed
...
The function pixelIsColor() can take several colors in the color argument, if the pixel at x/y match either of them, the function will return true.

>>> HUMAN CHEAT: I added a pause button

>>> Catch-up notes:
Backup was named: '_index - Copy (42) - lemming 1 climbs -- but need to fix some bugs manually.html'
Associated LLM context: n/a