scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

Actions that take more than 1 tick (e.g. sleep/read) show odd results with creatures wandering nearby #423

Closed scrom closed 8 years ago

scrom commented 8 years ago

e.g.

Chris Moore heads East. Chris Moore wanders in. Chris Whitworth wanders in. Wayne Stanford heads West. Wayne Stanford wanders in.

We need something that checks if #ticks > 1 then we only want to report creature movement if their start and end destinations differ and one of the 2 is the player location.

if they leave and come back, there's nothing to report. if they enter and then leave, there's nothing to report. if they enter, leave, and enter again - then we say they entered. etc.

scrom commented 8 years ago

this needs quite a lot of rework of creature.tick to handle this sensibly by the looks of things.

scrom commented 8 years ago

Fixed! :D