Sunday, 4 June 2017

Devlog #3 - Combat, Knockback, Title

Welcome to the third update post on my project, now named "Mass O' Kyzt". You can thank the Youtube commenter SmallsMalone, who gave me a very similar idea for the title.

This is still open to adjustment, but I'm quite happy with it and I'll explain precisely why I love it. First of all, it gives a prominent name to the small, disposable enemies now known as the "Kyzt". Currently I'm unsure as to whether this is a race, a species or a kind of inter-planetary nationality. Details pending.

However, the name "Kyzt" works particularly well since the Kyzt themselves are small and unintimidating beings, just as the name is short and bears a resemblance to the word "kissed"- where little violent meaning can be found.

Secondly, it draws attention to the fact that there's going to be a lot of them. Or to put it another way, there will be a "mass" of Kyzt.

Lastly, the obvious pun on the word "masochist". This works especially well since the player will effectively be working against themselves as they upgrade the Kyzt.

So yes, it's a good title and I'm happy with it. Thanks again, SmallsMalone.

Let's move onto the actual development side of things. I added a couple more criteria for upgrades, namely speed and damage. Nothing too complicated there.

I also fixed (another!) bug with the pathfinding. Basically, if the enemies have a direct line of sight with the player, they ignore their pathfinding algorithm and just run straight towards you. Unfortunately, after removing physical collision between each enemy, I forgot to also allow each enemy to see through one another. This probably took me less time to fix than it did to type and record this paragraph, so yeah. Simple fix.

Another bug I fixed was with regard to the jumping logic. Basically, the way an entity jumps in my custom-made physics integrator is to adjust its vertical velocity by a factor of their jump height. It would only do this if the entity is touching the ground, but the flag for this is only set once per call of the integrator. In effect, this means that the AI would jump several times in the same tick and shoot towards the top of the screen.

The fix for this was again very simple, and involved simply setting the "touching_ground" flag after the entity is set to jump for the first time.

Let's move on again to something a little less boring.

I added real combat! You don't have to leave angry comments about me being lazy, as I told you to if I forget to add real combat. I'm sure this won't stop some of you, but I am no longer obliged to condone it, so at least I have that.

The invulnerability timer which stops the player from being hit a billion times in a second is a bit dirty and I'm sure it'll come back to haunt me, but hey- it's good enough. No, I'm not going to tell you how I did set up the timer. I am ashamed.

However, I did set up a pretty nice knockback system.

Before now, I would have a single Vector2 which I named "movement_vector" which I would perform calculations on before setting the player to move by a factor of "movement_vector". This works in order to get tight controls, since I'm resetting "movement_vector" to (0, 0) per each iteration of the integrator.

However, with things like knockback which take place over a certain time period, it's difficult to deal with it using only a single movement_vector. It would get very messy, very fast

Due to this, I've added a second vector called "meta_vector". I call it "meta" since it persists over multiple iterations of the physics integrator, getting multiplied by 0.8 each time so as to provide a steady fall-off for the knockback force.

When the player is knocked back, it just adds a force of factor knockback_force to the meta_vector with the sign corresponding to the angle. Super easy and yields some pretty satisfying results, since the player isn't totally powerless during the knockback.

On a minor note, I added a godmode flag sooner rather than later. This is super helpful to test the knockback without having to comment out multiple parts of code. Also, I sped up the bullets just because I wanted to.

Lastly, I made the UI a little "prettier", for some bizarre definition of the word. I added a simple "ui_background" scene which is just the repeating dirt texture and I scaled up some of the font labels. This looks horrible and blurry but at least Mass O' Kyzt now feels a little more like a game.

Either way, thanks for reading. I hope that this was interesting enough for you, and stay tuned for even more updates.

No comments :

Post a Comment