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

I downloaded and played it. It didn't disappoint!

I was left wondering whether the game speeds up, though, and if so, how it works. Anyone know?



It doesn't speed up. The sed program will wait forever for input, so it has no set speed.

The helper bash script gives it input once a second.

It uses the "read" command to check for input from you, and it will wait 1 second. If it gets no input it sends the sed program an enter.

Unfortunately "read" can not have timeouts less than a second (it doesn't support fractions of a second).

If you want, you could replace "read" with a different program that accepts shorter timeouts. And presumably you could have the bash script slowly decrease the timeout.




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

Search: