I just finished an early version of a Twitter Bot which generates playable Zork-like levels and post them via Twitter. Levels can be interacted with by replying to the bots tweets.
You can check out the bot at @DemocraticZork on Twitter.
The game itself was inspired by a recent conference I attended called Roguelike Celebration. This conference covered a lot about Procedural Generation, and near the end a few people talked about their Twitter bots which would generate random Emoji scenes of gardens and forests and fishtanks. This bot is sort of an amalgamation of several concepts covered at the conference.
The level generator can be found at github.com/tlhunter/node-roguelike. This is the Grid with Keys and Locks Level Generator generator. For terrain generation I am using a perlin noise generator, dividing the results into different “strata”, and then grabbing a terrain type from an array. This helps ensure similar terrain is likely to be adjacent and the map has a more natural flow to it.
The room adjectives are randomly selected from an array of predefined entries, classified by terrain type. For example a Cave can be Damp, a Meadow can be Gloomy, etc.
When deciding actions to perform I simply poll for replies on the last created tweet. The most popular action wins.
If the project is popular I will keep updating it. Some improvements I’d like to make include adding a minimap, puzzles, bad guys, and if the Twitter API ever supports it, creating polls for voting for actions.
Latest posts by Thomas Hunter II (see all)
- Recent Concerns about Node.js Security - 2018-06-12
- Creating and Integrating a Node Lambda function with API Gateway - 2018-04-02
- Developing Cobalt Dungeon using Phaser and Cordova - 2018-03-27