Home Creators Posts Import Register Favorites Logout

Content

Everyone.

After two whole weeks of banging my head against this problem, I’ve done it.

I’ve finally made it so that status effects can also change an enemy’s stats.

Obviously, what you’re seeing in the GIF isn’t what will actually happen when you light an enemy on fire in any public builds, but I needed something that was immediately visually clear what was happening for demonstration purposes. Thus, the super-fast quick-shotting shotgunner zipping around. This is also my test level where I run all of my dark and diabolical experiments, so the walls are invisible because I never saw a point to making them visible.

(The walls in this game are actually separate from the wall tileset, which is a very common means of handling collision in 2D games. They’re the same walls as the ones in the dungeons, but without the code automatically filling in the wall tiles where the wall collision objects are.)

With this I can really make status effects change up some things about how enemies function while under the influence of whatever you shot them full of. Remember kids, don’t do fire.

This is, unfortunately, the only thing I was able to accomplish last week, but hey, now that it’s working I won’t ever need to touch it again! Mostly!

Right now it can only affect four stats, so if I really want variation, I’ll need to add more to that, and it’s also not exactly plug-and-play; I need to reference the changed variables in the enemy code. For example, right now, if I had a different enemy than the shotgun enemy, they wouldn’t have any of the stat changes when I set them on fire because I was only experimenting with the shotgun enemy. Adding in that code is super easy, especially since I can just copy what I already did for the shotgun enemy, but it is something that I will have to remember in every single enemy I make for the rest of the game.

The four stats I can currently change are, Fire Rate, Damage, Defense, and Movement Speed. You already saw what happens when I dramatically increase the Fire Rate and Movement Speed back at the top of this article.

Defense is quite useful since I can theoretically give enemies armor that way, though I’ll also need to change a few things about how I initialize my variables to make that happen as right now I set them all to a default value without being able to change them when I create an enemy.

There’s also a minor concern with Damage. Unlike the enemies, the Player Character doesn’t have a float value for health, but an integer. In laymen’s terms, the Player HP can only ever be a whole number. If you pay attention to the enemy health number I have for debugging up in that GIF, you’ll see that by contrast, it can take 0.5 damage. That’s not really a problem. What is a problem is that most enemies deal exactly 1 damage, so any reduction of that damage means they deal no damage. Something else I’ll have to figure something out for.

But honestly that can all come later. This week, my plan is to finally fix the problem with what I call the ‘grenade’ mechanic because I still haven’t found a better name for it; the mechanic where you can get a power-up that spawns something when your bullet fades.

Most of that should be simple; turn it from an object reference into an array, plug all the things I want to spawn into the array, run a for loop for the length of the array (meaning once per item in the list) and spawn it. It’s basically the same code I use to make status effects work.

In other game design news, Matt Colville has finally started the Designing The Game youtube series he’s been teasing for a while now. If you aren’t familiar, Matt Colville is a game designer who’s worked on a lot of titles both physical and digital and has a long-running series called Running The Game where he gives advice for being the Dungeon Master in TTRPGs. Most of this advice is system agnostic, but largely focused on Dungeons and Dragons. His company, MCDM, also announced back at the start of the year when Wizards of the Coast announced the new bullshit OGL for Dungeons and Dragons that they were working on their own flagship TTRPG which wouldn’t have any of the legal restriction nonsense that WotC was pushing. Designing The Game is his series where he discusses the work the company has done on this game. The first episode is surprisingly relevant to this specific DevLog series, as it’s a discussion of the benefits of preproduction documentation versus rapid iterative prototyping.

That’s all I’ve got for this week, hopefully next week I’ll be reporting back that I’ve fixed the grenade system, allowing for easy synergies down the line.

Until next Devlog!

-DeusVerve

Special thanks to my Tier 3 Patrons, Haelerin and Christos Kempf!

Files

Comments

No comments found for this post.