ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.72k stars 624 forks source link

[CS 1.6 BETA] m_rawinput and acceleration #432

Closed nekitz0r closed 11 years ago

nekitz0r commented 11 years ago

Hello everyone! I have a problem whit "m_rawinput" settings.

Motherboard : ASUS SABERTOOTH Z77 CPU : Intel Core i7-2600 (3.40Ghz Socket1155) RAM : Kingston DSRAM 2x2Gb "Hyper X" KHX2133C9AD3T1K2/4GX Video : ZOTAC GeForce GTX 470 AMP! Edition 1280Mb HDD : SSD 60Gb OCZ "Agility 2" Display : Samsung 2233rz (120Hz) OS : Windows 7 Ultimate PS 1 (64bit) Mice : Zowie AM

Half-Life and CS 1.6 fully installed and upgraded, and select "Beta" for BOTH games.

Check my screenshots in MouseMovementRecorder:

1) http://filepic.ru/1361370797 in Windows -> everything is working fine (no acceleration)

2) http://filepic.ru/1361370854 in CS (m_rawinput = 0) -> Goes back to old sensivity, but lags/don't respond correctly/breaking movement/etc

3) http://filepic.ru/1361370877 in CS (m_rawinput = 1) -> The mouse works fine but with alot of acceleration (shooting far or close, seems I have negative and positive acceleration and it's impossible to play like that)

If I started CS with launch options (-w 800 -nofbo) I always have acceleration in game.

http://filepic.ru/1361370854 (m_rawinput = 0) http://filepic.ru/1361370877 (m_rawinput = 1)

If I started CS with launch options (-w 800 -noforcemparms -noforcemaccel -nofbo) I don't have acceleration. (not always). But Check screenshots:

http://filepic.ru/1361371802 (m_rawinput = 0) http://filepic.ru/1361371817 (m_rawinput = 1)

m_rawinput = 0 and m_rawinput = 1 -> not correctly movement for my mice.

Dear developers, can you make it looks like a ( http://filepic.ru/1361370797 in Windows) ? I think it's the only correctly movement for mice ( bit to bit). It's very need for normal playing.

DeNeDe commented 11 years ago

we all have this problem.. :(

alfred-valve commented 11 years ago

Thanks @nekitz0r , this hard data will really help find any problems and get the best mouse experience!

I think the program you are using may not work correctly for the raw input case, which may just be due to how the tool queries windows for movement.

nekitz0r commented 11 years ago

@alfred-valve Maybe you are right. need a more suitable program for check this.

nekitz0r commented 11 years ago

@alfred-valve I've noticed that sometimes CS activates Enhance pointer precision in Windows (Mouse settings) It's possible ? Or my mistake...

alfred-valve commented 11 years ago

There is nothing in code that I know of that enabled "enhance pointer precision" (I am not sure what that does)...

ghost commented 11 years ago

@alfred-valve if you need the program he's using, you can download it from here https://docs.google.com/file/d/0B-oc73ZQFT19cF9HclJ5MW9nbTA/edit?usp=sharing source code is included (under GNU licence)

nekitz0r commented 11 years ago

I am not sure too. forget about it. if i see this again i will tell you

ghost commented 11 years ago

@alfred-valve I've recorded a video about enabling "enhance pointer precision" by CS 1.6. link: http://youtu.be/d2s3xazS5U8 an article about what "enchance pointer precision" does: http://donewmouseaccel.blogspot.ru/2009/06/out-of-sync-and-upside-down-windows.html http://donewmouseaccel.blogspot.ru/2010/02/windows-mouse-pointer-acceleration_28.html

alfred-valve commented 11 years ago

Okay, after working out how to overclock my mouse to 1000hz (boy Microsoft makes that hard...) I can reproduce the console output you see. That said, when running older versions of Counter-Strike I reproduce EXACTLY the same thing, so I don't believe there is a regression here at all. Note that the command line parameters you probably want are: -noforcemparms -noforcemaccel -noforcemspd

I believe that raw input will give you the best experience here at the moment as it uses the native windows interfaces to get the best mouse cursor data.

That said, if I increase my FPS in game to 1000hz I can get the mouse deltas you want (i.e matching windows), so I will investigate adding a new feature that polls the mouse at a higher frequency than the running frame rate.

AndreiRomania commented 11 years ago

What if you return them commands back?

ghost commented 11 years ago

@AndreiRomania what do you mean "return them back"? -noforcemparms -noforcemaccel -noforcemspd - it works for me

AndreiRomania commented 11 years ago

Same here but with the old commands i get more response from my mouse. The same thing is with all the players.

alfred-valve commented 11 years ago

The code is identical between the old and new client (if you are opted into the beta), as the program @nekitz0r found for us shows.

AndreiRomania commented 11 years ago

Then why if i use Rawinput 0 and move the mouse fast like a whipshot the cusor stop moving sometimes and jumps why? if the -noforce is still working...?

alfred-valve commented 11 years ago

I have no idea @AndreiRomania , can you try running MouseMovementRecorder and performing that action so we can see what is going on in your OS.

idderf commented 11 years ago

@alfred-valve I keep getting complaints about people's mousemovement being very jittery when using m_rawinput 0. They game is pretty much unplayable for them, and it's probably related to this issue.

AndreiRomania commented 11 years ago

I cannot capture it it moves jittery but random and sometimes gets red ..... sometimes.

seems that i will have to stick with rawinput 1 or now :|

nekitz0r commented 11 years ago

@alfred-valve check this video http://www.youtube.com/watch?v=svOGtnilmKg&feature=youtu.be that the problem for @AndreiRomania and for me too. http://filepic.ru/1361370854 in CS (m_rawinput = 0) -> Goes back to old sensivity, but lags/don't respond. I think MouseMovementRecorder don't show lags. It's playable if I move my mouse very very slow. But if I want fast movement 180* or (360) I immediately get the lag and latency.

nekitz0r commented 11 years ago

@alfred-valve m_rawinput "1" working well. but it's not perfect for gaming. Just trust me, I am playing CS 1.6 7 years and I feeling it is a micro moment. I tested m_rawinput "1" an one hour on deathmatch and I see that I was playing badly. Alfred I believe that you can do better and I want help you but my english is too bad for that.

pro-cs commented 11 years ago

m_rawinput "1" is not working well, there's still some kind of acceleration left, even with -noforce parameters.

Also, rawinput "0" creates huge mouselag. Was fine yesterday, but doesn't work today.

Steelseries Xai running at 500Hz on 64bit Win7

Cheers

alfred-valve commented 11 years ago

Nothing changed from yesterday to today for the beta, so....

pro-cs commented 11 years ago

The last update? Also the fps are different. Maybe the day before yesterday, 24-48 hours.

"Yesterday" and "today" is different all around the world ;)

zaludan commented 11 years ago

I'd too say I have acceleration with raw input, but I can live with that (Win 7, x86, mouse x7, really can't remember what model exactly) - I guess we're all used to it... What I can't live with is that it still misses "first mouse click". About once in five times, when I start shooting I have to click twice to get any response, and that is far from acceptable.

alfred-valve commented 11 years ago

@zaludan , can you open another bug on the mouse click and provide as much detail as possible. I am not able to reproduce it here currently.

alfred-valve commented 11 years ago

Okay, next release will add a "-mousethread" command line option and a "m_mousethread_sleep" cvar. If "-mousethread" is set then on Windows (and only windows) we will spawn a thread to scan for mouse input every m_mousethread_sleep milliseconds, the main game thread then picks it up when needed. This should better capture micro movements that may be lost due to the frame rate of the main engine (or dips in it). I'd like feedback on how it feels (compared to not using the param and also using m_rawinput 1).

zaludan commented 11 years ago

@alfred-valve there you go #447

Ejz85 commented 11 years ago

This update you talking about needs to come out NOW. Dont wait days. It dosent matter if its just that one small fix, please release it ASAP.

MPNumB commented 11 years ago

So will this "-mousethread" command line option and "m_mousethread_sleep" cvar, should also fix mouse input glitches (not only movement, but key pressing/releasing ignored as well, sometimes - me and one friend of my are experiencing it since the update)? I'm in BETA, though friend is in official release version (so shouldn't even have m_rawinput implanted). What I'm saying, this started before the rawinput. Something related with m_customaccel cvars is my guess what is messing it up.

haGibear commented 11 years ago

@alfred-valve could you please update the readme file everytime a beta/regular update is released. please also add information what you would like us to test. readme would also be a good place to clear up some myths (are noforce commands really removed? how to use mouse acceleration cvars when you are used to windows mouse acceleration? fps_max 99/101?)

MrSchism commented 11 years ago

@haGibear Actually, a separate "changelog" file would be more appropriate for that purpose.

ghost commented 11 years ago

@MrSchism changelog is avaiable here http://steamcommunity.com//app/10/announcements. Stop offtopic, please.

Xirica commented 11 years ago

After the yesterday update I'm having again problems with mouse sensivity using m_rawinput 0! Also alot of my friends!

For example: After changing to some other map, we are noting that the sensivity change too! As for my case it get's a faster sensivity, alot of my freind is the otherwise!

We all are using: m_rawinput 0

Operation System: Windows 7 Home Premium 64-bit Processor: Intel(R) Core(TM)2 Duo CPU P8700 @ 2.55GHz Memory: 6096MB RAM Video Card: ATI Mobility Radeon HD 4650 (1GB extending to 2GB) Mouse: Zowie EC2 eVo

PS: Im still listening to people as robots talking! ;)

Hope it helps in future updates Tks

Antoweif commented 11 years ago

Haha, after 13 years with this game I can honestly not tell the difference between all these minor issues with sensitivity. Guess I've leveled up my versatility to max.

alfred-valve commented 11 years ago

I have just updated the beta with this new "-mousethread" option, see how it helps.

alfred-valve commented 11 years ago

So, hot or not?

ghost commented 11 years ago

http://steamcommunity.com/games/10/announcements/detail/1009075542294868964 everything is in comments

PTReaLL commented 11 years ago

The mouse sens is better but still has problems. the mouse sudently stops has it did in the previus update

Farroupim commented 11 years ago

Hello,

When m_rawinput 1 i have high acceleration!!! That is normal? Why?

The m_mousethread_sleep 0 someone tested??? I don´t have the program to test this.

And another thing: The first click in the mouse still does not work!!!!...?????

+Microsoft Windows XP Home Edition SP3 (updated today) +DualCore Intel Core 2 Duo E6850, 3000 MHz (9 x 333) +DIMM3: 1,0GB RAM Team Group Xtrem-D3-1333 +Asus Maximus Extreme (2 PCI, 1 PCI-E x1, 3 PCI-E x16, 4 DDR3 DIMM, Audio, Dual Gigabit LAN, IEEE-1394) Intel Beachwood X38 +Raptor RAID0 +NVIDIA GeForce 8800 GTS 512 (512 MB) (updated today) +Sony HMD-A230 17" CRT

Refresh force instaled with 100Hrz 800x600

-nofbo noforce comnds in the lauch options

Many thanks

Ejz85 commented 11 years ago

I dont understand the latest update.

m_mousethread_sleep, should that be 500 if I have 500HZ on my mouse? And 1000 if I have 1000HZ?

Or should I add like: -mousethread 500 ?

Edit: I tried it both, and its not working verry good with m_rawinput 0. The mouseproblems are still there.

Farroupim commented 11 years ago

By alfred-valve in steamforuns... m_mousethread_sleep is the number of milliseconds to sleep between getting the cursor position, 100 means only polling at 10Hz, 10 means 100Hz and 1 means 1000Hz. 0 would mean as fast as possible, which depends on your particular machine.

nekitz0r commented 11 years ago

Too many settings (console commands) in the game. This game is designed for programmers or developers? not for gamers... settings setting setting more more and more. What about just playing ?I'm tired of this. I know almost all of the console commands in the game but it is growing. I'm confused.

AndreiRomania commented 11 years ago

what m_mousethread_sleep should be if i use 800Hz ?

DeNeDe commented 11 years ago

with the new update is way better !! :D

Farroupim commented 11 years ago

All the time my cs failed verify integrity of game cache...I restart steam and failed agin.

http://dl.dropbox.com/u/83601797/Validation_failed.JPG

Help please.

DeNeDe commented 11 years ago

m_mousethread_sleep i only changed this to 1. because i use 1000Hz if 10 means 100Hz, then u should play with 80 for 800Hz.. i guess

but what if we had a mouse that runs on a higher freq than 1000 ? we need to set this to 0 ?

zaludan commented 11 years ago

@nekitz0r I couldn't 've said it better myself :D

vThlatvia commented 11 years ago

m_rawinput 1 helped for me, sensivity is the same as on 0 for me, but mouse isnt stopping

HeadshotDeluxe commented 11 years ago

Dear alfred

I've just tested the mousethread update. Skipping problem still exist. As ultralow sensitivity player (sensitivity ~ 1.0, mx510, default windows with no enhpp and noforce commands) playing since 1999 i can feel it very well. I just cant play it my way... Btw i already had this bug many years ago (same soft\hardware). But i cant remember how i managed to fix it... m_rawinput 1 looks not bad, but i cant find my feelings with it.

Nekitz0r, AndreiRomania and other guys are right. All wee need is to get back our mouse performance. Please try to figure out the cause, not spike-nails. Mouse polling rates functionality is good, but now it can probably bring some new bugs. USB fix for polling rates (usbmrs11.exe for winxp) had nothing to do with mouse behaviour in general. Just minor smoothness adjustment.

Please check this article by MarkC (MouseMovementRecorder creator): http://donewmouseaccel.blogspot.ru/2009/06/out-of-sync-and-upside-down-windows.html Another bookmarked link: http://www.drdobbs.com/windows/some-things-ive-learned-about-win32-game/184410376

In my opinion the problem can be related to fps\screenrates issues. I like 120 hz at 120 fps, but i dont need it if i cant move fast. Regression testing for legacy anomalies should be performed very carefully, because they form uniquenss of the game.

You're our only hope. Please fix it.

Hope you can understand my engrish.

PS About EhPP and noforce commands:

@alfred-valve I've noticed that sometimes CS activates Enhance pointer precision in Windows (Mouse settings) It's possible ? Or my mistake...

Every time u start CS (hl.exe) EhPP changing to 1. When you quit it reverts back. It can be seen if your cs suddenly crushed: mouse cursor accelerated, and EhPP checkbox ticked. http://quakeone.com/76711-post79.html

There is nothing in code that I know of that enabled "enhance pointer precision" (I am not sure what that does)...

Check inputw32.cpp (for me available in HL1_src_vs2005):

static int originalmouseparms[3], newmouseparms[3] = {0, 0, 1};

and IN_StartupMouse for -noforcemspd command.

  if ( gEngfuncs.CheckParm ("-noforcemspd", NULL ) ) 
      newmouseparms[2] = originalmouseparms[2];

Q2 winxp fix: http://src.gnu-darwin.org/ports/games/q2pro/work/q2pro/source/win_mouse.c and original: https://github.com/id-Software/Quake-2/blob/master/win32/in_win.c

So i think cs dont need raw input actually.

Beginning with Windows XP, Direct Input internally uses the "Raw Input" API anyway, so there shouldn't be any effective difference (stupid buffer limitations excluded). "Internally, DirectInput creates a second thread to read WM_INPUT data, and using the DirectInput APIs will add more overhead than simply reading WM_INPUT directly." http://msdn.microsoft.com/en-us/library/ee418864(v=vs.85).aspx

See quake in_mouse variables:

in_mouse -1 = windows rendering, your windows sensitivity intervenes with the quake sensitivity, some like it this way. And you can use the windows mouse control panel thing to perhaps remap mousebutton clicks to keystrokes. in_mouse 1 = directinput from directx in_mouse 2 = raw input, meaning QL talks to the mouse directly, no handler in between.

in quake 3 if you use "in_mouse -1" it means that you're not using direct input, which means if your fps drops a lot your mouse will not keep up with fast moves because it updates itself every frame. but if you use "in_mouse 1" it means direct input is enabled and even if your fps is 30 you can do super fast flicks and the mouse keeps up perfectly.

Can we have these three options for testing?

What about players who dont use any noforce commands and play default with native windows acceleration? (mousespeed 1)

HeadshotDeluxe commented 11 years ago

https://github.com/ValveSoftware/halflife/issues/365 -same problem

HeadshotDeluxe commented 11 years ago

try to launch in software mode with m_rawinput 0 - just terrible