Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → rapid firing guns
rapid firing guns
2002-12-25, 2:00 AM #1
I just thought of a way to implement guns with a very high firerate. Let's say we have a Minigun that fires 100 bullets per second. Till now, the only way to get that working was to have a big percentage of local, not synched bullets that do no damage...to trick the user of the gun. But we know that this trick doesn't work too well...
So I thought that you could send a trigger in the activated message of the weapon cog and have a 0x240 (local, not synching) client cog start a pulse that equals the firerate of the weapon, then fire the projectiles in this pulse. To stop the pulse, send another trigger in the deactivated message of the weapon cog.
Would this work? What are your thoughts about that?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-12-25, 7:46 AM #2
Sounds like it'll work pretty darn well.
-Hell Raiser
2002-12-25, 10:07 AM #3
I've actually already implimented that trick for my minigun, the client side pulse also does external model swapping to create the illusion of the barrel spinning as well. I needed to add some thingflag checks to the player because far to often the deactivate trigger was lost over the net leaving the player (unbenounced to them, since they always recieve the trigger) a constantly firing minigun.

But I'm happy to report that it is not only possible, but feasible. In its current state it is vitually bug free. [http://forums.massassi.net/html/smile.gif] I would like to find a way to sync the random vectors though.
2002-12-25, 11:26 AM #4
Swapping external models...nice idea. I thought I'd just make a cylinder and use a MatAnim to illustrate the spinning barrels...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-12-25, 11:32 AM #5
Hmm. Are you using the random vectors for a shotgun or to simulate the shaking of a minigun etc.? If it's the second, what about firing all projectiles straight and making the player shake a little?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-12-25, 12:26 PM #6
I thought about mat animation, but I was suprised how good swapping between just two models looked.

I'm talking about a shotgun effect, the bullets are sprayed all over the place when the gun is firing. I was thinking of using an array of vectors and going through them in a uniform order. But I haven't tried it yet.

My minigun is modeled after the one in team fortress classic, it has to warm up for a couple seconds before it starts firing and you move much slower while the barrel is spinning. But it pretty much coats what you're looking at in a hail of gunfire [http://forums.massassi.net/html/smile.gif]

I fought with it a for a long time to get it working as well as it does, so I'm actually pretty proud of it.
2002-12-25, 12:59 PM #7
Sounds promising. Mind putting a demo together? Or is your project close to release?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-12-25, 2:58 PM #8
Unfortunately, I'm not much in the way of modeling. Or keying. Or matting for that matter. Cogging and such isn't really a problem, but I want my mod to have at least a semi-polished feel to it.

I've asked permission from savageX to use some of his weapon models and keys in my mod, and that should get me quite a bit closer to release. But I will still need to do a fair amount of modification before I'm there.

I'm going away for a week tomorrow, but hopefully I'll have some time to do some serious work when I return...before my blasted classes begin again. :P
2002-12-25, 4:05 PM #9
I just noticed that you can send 5 parameters (4 flex values and one integer) in one single SendTrigger. Just add the integer to the id...
That really helped me to implement my shotgun (it fires only 5 bullets a time). I have 3 different static errorvectors for each bullet, and I pass rand()*3 as SendTrigger parameters and use them to find out which errorvector to take. It works.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!