Tuesday, May 17, 2011

Bug 6971. Status: RESOLVED FIXED

YES! YES! YES! YES! YES!  IT FINALLY HAPPENED!!!!  This bug has been plaguing me and thousands of other Linux users for years!  It finally got fixed not too long ago, and I am oh so happy!  In order for you to understand why, I'm going to have to give you a brief glimpse into it, starting with Linux.

Linux, in common usage, is an operating system.  An operating system is what allows you to actually use the computer.  Examples are Windows, Mac OS X, iOS, Android, Chrome OS, and the like.  Generally programs can only run on the systems they were designed to.  For example, an Android phone can't use an iPhone app, without the app being reprogrammed to be used on the Android.  Likewise, Linux can't run Windows programs, at least natively.

Enter Wine, a Linux program that lets Linux run Windows programs.  This is possible because Wine is effectively an entire reprogramming of most of Windows.  Even after 17 years, Wine still isn't perfect, mostly because Windows keeps updating.  However, most programs are capable of running fairly well.  Especially games.  But for the longest time many games were experiencing a bug which rendered them nearly-unplayable: 6971.

Bug 6971 is a bug relating to mouse movement.  It mainly comes into effect in games where the mouse is used to turn your character.  What happens when experiencing the bug is that your character will spontaneously stop turning, as if you hit a wall.  Mainly because something did hit a wall: your hidden mouse pointer being the something, and the edge of the screen being the wall.


This bug happened primarily because Linux couldn't read mouse movement the same way Windows does.  Windows reads mouse movement by determining how much the pointer will move then actually moving the pointer.  Linux used to do the opposite; moving the pointer and then calculating how much it moved.  If for whatever reason the pointer couldn't move, it returns 0 movement, no matter how much your mouse actually moves.  So, when playing many games, you wouldn't be able to turn all the way around.

Not every game does this.  Most older games work perfectly fine; it's newer games that have this problem for the most part.  This is because Windows used to read mouse movement the same was Linux did: calculating pointer movement after it moves.  Because of this, game developers used to use a little trick called mouse-warping.  Whenever the mouse moved, the program would calculate how much it moved, and then throw the pointer right back into the center of the screen so that it'd never touch an edge.  This trick, despite being unnecessary, still works to this day.  Games as new as Portal 2 still use the warping method to read mouse movement.

So, what Wine would do for games that didn't use the warping trick, is to warp the mouse for it, effectively tricking the game into working right.  But sometimes this worked too well.  Some games were so well tricked that the mouse would always warp, even when in the game menus.  Thus, some games were effectively stuck between a rock and a hard place: either you can't turn around, or you can't even use the menu.

It was only a few months ago that Linux was finally able to read movement the same way Windows does.  It took a few months for Wine to start using this new feature, but they got it.  The mouse works identically to Windows, meaning that so many more great games are playable, such as Bioshock, Mount&Blade, Mass Effect, Unreal Tournament, Grand Theft Auto 3 and newer, Star Wars: Knights of the Old Republic, Rainbow Six Vegas, Big Rigs: Over the Road Racing, Star Wars: Republic Commando, Mirror's Edge, Assassin's Creed, Halo, Thief, Borderlands, Swat 4, Fallout 3, Dragon Age 2, America's Army, Audiosurf, Crysis, Batman: Arkham Asylum, Monday Night Combat, Red Orchestra, Warcraft 3, and Kevin Bacon.

If any of Wine's developers are somehow reading this, consider this my thanks for your hard work.  As frustrating as 6971 was to experience, I know for a fact that I'd never be able to solve 6971 in my current state, so thanks for your hard work.  Keep it up, because you're so close to perfection.  Now if only somebody could make a good video editor on Linux.  Wait, VLC's developers are making one?!  OH @#$& YEAH!  It's going to be awesome.

No comments:

Post a Comment

Copyright Notice:

All text (unless otherwise attributed) is copyright (C) 2011-2014 Joel "iLag" Hammond and licensed under the CC BY-SA 3.0 License.
Creative Commons License