Weapon Additions - Updated Feb. 15th 2014 (Discontinued)

The place to discuss all things Receiver.
User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Sun Nov 17, 2013 8:36 am

lamekupo wrote:Eh, in all honesty, if it ends up being too complicated, it's definitely something that I can live with. I always check my weapon after spawning and make sure everything's in working order, so it doesn't really affect me.
Yeah, I do the same but I went ahead and tried to fix it anyways, when it randomly sets the slide to the locked position when spawning I forced it to cock the hammer and chamber a round, it seems to have fixed that issue but occasionally doesn't for some strange reason. It also seems to occasionally put the bullet in a weird position while press-checking but it doesn't affect operation.
lamekupo wrote:As for the Thompson, perhaps you could have the gun tilt for a second (as if the safety is on) the player operates the fire selector? Though, I'm not sure if that tilt is enough to display the fire selector, so is there a way to increase the angle of that tilt? Or perhaps even remap the tilt to another key entirely, so that the player still has the option to flip the fire selector without breaking his aim.
Yeah, I think I'm gonna go with your second suggestion - I actually had the same idea while I was writing that out, I could have another button set for inspecting the guns, basically just tilting them to get a look and for the Thompson it would tilt so you can see the fire selector.
lamekupo wrote:Hm, keep in mind that modern double barrels use single selective trigger (SST) mechanisms. That is, there's only one trigger, and the inertia from the firing of one barrel toggles the mechanism to fire from the other barrel next. The older two trigger mechanism would definitely be more interesting though, especially with the ability to empty both barrels at once. Not sure how easy that would be to script though. (Or how the controls would work)

As for readjusting your aim, the barrels are tilted so that they converge at a certain distance (usually 25 yards or so for SxS), which would makes things a bit interesting if you used the older trigger mechanism.
Now that you mention it, it does sound a little difficult to script! I'm not familiar with firearms so thanks for pointing that out. Before I even think about adding a double barrel I'd need a model anyways, so that would be in the future. The barrels converging is pretty cool though, sounds like it would take some time in the range to get used to aiming it properly!
lamekupo wrote:Do bullets "go through" in Receiver? As I was aware, bullets hit certain target areas, and if the hit was a vital spot, that was it. I wasn't aware there was any sort of armor yet.
Believe it or not, they actually do. I never looked in detail at the bullet script until now but it turns out when a bullet hits the robot it will shoot another linecast slightly deeper and call the internal damage function if there's a part there. It only penetrates if the bullets total velocity is over 100 (I think that would be 100m/s), and it isn't at an angle where it would ricochet. It doesn't use any armor values to stop it though. This opens up an opportunity to add a little more math into that if statement, taking bullet mass into account like you said for example!

Unity has a pretty cool view mode kind of like x-raying, so I thought it could be useful for you guys to know where the internal parts are - I only labeled the internal parts, the camera and gun/shock prod is easily visible.

Image

Image

lamekupo wrote:Muzzle velocity is relatively synonymous with initial velocity. Longer barrels usually mean slightly higher muzzle velocities, since more of the powder burns in the barrel and thus more energy is transferred to the bullet. Not too much of a difference though.

But something I worry about is a 9mm bullet knocking a drone harder than a .45 ACP would. The .45 ACP round is slower, but has more mass and therefore would transfer more kinetic energy. It's too bad the code only accounts for the velocity of the bullet when it impacts a target, but not the mass.
Hmm, I'll do some googling to see if the Thompsons longer barrel will make any noticeable differences. I can't remember the numbers off the top of my head, but if the Glock has a higher muzzle velocity than the 1911 it will currently be hitting harder like you said. After finding that bullets do in fact penetrate I can take the time to make separate bullet objects with different weight instead of firing one bullet with different velocities, so the faster moving ones that are lighter won't smack the robots with such force. The physics force on impact is solely based on the bullets velocity so the fast moving bullets will be hitting them harder right now.
lamekupo wrote:I'd say the recoil is a bit much in this game, although not too unrealistic. I think the vertical recoil should be reduced, but not by too much. Rotational recoil is definitely out of hand though. That said, it shouldn't be possible to aim at a spot and hose down a tight area with an entire magazine. Recoil gets almost exponentially worse as the gun loosens your grip and "wriggles" out of your hand. The main factor in controlling the rotational recoil is having a tight grip, so that the gun doesn't break your firing grip.

Basically, shooting too fast in semi-auto or on full-auto breaks your grip. You have to give yourself a half second to readjust you firing grip to get the best accuracy and recoil control. So, maybe have rotational recoil increase with each shot? This would make bursts relatively accurate but anything beyond a few shots per burst useless.

I can see how the code work for full-auto, but it seems hard to implement for rapid semi-auto fire. Alternatively, there could be a mechanic where the player needs to periodically readjust his grip, but I can't help but feel that might be a little too much micromanagement.

Controlling vertical recoil is a matter of stance. You have to sort of "lean into it".
I have the same opinion on the recoil that you do, the jumpiness feels right but the rotating is a little overdone. I took a decent amount of time yesterday to tweak the recoil so that it's a little more controllable but not too weak, it's not quite where it should be but I think it's a little better.

I think the recoil increasing with each shot depending on the time between would be good, especially for the full-auto Glock. It would be reduced for two-handed weapons but that reminded me of that guy who tried a full-auto Glock even with a fore-grip and it flipped around and shot his other hand. Then again he seemed relatively new to shooting. Either way it seems like it would be a good feature to implement, but the grip readjusting does seem a little too far.

lamekupo wrote:As for the ending, I would assume it is a problem with Steam then, since Davidos and I are having the same issue, but you aren't.
Yeah I really have no idea what's going on, I only managed to beat it in the editor 'cause I'm too lazy to find the tapes without setting every pile to have them, but I'll have to try it with the built version and see what happens. It should go a lot quicker with the bottomless mag cheat anyways.
saladofstones wrote:I greatly appreciate the changes made to the lifespan of items, but is there any way to set it to infinite? Or did the game always put a lifespan on them.
Glad to hear that! As far as I know they would stay forever in the original game, but I can have the maximum value of the slider make them stay forever. I'm writing down the suggestions now so that will most likely be in the next update I post.

Edit: I made the sliders max value infinite and did a few other things, I went through all of the level tile prefabs and removed all of the unused animation and collider components, so that may help the performance a little bit. I updated the link so you can grab it whenever.

WTRXGamer
Posts: 13
Joined: Sat Oct 12, 2013 12:16 pm

Re: Weapon Additions - Updated Nov. 16th

Post by WTRXGamer » Sun Nov 17, 2013 4:34 pm

[deleted]
Last edited by WTRXGamer on Thu May 23, 2019 3:39 am, edited 1 time in total.

lamekupo
Posts: 11
Joined: Wed Sep 18, 2013 5:56 am

Re: Weapon Additions - Updated Nov. 16th

Post by lamekupo » Sun Nov 17, 2013 6:07 pm

It's working as intended.

The Thompson fires from an open bolt, which means that in the "ready to fire" position, the bolt is held to the rear. If you take a look at the gif he's posted of the Thompson's operation, you'll notice that when he stops firing, the bolt is held back. This means that there's not going to be any round in the chamber for you to eject.

And I agree, a loose bullet spawn would be a nice addition to the shooting range.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Nov. 16th

Post by Josh707 » Mon Nov 18, 2013 3:20 am

WTRXGamer wrote:Would it be possible to add a bullet spawn on the table also? For the weapons that don't have magazines that is.
Sure! That's simple enough.
when I pull the slide back, I hear the *click* sound but when I release I don't hear it, like I should, and I am unable to eject a bullet from the chamber.
Yeah, when you release the bolt from all the way back to the locked position it should play a quiet little hit sound but I don't have any good audio clips I can use for that. I don't want to use the same sounds as the other guns so it should sound completely different when it's done.

As for the bullet ejection, lamekupo is right, the Thompson chambers a round and fires simultaneously when the bolt is moving forward. So to eject a round manually you'd have to lower the bolt with your hand and pull it back again, but right now lowering the bolt without firing doesn't chamber a round as it should.

Davidos
Posts: 18
Joined: Tue Nov 02, 2010 7:48 am

Re: Weapon Additions - Updated Nov. 16th

Post by Davidos » Mon Nov 18, 2013 12:24 pm

Tell you what, send me a PM with all the sounds etc. you need so I can get it a little organised.

I just got home from a 3 day road trip, so I'm setting up right now and can't really go through the posts.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Nov. 16th

Post by Josh707 » Mon Nov 18, 2013 12:31 pm

Alright cool, there's not too much and thanks! For some reason I'm not authorized to send a PM though, do you have an email or something else?

Davidos
Posts: 18
Joined: Tue Nov 02, 2010 7:48 am

Re: Weapon Additions - Updated Nov. 16th

Post by Davidos » Mon Nov 18, 2013 1:10 pm

Josh707 wrote:Alright cool, there's not too much and thanks! For some reason I'm not authorized to send a PM though, do you have an email or something else?

Well, then again, I suppose you could just dump the list here and I'll just keep it highlighted.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Nov. 16th

Post by Josh707 » Mon Nov 18, 2013 3:28 pm

Haha yeah that's a lot simpler, I'm about to sleep so I'll post it when I wake up later

ArgenGuy
Posts: 24
Joined: Tue Nov 19, 2013 11:28 am

Re: Weapon Additions - Updated Nov. 16th

Post by ArgenGuy » Tue Nov 19, 2013 11:37 am

I'm really digging this mod. I'm trying the bolt-action rifle. What caliber is that? .45-70 Govt or .22 Magnum? Even if it's a .22 Mag, it feels like it deal the punch of a .22lr. Sometimes turrets and UAV require several shots before dying.
The rifle itself looks like an Argentine 1891 Mauser.

I also noticed that, sometimes, the UAV drones commit suicide.

lamekupo
Posts: 11
Joined: Wed Sep 18, 2013 5:56 am

Re: Weapon Additions - Updated Nov. 16th

Post by lamekupo » Wed Nov 20, 2013 4:47 am

Finally got enough time on my hands today to play a bit of the update.

The audio reverb is simply amazing! I don't consider myself an audiophile, in fact, audio is one of my lowest considerations in games, but color me impressed. It really breathes life into the game. I'm not sure how to describe just how much I like it. The shooting range is quite nice now too. I quite liked the cosmetic touches with the crates of drones and what not. The mags on the table are quite convenient as well.

I think we can all agree Receiver is a pretty good game in itself, but your work thus far is really putting the polish on it and making it shine.

The recoil is a bit better, I quite like it; it's not as wild.
Josh707 wrote:Believe it or not, they actually do. I never looked in detail at the bullet script until now but it turns out when a bullet hits the robot it will shoot another linecast slightly deeper and call the internal damage function if there's a part there. It only penetrates if the bullets total velocity is over 100 (I think that would be 100m/s), and it isn't at an angle where it would ricochet. It doesn't use any armor values to stop it though. This opens up an opportunity to add a little more math into that if statement, taking bullet mass into account like you said for example!
Wow, that's fantastic news! That's a really interesting damage model. Pretty realistic too if you think about it.

I noticed the changed muzzle velocities, namely the in the 7.62 Tokarev. As I noted before, the muzzle velocities without mass or any other considerations really can be off. I was shooting at some turrets, and if I landed any more than 1 shot at once, the turret would just tip over. Somewhat offputting, considering that the average Tokarev bullet is less than half the mass of a normal .45 ACP bullet.

When you get around to it, I'd suggest just editing the projectile class to include data members for mass and some sort of variable to approximate the rounds penetration ability. Mass is important for the aforementioned kinetic energy transfer being modeled correctly.

Penetration is important to model how the bullet's shape and sectional density punches through obstacles. I don't know how the math looks, but the penetrative power variable should factor into whether or not the bullet ricochets. Deflecting rounds is primarily how bullets fail to penetrate metal, so it's fantastic to see a game finally model that. Mass should also be an important factor though.

I'm also curious about how the linecast works. Does it just go through the entire drone? Or does it stop at the first vital part it hits? If you controlled how deep the linecast went, penetrative power could model the piercing capacities of rounds much better.

The requirement of the round to be going at least 100 m/s to pass through the shell of the drone is interesting as well. I feel like there's room to play around with that, but I'm not sure how.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Nov. 16th

Post by Josh707 » Wed Nov 20, 2013 8:51 am

ArgenGuy wrote:I'm really digging this mod. I'm trying the bolt-action rifle. What caliber is that? .45-70 Govt or .22 Magnum? Even if it's a .22 Mag, it feels like it deal the punch of a .22lr. Sometimes turrets and UAV require several shots before dying.
The rifle itself looks like an Argentine 1891 Mauser.

I also noticed that, sometimes, the UAV drones commit suicide.
Sweet! And it's (supposed to be) the Gewehr 98, the model is just a placeholder for now, I'm either going to try to work from this model as a base or use something better if I can get one. It does resemble the actual gun but it's missing some of the defining features. Also the caliber is 7.92×57mm but until I figure out a realistic way of incorporating bullet weight and maybe shape into the penetration and impact force then the bullets will not behave as they should.

I've noticed drone's commit suicide too, if they hit something hard enough they will break themselves! Sometimes if they fly directly at me from another room they'll hit the door frame really hard and break something, it's funny.
lamekupo wrote:The audio reverb is simply amazing! I don't consider myself an audiophile, in fact, audio is one of my lowest considerations in games, but color me impressed. It really breathes life into the game. I'm not sure how to describe just how much I like it. The shooting range is quite nice now too. I quite liked the cosmetic touches with the crates of drones and what not. The mags on the table are quite convenient as well.
Awesome! I wasn't sure if people would like it, but I thought it added a nice touch to those long empty metal hallways and rooms. There's a few places where it cuts out, it's annoying to try to fill a square map tile with spherical reverb zones without having reverb in the wrong places or none at all, but it'll be polished up. Thanks for the encouragement! :)
lamekupo wrote:I noticed the changed muzzle velocities, namely the in the 7.62 Tokarev. As I noted before, the muzzle velocities without mass or any other considerations really can be off. I was shooting at some turrets, and if I landed any more than 1 shot at once, the turret would just tip over. Somewhat offputting, considering that the average Tokarev bullet is less than half the mass of a normal .45 ACP bullet.

When you get around to it, I'd suggest just editing the projectile class to include data members for mass and some sort of variable to approximate the rounds penetration ability. Mass is important for the aforementioned kinetic energy transfer being modeled correctly.

Penetration is important to model how the bullet's shape and sectional density punches through obstacles. I don't know how the math looks, but the penetrative power variable should factor into whether or not the bullet ricochets. Deflecting rounds is primarily how bullets fail to penetrate metal, so it's fantastic to see a game finally model that. Mass should also be an important factor though.
Yeah it does seem to be a pretty big issue right now, I've been reading up on terminal ballistics and other relevant information I can find on the internet this morning. It's going to be a little bit of work, but I plan on achieving proper forces and penetration in the end.
lamekupo wrote:I'm also curious about how the linecast works. Does it just go through the entire drone? Or does it stop at the first vital part it hits? If you controlled how deep the linecast went, penetrative power could model the piercing capacities of rounds much better.

The requirement of the round to be going at least 100 m/s to pass through the shell of the drone is interesting as well. I feel like there's room to play around with that, but I'm not sure how.
Yeah the linecast will stop at the first collider it hits, given that it's not on a layer you've excluded with the layermask. Wolfire has the penetration line's start and end calculated as:

Code: Select all

hit.point + velocity.normalized * 0.001, hit.point + velocity.normalized
hit.point is the position of the collision, and velocity.normalized is the bullets velocity vector(x,y,z values) modified so that it keeps the same direction but is reduced to values between 0 & 1. So after hitting a robot, it will linecast starting from just barely inside the robot, and travel roughly 1 unit/meter of the bullets velocity, so any internal part between that will be destroyed.
The way it currently works makes me think if you penetrate a round through one robot and miss the internals, that linecast will ignore the armor of another robot and hit the internals directly. But since robots are never that close it's not a problem.

I'm gonna have to do some hard thinking to figure this out, I know how to easily modify that depth but I don't know where I should pull the values from. The impact force that gets exerted on the robot I have partially figured out though. I will keep you updated!

Oh, and Davidos the list of sounds and stuff will be up at some point, I just randomly got a headache so I don't want to sit at my computer and think.

Davidos
Posts: 18
Joined: Tue Nov 02, 2010 7:48 am

Re: Weapon Additions - Updated Nov. 16th

Post by Davidos » Wed Nov 20, 2013 12:10 pm

That's alright bro, I got some work to do myself...
... that is, if I ever get around to stop being a lazy douche XD

ArgenGuy
Posts: 24
Joined: Tue Nov 19, 2013 11:28 am

Re: Weapon Additions - Updated Nov. 16th

Post by ArgenGuy » Wed Nov 20, 2013 1:47 pm

Josh707 wrote:
ArgenGuy wrote:I'm really digging this mod. I'm trying the bolt-action rifle. What caliber is that? .45-70 Govt or .22 Magnum? Even if it's a .22 Mag, it feels like it deal the punch of a .22lr. Sometimes turrets and UAV require several shots before dying.
The rifle itself looks like an Argentine 1891 Mauser.

I also noticed that, sometimes, the UAV drones commit suicide.
Sweet! And it's (supposed to be) the Gewehr 98, the model is just a placeholder for now, I'm either going to try to work from this model as a base or use something better if I can get one. It does resemble the actual gun but it's missing some of the defining features. Also the caliber is 7.92×57mm but until I figure out a realistic way of incorporating bullet weight and maybe shape into the penetration and impact force then the bullets will not behave as they should.

I've noticed drone's commit suicide too, if they hit something hard enough they will break themselves! Sometimes if they fly directly at me from another room they'll hit the door frame really hard and break something, it's funny.
Oh, thanks for the kind answer.
I looked it in more more detail and I can assure you that it's not Gewehr 98.
The Mauser G98 doesn't have a protruding magazine. It's looks heavily based on the Argentine 1891 Mauser with some traces of the Steyr-Mannlicher and Carcano 1891 long rifle, but the bolt itself looks based on the one of the Springfield 1903 (the 1891 Mauser has a straigth bolt handle and a different safety).
Anyway, keep the good work, I'm sure that you'll be able to overcome these issues with the damage.
The Thompson M1A1 is fun to use but I don't really like its rear sight, it's hard to aim accurately with it, I prefer the rear sight of the M1921/M1928 variants, which is a Lyman sight, it has a square notch for close quarters and a flip-up, adjustable peephole for longer ranges.
For receiver, the square notch is enough.
Also, the 20 round mag runs dry very quickly, even with good trigger discipline. You should solve the problem with the fire selector so we can use the Tommygun as a semiauto carbine when we need accuracy and the fullauto mode for close quarters.
Last edited by ArgenGuy on Thu Nov 21, 2013 7:27 am, edited 1 time in total.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Nov. 16th

Post by Josh707 » Wed Nov 20, 2013 7:24 pm

Davidos wrote:That's alright bro, I got some work to do myself...
... that is, if I ever get around to stop being a lazy douche XD
Haha okay, there's actually not much that I need, only sounds for operating the Thompson but I might already have some. I'll let you know though!
ArgenGuy wrote:-snip-
Hmm, I was just going off what the creator called it but it's not a very good model anyways! I agree with the sight change, the current one isn't properly leveled with the front sight so I might as well change it. I got the fire selector working so it'll be in the next update, which will be relatively soon.

Do you happen to have any good reference pictures for that little notch sight? I tried Google but I can't find a good one

lamekupo
Posts: 11
Joined: Wed Sep 18, 2013 5:56 am

Re: Weapon Additions - Updated Nov. 16th

Post by lamekupo » Wed Nov 20, 2013 9:10 pm

I believe he means this:
Image
M1928 Thompson sights with the peephole rear sight flipped down.

This screenshot by the way, is from the RO2: Rising Storm. I have exactly zero experience working with models, but would it be possible to use the RO2 model? Or is the polygon count too high? Or other considerations?

I remember you ripped audio for the Tokarev from RO2 though. If you don't have the Rising Storm expansion, I could try pulling out some audio files for the Thompson, should you need any.
Josh707 wrote:-penetration stuff-
Cool! I look forward to seeing with what you come up with. It'll be fun to play with such a realistic and complex damage model. The possibilities are nearly endless.

Post Reply