March 16, 2008

Switching away from Vista and Xubuntu?

Xubuntu is the first operating I chose to test out since my troubles with Vista.  Now that I've used it for a bit, I don't think I would like it much.  Regardless of what I do, I need to have windows, and why is that?  I love to play RTS games.  My all time favorite game is of course, Warcraft 2.  I play it on the Russian server, and about once or twice a week.  I stopped playing it for a while, but I recently played it and I got hooked again.

As I've mentioned in one of my previous posts, I am not a professional gamer by any means, but I definitely need the "speed" of a Windows machine to handle the speed at which I play.  Let me explain that further, I now average around 300APM when I play Warcraft 2, and when I play under Linux/Wine/Cedega, I cannot get that high of an APM.  It's just not possible.  The trouble comes in with the mouse, for the life of my, I cannot get it to have the response time that is needed in an RTS game.

 

Under Windows, I can select/drag/click any unit I want with a somewhat "amazing precision" :D.  It is just not possible under Xorg.  There is a lag of about 0.2 - 0.4 seconds when I click the mouse and when it is actually clicked in the game.  So, in late game, when I need to move fast, I cannot drag a box around the units that I need.  Since my mouse moves pretty fast, dragging and selecting units under Linux becomes very imprecise and at best, will be half as fast as on Windows.  The smallest unit in the game, on my screen, is about the size of a square with each side being 1/3 of an inch.  During late game, the imprecision of my click and drag is range from 1 to 12 of those units.  This is not acceptable when the orc hordes are attacking your base!

It seems like in Windows, the mouse click is registered immediately!  The box that I drag starts the moment I click the mouse.  Anytime that I miss the selection of a unit is my fault because I moved my mouse too fast, not because of hardware lag.  I've tried for about 3 hours now to find out how I can prevent this delayed response and I got nothing.  I suppose this is what I get when I try to play a game made for Windows under Linux :(.  This is my biggest reason for why I will not be using Linux as my only OS in the near future.  The gaming support aspect is not there.

I am a programmer by trade, a computer scientist by nature and a gamer by heart.

Filed under Gaming, Software by A.K.

Spread the Word!

Permalink Print Comment

Comments on Switching away from Vista and Xubuntu? »

June 24, 2008

Joe @ 6:31 pm

Hey, I just read your post, and I'm having exactly the same issue (except I'm a Starcraft player, with about 300APM, like you).

After being extremely frustrated in game, I decided to just go to my desktop and start dragging boxes, and I have exactly the same problem that you have. When I try to make a box, Linux registers my click almost at the same time that I completely finish the box. I booted into Windows and dragged boxes exactly the same way, and my boxes were exactly the size I expected them to be.

I hope I can find something about this as well. My current guess might be the pre-emption speed of the kernel. I'm generally a FreeBSD user, but I have compiled the Linux kernel once or twice, and I particularly remember a setting that allowed you to define the number of polls per second the kernel used to pre-empt a thread. The choices were 10, 100 and 1000, with 10 being default. The 1000Hz polling option was described as being optimal for an extremely high turnaround system (ie., high interactivity), but bad for a throughput system (ie., webservers).

I'm going to look into this and other things alot more to hopefully figure this out. I love Starcraft and I -cannot- stand booting into Windows to play it.

A.K. @ 6:42 pm

Joe,

It is quite annoying isn't it? If you do find a solution for this, please let me know about it. I currently don't have the time to figure it out though.

Joe @ 6:45 pm

Hey again,

Sorry for spamming up your blog, but I actually fixed this problem on my Ubuntu Hardy (8.04) machine. It turns out that the default driver for your mouse under Xorg (just called "mouse") is lacking in its response time. If you change to the evdev driver (which was supposed to be the default in Hardy, but proved too unstable to be included), you will be able to drag boxes just as well as Windows.

To do this, edit your Xorg config file at /etc/X11/xorg.conf and change:
Section "InputDevice"
Identifier "Configured Mouse"
#Driver "mouse"
Driver "evdev"
#Option "CorePointer"
#…
EndSection

The idea is that the only two uncommented lines should be the identifier and the evdev driver. None of the "Option" lines in my current Xorg config file could be left uncommented, or my mouse wouldn't respond. However, after restarting X my mouse is just as responsive as it is in Windows.

I hope everyone who intends to game under Linux can get this information, because it's absolutely vital. Here's the bugreport that helped me out:

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/144277

Good luck, and I hope you try out Linux sometime again in the future!

June 25, 2008

Joe @ 11:59 am

Hey, just wanted to drop you another line:

After changing my mouse driver to evdev, my system is handling the mouse beautifully. There's even a sensitivity option for evdev so you can control your mouse's sensitivity instead of using the weird acceleration stuff that X usually uses.

But on top of all that, Starcraft still ran a bit sluggish under wine. You wouldn't notice it just sitting at your main and spamming, but when you try to slide around, it gets really jerky and can sometimes screw up your box selecting if you're trying to rubberband around a unit offscreen.

Luckily, all that is fixed. I did this:
1) Make sure that no compositing manager is running (i.e., compiz, beryl, etc. If you've got dropshadows going, you probably have a compositor).
2) Make this key in wine's registery (via regedit): HKEY_CURRENT_USER\Software\Wine\Direct3D.
3) Make the following two string values in the Direct3D key:
Name: DirectDrawRenderer Value: opengl Type: REG_SZ (String)
Name: RenderTargetLockMode Value: readtex Type: REG_SZ

After doing those 3 things, Starcraft really runs at its native speed. I can't express how happy I am to be able to run this under Linux, and hope it goes as well for you.

A.K. @ 12:25 pm

Joe, This is great news for me. I'll soon be able to go back into Linux without worries :). Too bad my program War2Observe was written for Windows, but rightly so though. At least I know that I will not have to boot back into Windows if my friends were to ever msg me for a quick game :).

In fact, this information is pretty vital, I will probably make this content into its own post so that people can easily find it. Of coruse, credit is given where it is due :).    

Joe @ 4:36 pm

Great. To be honest, I wish there was one single post which would have directed me to do all of these things. There are plenty of guides around to get Starcraft running in the MOST primitive sense, but I really couldn't find any dealing with making it work WELL.

I hope it works as well for you as it did for me.

Leave a Comment