I\'m trying to have nodejs interact with adventure, an old text based game. The idea is to open adventure as a child process and then play the game by writing
Why isn't that initial line from the game being picked up?
I had the same problem on a project that called a compiled C++ program from node.js. I realized the problem was in the compiled C++ program: I wasn't flushing the stdout
stream. Adding fflush(stdout);
after printing a line solved the issue. Hopefully you still have access to the source of the game!