NVlabs / FPSci

Aim Training Experiments
Other
70 stars 23 forks source link

Parameterized Sprinting, Headbob Functionality & Movement Acceleration Added #395

Open Tokey opened 2 years ago

Tokey commented 2 years ago
bboudaoud-nv commented 2 years ago

A few additional ideas while we are working on this branch:

  1. You may want to add a crouchMultiplier or crouchSpeed to allow designers to reduce player speed when crouched
  2. It may also make sense to add a sprintWhileCrouched option to disable sprinting when crouched (this would be the "normal" game dynamic, so default to False?)
  3. I'd be interested in comparing the idea of sprint multipler to a constant specified sprintSpeed in m/s (I'm realizing moveRate should really be renamed to moveSpeed while I type this, @jspjutNV for input)
jspjutNV commented 2 years ago
  1. You may want to add a crouchMultiplier or crouchSpeed to allow designers to reduce player speed when crouched

I agree.

  1. It may also make sense to add a sprintWhileCrouched option to disable sprinting when crouched (this would be the "normal" game dynamic, so default to False?)

I believe the normal way it works if you press sprint while crouched is that the crouch is cancelled at least and some games switch to walking speed while others switch to running. I personally lean toward "do what I said most recently" and would switch to running speed, but I can see either making sense. The uncommon thing would be to just keep crouching after pressing sprint. Though now that I think of it, the games I'm thinking about are all toggle to crouch. I'm not sure how to break the tie if both crouch and sprint are pressed at the same time with a hold to crouch and hold to sprint function.

  1. I'd be interested in comparing the idea of sprint multipler to a constant specified sprintSpeed in m/s (I'm realizing moveRate should really be renamed to moveSpeed while I type this, @jspjutNV for input)

I can see reasons why someone might want to set speeds directly, or might want to do multipliers on top of a base speed. Using something like baseMoveSpeed with runSpeedMultiplier, sprintSpeedMultiplier, and crouchSpeedMultiplier (maybe even proneSpeedMultiplier?) would give you the chance to assign scale factors and globally change all of the speeds with 1 value. Of course someone might dial in a particular speed they want like sprint and then want to dial in the others, but the coupled design would make that more difficult. I don't have a good feeling for which method of design is more likely for experiments, so I'm okay with either.

I agree with the renaming of moveRate, and maybe it should even become moveSpeedmps to try to get "m/s" in there, but I'm not sure those units are totally clear in the name. In general, it's nice to have units in the variable name when there are units to make it easier for people to know what they're setting without going back to the docs every time.

bboudaoud-nv commented 2 years ago

@jspjutNV I'm not sure what the .vs/.idea files in this branch are, should we remove them or are they something new to VS 2022?

jspjutNV commented 2 years ago

@jspjutNV I'm not sure what the .vs/.idea files in this branch are, should we remove them or are they something new to VS 2022?

I agree, these files don't seem needed. @Tokey , could you remove them from the PR? Basically we don't want anything in the vs/.idea/.idea.FirstPersonScience/.idea/ or similar paths to come with this pull request.

Tokey commented 2 years ago

The .idea files came when I opened the project with Rider. I was having issues with VS 2019, and had to re-install G3D and VS 2019 to get it to working again.