Inspiration

With modern covid lockdowns many have had trouble connecting with friends for simple, low-effort party games like they used to. We've all moved to online platforms like Discord and Zoom to stay in touch, but sometimes we want to be able to play something simple and light-hearted together rather than a full-fledged competitive game. Thus, ShiritoriBot. A game that I've wanted to play ever since seeing it in No Game No Life, and a simple little game that can be played within Discord on the fly with minimal effort on the part of the players. even if a group only plays for 5 minutes a simple relaxing game could be exactly what they need to help get through the trials of the day.

What it does

ShiritoriBot allows members of a discord server to play a game of Shiritori within a Discord text channel. The rules are simple, each player must take turns typing out a word from the dictionary such that the first letter of each word matches the last letter of the word previous ('dog' must be followed by 'game', for example) A player is eliminated if the word is not found in a provided dictionary of over 60k words or if the word has already been used previously.

How we built it

ShiritoriBot relies on a relatively simple Java application layout built atop the Discord JDA library for integration with a discord server. Test-Driven-Development was employed for initial development of the gameplay loop logic before focus shifted to building a clean interface layer between Discord and the game logic itself.

Challenges we ran into

Perhaps one of the most frustrating challenges would be Discord's, and by extension, JDA's tendency to be somewhat unreliable with its method calls. In particular, manipulation of nicknames has some kind of rate-limit that makes leveraging usernames as a UI element somewhat unreliable and less powerful compared to what we had originally hoped.

Accomplishments that we're proud of

I am particularly happy to see that the bot does indeed run and behave about how I hoped it would. In particular the Channel Controller logic was able to be compressed down into a reasonably straightforward loop. More refactoring can certainly be done to further improve it, but the base framework is one that is much less complicated than it had originally tried to be.

What we learned

Discord APIs are remarkably simple to use all things considered. I have plans for other Discord bots I would like to write in the future and I am now confident that they are well within reach

What's next for ShiritoriBot

ShiritoriBot in its current form is an excellent proof of concept. Further development of the bot would first need to include getting it hosted onto a proper cloud-based system for full 24/7 support, and then possibly adding additional configuration to allow the word dictionary to be restricted/expanded to suit the needs of any particular server.

Built With

Share this project:

Updates