Muzzle Flashes - Making the game more interesting

in #unity8 years ago (edited)

You may have noticed a pattern with how I work, when I'm doing a lot of coding every now and then I like to focus on something fairly simple that revolves more around art and so on than code because that way I can relax a bit but also keep on making progress on my game, at some point I will need to do all this anyway so I figure while I'm letting my brain work out the next stages I'll play around with more fun stuff.

https://gfycat.com/OpulentCoolInganue

So what I'm going to do a bit of here is make the game more interesting generally, one of the main things being putting in a muzzle flash, I think I'll also look at maybe getting some bulletholes in the game as well and have them place when I fire the gun. Another thing I'm looking into is how to do gun recoil, now there seems to be a horrendously complicated way of doing it which is much older that I've seen on lots of tutorials but I personally think that's quite outdated, it may be appropriate to simulate bullet spread but I think I can do better with animations.

You may see in the gif I made that I have already experimented with this by making a very, very basic idle animation on my gun, so it sways a little bit just like in the classic shooters like half-life. However what I am going to look at is how to actually simulate things like gun recoil which should be fairly easy to do, I will simply have to play an animation every time I click the left mouse button and time the muzzle flash with it to get everything right. While this will work for a single model, I am probably going to have to build some sort of system to accommodate the multiple weapons I will have in the game.

This muzzle flash, I think is really just a placeholder, it is far too basic considering I actually want to make a reasonably detailed game but I'll show you how I did it anyway, what it is is a 2D image placed one just one plane which spawns ( Or instantiates if you're looking for the programming term ) in when you hit the left mouse button and quickly destroys itself after a certain period of time so it doesn't end up screwing up the game with resources.

Now I've made the image background black so you can see what's going on but when you actually import this into the game engine you have the file saved as a png and the background is actually transparent as I said in a previous post, this is also how I did that cone of light.

I think that particle effects may well be a better option which seems to be what most people are suggesting these days on the forums and so on so I'll start experimenting with that and see what I can come up with, I may have to look up some photo reference of muzzle flashes to get ideas.

You'll also notice that aside from all the little additions I have managed to get my drone moving around and acting as an enemy AI, there's something up with the height because I actually want it lower than it is but the movement is fine once the settings are sorted out. You'll also notice there's a vent there that I have set up, that's a little testing area I have for crouching that I am implementing and the capsule that I have there is me messing around with glow effects but that's not quite finished yet, I plan on making an alarm light out of that so that it starts flashing on the drone perhaps when the player is detected to give the stealth aspect of the game some drama.

Sort:  

fiddle with particles, and make some come out of the gun as well. or something like that.

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 60767.58
ETH 2376.67
USDT 1.00
SBD 2.57