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/



01 March 2020

Acquiring Languages and Games

Since I'm coming close to writing/performing the last exam of the semester, it's about time to continue learning Japanese. What I did not expect was the number of videos about language learning vs language acquisition, which ended up in my feed. Curious as I am, I watched them, of course. And here is what I've been thinking about it.

Language Learning VS Acquisition Summary

Firstly, what is language acquisition? The idea behind it is that you do not learn the rules (grammar), vocabulary, etc. of the language (language learning). Instead, you acquire it the same way children or babies do (language acquisition). But how do babies learn the language? By being immersed in it. We start not understanding a single word, but after some time, given their context, we can figure it out. The more words we acquire, the more we can derive through what we already know. Supposedly we do not obtain through repetition as many apps do it. (for example Duolingo) [1]


My Approach To Such An App

For maximum immersion, throwing the player into a fictional world instead of asking questions about language makes more sense. The goal is to create a virtual environment tailored to obtaining it similar to acquiring it by living abroad. This virtual world most likely needs the player to navigate it, which means we have to teach the user words that describe these actions. (right, left, up, down, north, east, west, south, jump, etc...)

Like in real life, the player can be asked to complete quests. Starting with simple ones such as: Bring this orange to the fruit store to the right or bring this sword to the northern guard. Whether the words "right" and "northern" are marked, is a question of difficulty I would say. The idea of these quests is to teach the user the meaning of those words. Important is ensuring that the possible mistakes the player makes are limited. They might not notice subtle hints, and we don't want them to get frustrated. Naming the store of the orange quest "store" is a positive example of this. On the other hand, the sword fetching quest is going to be frustrating, since the player might not know what north, sword or guard is.

From there on out, it pretty much builds on top of each other. Slowly teaching the player vocabulary and later on grammar through context. For example, let's assume the player learns German. They already know the word "springen" (engl.: jump). Putting NPCs that react to him with "Du springst" (engl.: "You jump"), then they get subtle clues to what "du" (engl.: you) could mean. If some children say: "Wir springen" (engl.: "We jump"), and they do it, we get more clues about pronouns. This may not even be the best approach, but you can see what I'm aiming at here.

Conclusion

So, as you can see, if this approach does indeed work, it might be possible to create a fully immersive game, which supports you on your way to acquire- instead of learning a language. Done through reading and hearing, and interacting with the world and its speech.

However, this is just my thoughts on it. Whether or not it works needs to be put to the test, and maybe this post sparks a conversation between people who develop language learning applications.

[1] https://www.youtube.com/watch?v=illApgaLgGA

01 February 2020

I Was Ignorant About Shaders

Congratulations, University. January is the first month on which I didn't post on this blog for a whole month. I've been working on four different projects: Specifically Audio, Assembly, Interactionmethods, and Shaders.

Me And Shaders

When I had first come in contact with shaders, I've been ~8 years younger. Back then, I first started to learn to program with the DirectX SDK. I never really understood shaders back then, and they were annoying. I never really did anything with them. From there on out, it took seven years until I came across them again during studying when I saw the project of a fellow student talking about his shaders. The game looked amazing. One semester later, in the Realtime graphics course, we were taught DirectX as well as shaders. It was- fascinating but pretty technical. It wasn't until I took the "Modern Techniques for Shader Development and Imagesynthesis" course.

The Epiphany

Until then, I didn't think much about shaders, but the courses made me realize how important they are and how easy it is to write them. Most of the animations, particle systems, post-processing effects, and other things making your games more beautiful, are probably done using shaders. Vertex shaders, geometry shaders, fragment shaders, image effect or post-processing shaders, and compute shaders give you the power to push your games to a new level of aesthetics and beauty.

What If Shaders Are Not Your Thing?

Of course, it's not the end of the world if you don't write your shaders. There are shader assets out there that you can get. You can make other people write them for you (like me :P), and most engines come with standard shaders. So, no one is forcing you to get into writing shaders. However, I still want to make you realize how important they are and that it is possible to create great things with them.

How To Get Started?

The university course I took taught all techniques by using case studies. So, get out there, take a game and try to recreate the effect. Oh wait, maybe you should start with some tutorials on the basics first. Read into how Vertex and Fragment shaders work and make your own in Unity since you can get started right away there. Check for some websites that teach shading while using case studies. The tutor of the course has a website called lexdev.net.

Shimmy, Shimmy... Out And Away

That's it from my side for today. I'll come back with more posts eventually, especially after the exam phase. Also, I started to use Grammarly again, given your feedback on the blog posts that didn't use it compared to the ones that do. Thanks for that feedback, btw. Oh yeah, I could write my case study or tutorials in the future.

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.