Devlog #2 - New Mechanics


Welcome to Devlog #2!

I decided that now about be the time to implement some of the core mechanics of the game since all of the player's upgrades will depend on it.

Leveling

This was pretty straight forward to implement since I'll just have a variable control the player's level and another variable that controls the experience needed to level up. For now, the enemies level will be the same as the player's level, but at some point I want enemies to spawn with a random number in a certain range depending on the player's level.

To gain experience, the enemy will drop an experience orb for the player to pick up when they get in range.

I also had the enemies' health scale with level which will account for the player getting stronger via abilities and attachments.

The progress bar for the level will be right under the health bar beneath the player


Bullet Piercing

Just like the level, no real issues implementing this. All it does is check if the bullet collides an enemy and adds to a piercing variable.

This is important to have because it will be another way to differentiate the weapons and be able to upgrade it later.

Range

This mechanic made me think much more than leveling and piercing, but it was only because if how I initially wanted to do it. I wanted the bullet's damage to decrease over time as soon as it spawn. I have no idea why I wanted to do this. I don't think other shooters do something like this, so I don't know what made me try this. 

Instead I just used the distance variable between the enemy and player and made it so if the player is not within a certain range, the player will do half the damage.

This way if a player is using a shotgun, they will have to be much closer to the target to get full damage than an assault rifle or sniper.

Critical

The player will have a chance to do the double the damage to an enemy. At first I was going to call it "headshot", but I felt like it wouldn't make sense for my game since the player won't be aiming at the head to get this damage modifier. Instead there will be a random chance for the damage modifier to apply when the bullet collides with a player, regardless of where the collision occurs.


Wave Spawner

Now that the enemies were made, I now have them randomly spawning off the screen and they automatically move towards the player.

I set a limit on how many enemies will be active at once so that the player is not just overrun with enemies. I have it set at 5 right now and it feels fine, but I could end up changing it later.

Enemies will also spawn from different parts of the screen depending on the player's location. For example, if the player if in the bottom right portion of the screen, the enemies will spawn from either top or left side of the screen. I do this because I did not want enemies spawning directly behind the player. It would cause issues where the ranged enemies will be off the screen shooting towards the player which felt unfair.

Conclusion

I made some strides this past week in implementing some core mechanics that will define my game. 

Weapons have range, crit and piercing. 

Random enemies will spawn in a random location depending on player's location.

So now there is some actual gameplay! In fact, the enemies  actually receive more mechanics as the player's level increases(Level, 10, 20, 30). However, I will wait until the next devlog to show that since this one already has gotten kind of long and I want keep it kind of short.

With the enemy getting stronger, the player will also need to be stronger to kill the enemies efficiently. I already designed some attachments and abilities that the player will upgrade over time, but the order and thresholds they get them at is something I'm still fine tuning.

All of this will be in the next couple of devlogs so stay tuned!

Leave a comment

Log in with itch.io to leave a comment.