Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Encountered a bug: When I die, the game keeps counting score as my "dead" player keeps going across land behind the scenes.


It's 219 bytes, it's not that clever! When you die it simply displays 'game over' along with incremented timer. Because the entire logic is inside a `setInterval` call it never gets stopped.

setInterval is set to update in 9 ms intervals - I assume because whilst it's probably more playable (easier) at higher intervals doing so would require additional bytes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: