Choosing a random command sounds hilarious, but if anyone wants to guide the bot to the right solution, they might resort to spamming… would it be feasible to pick the most-liked command, or at least weight them by the number of likes?
Are memory overflows a big concern when running Frotz?
I should be able to check the input for any weird characters and the system runs inside a docker container. If someone manages to somehow execute arbitrary code they’d be contained within a tiny operating system with very limited functionality. I’ll see what I can do to ensure the docker container is as limited as possible.
I chose Frotz because it was very simple to get up and running with a plain stdin / stdout interface.
Not a major concern, but if nothing else they could definitely cause a denial of service by crashing the program. Or abuse the Twitter account for their own purposes, since the bot will tweet whatever Frotz sends it.
That said, the odds of anyone actually abusing this are slim. It’s a good idea to update your Frotz, but it’s not the end of the world to keep using the current version for your prototype.
Well it’s updated now and I’ll try to remember to update it from time to time.
I have a done a bit of work to sanitize the input from the player. My main concern right now would actually be from a buggy game. If a game were to go into an infinite loop sending output then it could potentially get the twitter bot banned for sending too many messages. It will be easy enough to mitigate this risk though.
The bot is up and running stable for now so I’ll see how far Twitter can get through Adventure before taking it offline to add more features again
I’ve done some work to make the bot recover properly if its internet connection goes down temporarily.
The bot is currently online playing Colossal Cave Adventure. Hopefully it is stable now.
There is one last important feature I would like to add. Currently it only mentions the most recent user when a command is sent. I’d like to make it so that if you interact with the bot it will mention you for a few commands so that it’s possible to keep up with the game if multiple people are sending commands.
After that I’ll be on the look for other games to play so if anyone has a game they’d like the bot to play that would work with dfrotz then let me know. I think it could be a neat way to showcase games.