It’s been a long time since my last update, much too long even. Finding a balance between working on the game and writing blog posts has been harder than I thought. The game’s been making bounds of progress over the past month, front-end and back-end, so there’s a lot to backtrack on here!
So the main area I’ve been working on, is getting PMDiscord — a text-based game — to be as approachable and accessible as possible. By design, PMDiscord is a fairly complex game, and this is something that I’ve needed to watch really closely as I build more onto it. A tutorial would take too long to make at this point; so, for the sake of having people test it effectively, I’ve been aiming to simplify and streamline how the game is presented at every opportunity.
The character creator needed a bit of an overhaul, to make it smoother and more robust when someone first starts out. Whereas previously players had to choose their ‘Moveset’ manually for testing, the game now gives an automatic ‘default’ Moveset for all of the 600+ monsters in the game. This involved running a little C#/MySQL query through the game’s database, to crawl through each monster’s movepool and pick an ideal combination of four moves to start with. It was a bit of a side-project, but one which should get a lot of use later.
Numerous tweaks have happened to the battle system to make it clearer to read. When a target is Engaged or Retreated from, a marker appears to show the chances of it happening, just to keep everything transparent. There are also new commands to check where any monster is relative to everyone else, which should clear up any confusion in large team battles. Much of the game’s less important text has been condensed into Emojis: For example, Super-Effective attacks are not as drastic in PMDiscord as they are in other games, and so these are now indicated with a small arrow instead of spelling it outright. Small changes like this mean there’s less text clutter, which in turn prevents the game’s information from becoming overwhelming.
DSharpPlus is the API wrapper which PMDiscord uses to communicate with Discord’s servers. It is currently in active development, and so a little chunk of last month was spent taking advantage of its updates. This involved a few object name changes and optimizations in how messages are sent. Since its 1.0 release, DSharpPlus has been very intuitive to work with! If you are interested in getting into bot development and have some familiarity with .NET, I highly recommend taking a look.
Moving on from this little shoutout – I put some time aside to make my own rate-limiter for the game’s commands. Discord has strict rules on how many messages can be sent by a Discord bot in a certain timeframe, and since the bot will eventually go public, it is very likely that this limit will be tested… Thoroughly. Would you believe people have made “Bot Graveyards”, where public Discord Bots are collected for the sole purpose of spamming their commands to get them banned? Needless to say, a failsafe is rather important there. It works rather simply for now, preventing messages to be sent multiple times per second, and also counting messages so that not too many are permitted within a certain timeframe. DSharpPlus (and all recommended API wrappers, I believe) now have their own rate limiters, but this one should prevent that safety net from ever coming into play — and with some updating, will let me filter out the spammers by user and guild. Pretty handy.
Alongside these mountains of coding tasks, I’ve also began writing tutorials to outline the battle system, as well as a new bot command to make them display inside Discord itself. The first half of this has been going well! The second half may take some work as I teach myself more about file- and string-handling. This is lower down in the priority list, but something which PMDiscord could certainly use.
*Gasp* And finally: the last, and biggest hurdle I’ve been tackling this week is AI-controlled enemies. Originally, this was going to be saved until after the dungeons were functional, but then I realized CPUs would be the most straightforward way of teaching players how to use their options in a battle. Development was fairly fast for this, considering what it was. Half the time was spent sorting out a ‘decision’ system for AI monsters to call upon, and the other half was fixing the countless game-hanging bugs which came as a result…
It was hell, sure, but eventually it pulled through. In its current state, it works as well as I had hoped. The AI’s logic is kept simple for now, but it is able to target enemies with super-effective attacks, approach targets that it has an advantage over, and retreat when in danger. It adopts the ‘default’ Movesets mentioned earlier, allowing any monster to be generated in as an enemy or teammate at random. Everything so far works without major glitches (that I’ve spotted), the battle engine as a whole is also a lot sturdier now, all in all it feels like time well spent.
There’s still a short checklist before an early test of the game can go live. This includes finishing up the in-game guides, balancing the Engage chances a little more, and adding a ‘hard’ version of the in-game AIs so that there’s a little challenge of sorts. Scrolling up after all that… This is as good an incentive as any to update more frequently. If all goes well, I won’t be writing another blog post this big in a long time. If you made it this far, or even if you didn’t, thanks for stopping by! A release date should be on the horizon, stay tuned as always.
Leave a Reply