gunplay: recoil + aim-down-sights + spread

Release and discuss things you've made, including mods.
vitamins
Posts: 11
Joined: Tue Dec 29, 2015 11:46 am UTC

gunplay: recoil + aim-down-sights + spread

Postby vitamins » Sat Jan 02, 2016 4:17 pm UTC

Hi,
i decided to add some gunplay features found in newer fps to unvanquished:
- aim down sights
- recoil
- movement dependent accuracy/spread

You can find the code on github here:
https://github.com/vitamins/Unvanquishe ... ts/gunplay

What i have done is based on the branch weapons/recoil by enneract, but extends well beyond that.

Please try it out and comment. How does the reocil feel to you? etc.
Also would be great if someone more experienced with the engine looked through the code i wrote.

Some screenshots, first aim-down-sights with the SMG, recoil pattern when firing constantly (middle) and when burst firing (right).
Image

Very high spread while sprinting (this can definitely look better with another crosshair)
Image
Low spread while crouched
Image

Some more details:
- aim-down-sights : Increased accuracy <-> decreased cone of fire/spread, but also decreases movement speed by 0.5
- to activate aim-down-sights press the zoom button / right mouse button on the smg
- possibility of ads is configured in weapon .cfg file

- recoil: upwards, and randomly left or right, returns with constant speed to starting point after the refire time has passed without firing again
-- makes burst firing more accurate, see first screenshot
-- you can compensate the upwards recoil by dragging the mouse down
-- single shot accuracy is very high, depends only on movement state/spread
-- recoil can be configured in weapon .cfg file

- movement dependent accuracy: shown by the size of the crosshair
User avatar
kharnov
Granger
Posts: 1851
Joined: Tue Mar 06, 2012 10:54 pm UTC
Clan: GT
Location: New York City

Re: gunplay: recoil + aim-down-sights + spread

Postby kharnov » Sat Jan 02, 2016 7:33 pm UTC

Hey, wow! Nice job you've done on this!

Any chance you could make a video of it, so that I could show everyone on the team?

By the way, you're more than welcome to drop by our development channel. It's #unvanquished-dev on Freenode.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby Ishq » Sat Jan 02, 2016 9:17 pm UTC

Nice changes. Will be interesting to see how it affects fighting dynamics! You can check this btw by adding a bot with '/bot add <bot name> <humans|aliens>'
User avatar
poVoq
Dretch
Posts: 59
Joined: Tue Oct 09, 2012 5:01 pm UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby poVoq » Sun Jan 03, 2016 5:46 am UTC

Can this please be included in the main game? Pretty please? :thumbup:
Caesar
Posts: 2
Joined: Wed Jan 09, 2013 4:26 am UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby Caesar » Sun Jan 03, 2016 6:06 pm UTC

poVoq wrote:Can this please be included in the main game? Pretty please? :thumbup:

I agree. It would be cool in a sense that it wouldn't be RNG entirely though. If it has recoil it should be learnable. The spread while running is cool too. I like all of these and it is why I am a CS enthusiast. These additions will increase the skill ceiling ten fold which is awesome.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby Ishq » Mon Jan 04, 2016 3:57 am UTC

Certainly affect the skill ceiling. Will make conventional dodging much more difficult limiting battles between aliens and humans to be more about numbers than movement. Would be interesting to test during a devgame. If you get on IRC vitamins, we can probably discuss how we can test your change.
vitamins
Posts: 11
Joined: Tue Dec 29, 2015 11:46 am UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby vitamins » Tue Jan 05, 2016 3:38 am UTC

Added a bloom per shot mechanic that increases spread with every subsequent shot.
I have set weapon configurations for SMG and LAS gun that i believe will work well, so those two are ready for testing.
Regarding the comments about dodging, the SMG is configured to have a very good accuracy without using the aim-down-sights mechanic slowing you down, so moving while firing should work if you have the SMG equipped.
Send me a message about which time you are on IRC.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby Ishq » Tue Jan 05, 2016 8:25 am UTC

I'm generally online from 11AM - 2 AM (I may be gone for an hour or so in between at varying times) GMT-8.
vitamins
Posts: 11
Joined: Tue Dec 29, 2015 11:46 am UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby vitamins » Tue Jan 05, 2016 12:25 pm UTC

The model of the blaster pistol as seen from a different angle - lol :smile:
Image
The shotgun also isn't perfect but i guess that one could be solved by moving it closer to the camera.
Image
Following from this, the weapons need to be redesigned to feature a usable sight. It doesn't even need to be an ironsight, a simple rectangle in which we can draw a 2D crosshair would be enough (inspiration http://www.gunssavelife.com/wp-content/ ... sy39xs.jpg). Until that happens, drawing the gun lower than the center of the screen, and showing a crosshair will work for weapons without usable sight.
Oh and i need help with placing the models correctly on the screen, if you could set the placement in game in a debug mode, (perhaps using the arrow keys) that would help a lot.
User avatar
Comet_
Mantis
Posts: 92
Joined: Sat Sep 27, 2014 1:52 pm UTC

Re: gunplay: recoil + aim-down-sights + spread

Postby Comet_ » Wed Jan 06, 2016 6:04 pm UTC

Holy cow this was crazy unexpected but really cool! For those of you who have tried it out, since this is an asymmetrically applied change, my main question would be as to how this change affects early game play (Dretch v Rifle). Will this make the Dretch too strong at the moment? Maybe a dretch health nerf with the change is due if it were to be implemented...

Also, I feel like the current spread of the shotgun -in Alpha 47 build - is already very powerful and has many of our loyal players down in the dumps about how efficient it is cost-wise. Perhaps make the spread it has right now the "down-sight spread" so to speak and then nerf the accuracy heavily from "hip-fire".

Just some initial thoughts I wanted to bring up. Gonna try to test this change out and edit this post if I have anything further I want to discuss. Either way, like I said earlier, this was super unexpected and very, very interesting. :thumbup:

Return to “Community Development”

Who is online

Users browsing this forum: No registered users and 4 guests