Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Implementation of fire rate and magazine by Andre Maceira

A big development made this week was incorporating a sort of fire rate for our pistol so the player couldn't just shoot an endless stream of bullets to your heart's content toward the enemy and trivialize the game.  Beginning with the rate of fire, it wasn't to difficult to get a pause between shots initially using a timer (similar to the stamina regen, but there was a weird bug that occurred where if the player waited a while between shots and double tapped left click they would be able to shoot their gun twice in rapid succession. This obviously not being intended held me up for quite a while before finding out I could pause that timer function after the elapsed time between shots was met and the player was ready to shoot again which ended up fixing the glitch and even saved some processing power on unnecessary calculations once the timer finished. I also implemented this on the sprint timer to cut down on that as well. This along with adding an ammo counter which I have yet to tie to the UI was a pretty big accomplishment considering that we can just reimplement this method on any other gun in the game and we have different guns with unique rate of fire and ammo capacities. Honestly which I could've gotten a better image and it just looks like a stream of bullets, but you'll have to just take my word on this being an improvement from before.

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.