It has pooling, so what that means that there are basically 20 shells, invisible and inside the gun. When one is fired it is turned visible and uses a nice parabool function and random rotations to shoot out of the gun. Once its out of screen for a few milliseconds, it is turned invisible again and placed back in the gun. That way we simply re-use the same shells over and over again, instead of making a new Shell object every shot.
The function doesnt work 100% yet (it doesnt take the players rotation in account), but it looks cool,and I should finish it in the next hour or so.
Very interested!
BeantwoordenVerwijderenThese will look very nice in combination with the motion blur effect Tom made, I think. Although, now I think of it.. Wasn't the gun drawn in after the effect? Hmm.
Doesnt mean the shells are :)
BeantwoordenVerwijderenIf the shells are drawn in before the gun, doesn't the gun overlap the shells? Wouldn't that look weird?
BeantwoordenVerwijderenWell the gun does indeed overlap the shells, but that the way its surposed to look really. The shells are ejected in the right of the gun, and just keep flying right.
BeantwoordenVerwijderenLooking good :) where is the video?! :) You can access the weapon rotation somewhere in the Weapon class. I believe it's conveniently called weaponRotation :P
BeantwoordenVerwijderenWe can keep the bullets in the main pass (with motionblur, yey) unless environment clipping becomes too much of an issue.
BTW: I implemented the "bullet drop" soundFX that plays itself 0.x seconds after firing a bullet. Sounds pretty cool tbh :D We should make it part of the bullet pooling :)
BeantwoordenVerwijderenLovely Tom. Do you use fraps for your vids? I seem to recall that fraps trail doesnt see a running XNA appn as being an 'active window' and wont start recording :/ iv had some problems with that before. Any idea's? Do I need to get full version of Fraps?
BeantwoordenVerwijderenAlso, I think that when we have Bo's handgun, we, or me, should start working on supporting multiple weapons. Right now all the offsets, zoom, firerate and flares and stuff is all placed inside the weapon class and is custom to our Assault rifle placeholder. We should fix that, make weapon the base class and have seperate classes with bulletshells, sounds, offsets and gun-vars in sub-classes. Ill put a ticket on the board @ hilversum.
BeantwoordenVerwijderen@#1. Fraps does recognize XNA windows, I use fraps for all my vids.
BeantwoordenVerwijderenAnd yes, the Weapon class is the base class. I made an Assault Rifle & Pistol class already, with the Weapon.cs as base.