10 March 2020

Designing A Gaming Bot For Discord (Initial Approach)

Whelp, I made it. I figured out all the things I wanted to figure out before writing a blog post about making a gaming bot for discord. So, without further ado, let's get into it.

Prologue

When I say gaming bot, I'm not talking about a discord bot connected with your game. Instead, I mean a bot, which responds to user commands. You can compare it to a text RPG. Before making it, I used an approach that I can only advise you to do too. But, make your own decision after reading it.

The Approach

Planning to use any preexisting platform for your game requires you to brainstorm the possibilities. Like with different hardware (mobile games versus PC games), not every game mechanic works. Looking at the input and output methods that are available to us and analyzing these tools allows us to build the game's horizon.

Familiarizing Yourself With The Platform

Discord is a modern chat platform. It allows users to interact with each other on servers, in groups or private chats. All of those three have both voice and text capabilities. The latter also features emojis. Whose are of use to react to others or for usage in your message. Reactions can also be taken back and reapplied.
Additionally, the text message can contain attachments, which will be displayed if they're video, audio, or graphic files. Else they appear as a download instead. URLs are displayed similarly, except for downloads, which are shown as previews instead.
With the ability to edit, delete, and format your messages, there are even more possibilities for bots to do their charm. Unfortunately, we are more limited than that.

Familiarize Yourself With The API

In the end, even a limitless platform restricts the game or bot with its API.
Luckily, all elements listed before, which a text-based RPG would require, are implemented in the API. I could go into the API in detail, but I think I'll leave that for another post when I write about the gaming bot and the design choices in more detail. Anyways, let's look at the capabilities we have for the game.

Screenshot of my RPG Bot
Using Emojis as an input method.

The Input

The primary input we get is user messages. We can search for specific patterns in there or use the API

calls to filter for commands. Another one we can get is through reactions from users to the bots messages allowing us to use arrow emojis to flip through pages of content, for example. While this doesn't sound like much, they are already powerful tools in our tool belt.

The Output

Screenshot of my RPG Bot
Using embed for layout and emojis for
graphics.
There's a lot we can do output wise. From sending simple messages showing content to formatting them, using embeds to implement layouts, emojis to represent graphics, or even posting generated or resource images. Given the list of Discord features, there's a lot more than these I came up here now. But, it is a start if you don't have one yet.

Conclusion

Well yeah, this is the approach I choose when developing games for hardware or platforms that aren't as familiar. I hope it helps you make better design choices. And maybe I'll post about my gaming bot? We'll see in the future.

Discord Dhuum challenge. Anyone?[1]

[1]https://itrunsdoom.tumblr.com/



Liked the post? Noticed an error? Wanna discuss the content or leave a comment*? You can join or check into the discord to do so! (*Note: Comments are disabled to avoid saving user data on this website.)
>> Join Discord

About Me

My photo
I'm a junior game developer and software developer and I created this blog to share my ideas, thoughts and whatever I'm working on or doing.