Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aiming system #2194

Merged
merged 46 commits into from Nov 20, 2014

Conversation

Projects
None yet
8 participants
@kevingranade
Copy link
Member

commented Jul 25, 2013

A prototype for a system where you spend time aiming to get recoil all the way down to zero.
The concept is that if you simply hit 'f'ire, pick a target, and shoot, that's "shooting from the hip".
If you want to make a shot that has any degree of difficulty to it, you're going to need to spend some time/moves on aiming to get your accuracy up.
A kind of side effect/kind of intentional component of this is that moving, getting hit, etc... will reset your aim, meaning you cannot run-and-gun unless you're good enough to hit things with snap shots. It'll still be perfectly reasonable to stay 10'-20' away from the nearest zombie blasting away and only caring about recoil, but if you want to make shots at 60'+, you're probably going to need to spend some time aiming between each shot.
Goals:

  • Cycle to the next turn "without leaving the aiming menu"*
  • Split recoil into a recoil component and a 'aim' component.
  • Enlarge targeting window.
  • Re-balance guns for the new system, this likely means a significant accuracy boost for most guns.
    • Switch out quarter-degrees of dispersion for MoA of dispersion.
    • Split off sight dispersion from gun dispersion (prevents hyper-accurate pistols from adding scopes)
    • Add aim speed stat, based on the sight mechanism. (sight mods will override both speed and sight dispersion)
  • Implement aim speed based on:
  • gun/gunmod
  • stats/skills
  • Give the player better feedback about how likely they are to hit with the current aim level/gun/enemy.
  • UI to either incrementally improve aim while giving feedback on hit chance, or pick a aim level and fire.
  • Take accuracy penalties when hit.
  • Impose a time penalty for changing targets based on weapon weildiness, weight/volume?

Work for later: (these ended up being easier than expected, and are done)

  • Switch targeting to vulnerable point once aim is good enough.
  • Use best sight for each aim action.

Incidentally fixes #6936

*In reality it sets an aim action and re-enters the aim menu immediately on your next turn.

@CataJenkins

This comment has been minimized.

Copy link

commented Jul 25, 2013

Build successful!
Refer to this link for build results: http://ci.narc.ro/job/Cataclysm-PullRequests/24/

@Voker57

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2013

Not sure how that works, could you add a description (probably to UI as well?)

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Sep 29, 2013

Recoil or dispersion?

We can already wait after we fire and recoil will eventually reset itself to zero.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Sep 30, 2013

Tthe basic idea is to have both "recoil" and "aim".
Recoil is basically the inverse of stability, so you can just settle down
and get rid of it all.
Aim is zeroing in on a particular target, you can instantly (no move cost)
whip your gun to point at an arbitrary target, but then you need to spend
time settling your aim. For easy shots, you might not need to spend much
or any time aiming, especially at high skill levels, but at low skill and
long range, you need to carefully aim and wait for the right moment to fire.
Normally this is just a second or two, but when trying to make an extreme
shot you might want to continue aiming for multiple turns to get the aim
perfect.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented May 5, 2014

Bump for great rebasing. This is back working again, now comes the balance stuff, goals in OP.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented May 5, 2014

@kevingranade, how did you make those great tickboxes in OP?
Also, great to see work continuing on it.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented May 5, 2014

It's a github specific extension, put "- [ ]" or "- [x]" at the beginning
of each line of the checklist.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 29, 2014

About half way through converting dispersion to MOA, had to stop to fix some build issues.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2014

This is very nearly done, I'd loooove some feedback on the firing menu and how it plays in general.

@swwu

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2014

@kevingranade is this still happening? This looks pretty cool.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2014

It is pretty cool. Had some issues with NPCs and interface when I last checked on it, but Kevin's pretty busy so progress is slow. :-(

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jul 22, 2014

It's still in progress, I'm redoing ranged balance pretty much from
scratch, which is what really makes it drag on. In addition to the few
things listed, I'm not happy with the UI as it is right now. It has two
indicators, but they just aren't good enough. I'm thinking of making them
two bars, 'steadiness' and 'confidence'. Steadiness is a relative
indicator of your aim level that means you're as steady as you're going to
get for your skill level when it's full. Confidence will be the player's
estimate of chance to make the current shot. Just thought of something,
when you do a burst, the confidence bar can be two color to indicate chance
to hit for first and last round of the burst.
Btw KA101, I fixed the immediate issues it had before, now it works as
intended, but aiming is maybe too slow. If you go for 'as accurate as
possible' it's definitely too slow, but that's how it's supposed to work.
I need to have it do a menu refresh while aiming and play with the
confidence level thing to let the player know it's ok to make some shots
without fully settling the aim.
Also I need the confidence level thing to plug into NPC ai, either that or
they just take aimed shots all the time, which seems reasonable-ish for
making them work at all.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2014

More to the point, NPCs need to actually take shots at range, rather than charging to point-blank and then one-headshotting the player.

(If that's mathematically somehow the optimum behavior--greater bonus to accuracy from getting 100 move-points closer than from aiming for those 100 points--it's still NOT self-preserving, so intelligent folks probably shouldn't do it.)

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2014

Thanks for reporting the NPC charging issue, just missed applying the scaling factor for the quarter-degree to MoA conversion.
Shockingly, it looks like they won't need an update, they're acting basically sensibly with respect to gun usage. Their functions for evaluating guns might be a bit off, but I have basically zero confidence that that was working right anyway.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2014

With the latest set of changes I'm pretty happy with the UI for aiming, you now get the two bars showing "steadiness" (relative measure of aiming compared to your personal best) and "confidence" (an estimate of how likely you are to hit). You can see both of them tick up as you spend aim actions.
Also some bugfixes and other cleanups.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2014

Test result, long-ranged rifle shooting (M4 v. M4 turret, seems a reasonable use case) at skill 3: Steadiness doesn't seem to markedly improve Confidence at low skills or long range, and it's not clear what benefit the scope provides. Not a major issue since the game doesn't currently offer odds on one's shots, but folks might start asking.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2014

Rebased on latest to get past the restyling and warning fixing changes.

@KA101 KA101 self-assigned this Aug 15, 2014

const std::string steadiness_label = _("Steadiness: ");
const int confidence_width = window_width - utf8_width( confidence_label.c_str() );
const int steadiness_width = window_width - utf8_width( steadiness_label.c_str() );
const std::string confidence_meter = std::string( confidence_width * confidence, '*' );

This comment has been minimized.

Copy link
@KA101

KA101 Aug 16, 2014

Contributor

On WinCurses, this overruns (bar starts appearing on the next line) at skill 6 or so, point-blank, handgun. I was using the L39B.

@KA101 KA101 removed their assignment Aug 16, 2014

@kevingranade kevingranade changed the title Aiming system [WIP][CR] Aiming system Aug 27, 2014

@KA101 KA101 force-pushed the CleverRaven:master branch from a342a64 to 0da0595 Oct 30, 2014

@kevingranade kevingranade force-pushed the kevingranade:aiming-system-wip branch from f7d2a13 to fe6510e Nov 18, 2014

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2014

Rebased for post-0.B, and fixed the wraparound confidence meter.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Nov 19, 2014

With that last set of tweaks I'm pretty happy with how it plays.

@KA101 KA101 self-assigned this Nov 19, 2014

@KA101

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2014

Looks OK. Could quibble about the meter layout but that shouldn't stop this from getting in.

@Snaaty

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2014

How do I continue aiming instead of shooting?

This looks great, though!

EDIT: Nvm, am not using the right version, I will try it myself.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2014

It says on the firing screen, but the commands are:
f - fire at current aim level.
. - spend a small amount of time aiming if you haven't reached full
steadiness already, otherwise pass the turn like . Outside the aim menu.
s - steady shot - aim a bit then fire.
c - careful shot - aim a lot then fire
a - aimed shot - aim until you're totally steady, then shoot.

Let me know if you think of a way to make things clearer, first impressions
are important.

@Snaaty

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2014

I tried it, the commands are not the one you said, but it is pretty self explanatory.

I do like the new feel of actually aiming. As a non english speaker I'm not sure if I can really see he difference between the different aiming modes. Perhaps this could be colour-coded?

Also, maybe it would be possible to make a "|" at the end of the steadiness line, just that you know that you have maximum steadiness.

So far with my criticism and ideas. A really nice feature, kevin!

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2014

I was thinking about replacing the meter with a message, like "maximum
steadiness" once it hit the end of the range.

@Snaaty

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2014

Yeah, that's also a good idea.

I still have to test how it impacts my gameplay, but it is definitely awesome stuff.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2014

I've seen a forum bug report that throwing's crashing with this. Betting it's related, as I didn't think to test throwing.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Nov 21, 2014

Yea I saw that, probably crept in with the rebase, I know I tested throwing
the last time we looked at merging it. Pretty sure it'll be an easy fix
once I have any time at all.

@kevingranade kevingranade deleted the kevingranade:aiming-system-wip branch Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.