(no subject)
Jul. 30th, 2004 01:05 amSome time ago I used to play quite a bit of Starcraft. One of its features is the ability to play with your friends - as allies or enemies - over the net; right now I'm feeling like I'd quite like to get back into that.
Starcraft is a Windows game which means that playing it requires a reboot, maintaining a Windows installation for essentially only the purpose of playing Starcraft, etc. All this is quite inconvenient, and indeed expensive, as newer hardware sometimes implies the need for a new version of Windows. (I don't even know if my Windows install boots properly at the moment.)
Wine, a reimplementation of the Windows API for Linux, supports Starcraft, up to a point. I've had it working relatively well in the past but the nature of Wine is that things start and stop working from version to version. Other bits of software like the Linux kernel affect matters too.
So I've been spending the last few evenings doing my best to get Starcraft working under Wine. I can indeed get to the point of playing a game but performance is poor - while things like the (pretty graphics-intensive) intro run fine small things like the mouse pointer and individual units are updated too slowly.
One common cause of this is using the wrong screen depth. But using an 8-bit X server to run Starcraft comes up with completely mad colors, and stuff found via google suggested that you needed more than that anyway.
Another common cause of this is lack of support for a direct screen access feature of the X server. Turning on debugging revealed this was indeed a problem, but the standard advice for fixing it no longer works, which I believe to be a kernel change. This is still on the to-do list to investigate; I don't much fancy patching my kernel just to run a game but if needs must...
Anyway running the game as root acts as a workaround in the sense of eliminating the error message, but I can't tell if it actually solves the problem because it fails to take input focus when I do this - the mouse and keyboard are ignored and I have to go downstairs and type runes over SSH to get my display back.
So my next thought was to see if the slowness could be fixed more directly. Debugging output suggested some bitmap-related functions were being called very regularly and a brief inspection showed one of these to have a horrendously inefficient implementation. After a bit of faffing I'd produced an improved version but eventually it became clear that it wasn't the culprit after all - even "optimizing" the function by entirely removing the bit that did the work made no difference to appearance or performance. Who knows what they were actually being called for.
All of this is fast approaching being too much effort just to avoid the hassle of a native Windows install. That may not be the only answer though; I've been pondering buying a Mac laptop for some time, and it seems that it is indeed possible to play Starcraft, including network games, on such a platform. This may be enough to push me into actually spending the money.
That'd just leave the problem of sorting out a way for LNR to play too...