City of Heroes on Linux

From City of Heroes: Rebirth Wiki
Jump to navigation Jump to search

See also City of Heroes on Mac

Overview

It is possible to run City of Heroes on Linux through a technology called WINE (WINE Is Not an Emulator). By porting the Windows API libraries that City of Heroes uses to Linux, WINE effectively "fools" City of Heroes into thinking that it is actually running on Windows.

How It Works

Programs that run on Windows do not directly access the hardware in the machine. For example, if a program needs a file from the hard drive, it does not talk directly to the hard drive, but it calls a function in the kernel, which in turn talks directly to the hard drive.

The primary advantage of this type of abstraction is that programs do not have to worry about the hardware-specific details of every device that is installed. Before this level of abstraction was achieved, every program had to have special drivers for every device that might be used. Now, only one set of drivers must be installed on Windows, which can be shared through a common set of functions that Windows provides (called the Application Programming Interface, or API).

A special set of functions may be grouped into a programming library. Such libraries typically handle some specific functionality. For example, there are two primary graphics libraries in use today to program games: Microsoft's DirectX, and OpenGL, an industry-standard graphics library. Since DirectX is a proprietary software library, programs that use it will typically only run on Windows. Since OpenGL has Windows and Linux versions, however, programs that run using this library are much more easily converted between Windows and Linux.

The open source community developed an application called WINE that provides a layer of abstraction between Windows programs and the system they're running on by taking the place of the Windows kernel and API. Among other things, it implements much of the DirectX library (converting the 3D parts to OpenGL). When WINE is installed on Linux, programs that use DirectX may be able to run, because they believe they are calling DirectX functions, and those functions work similarly under Linux and Windows.

City of Heroes in particular already uses OpenGL for its 3D graphics (while using DirectX primarily for input), which gives it a performance advantage when running through WINE.

Installation

The Sunrise launcher can work with WINE, however because it requires .net it can be tricky to get working. The Sweet Tea launcher does not require .net, so is much easier to use with WINE, and is currently the recommended launcher for playing Rebirth on Linux. Sweet Tea has been reported to "just work" with current versions of WINE, especially version 7.2 or higher. Sometimes when City of Heroes itself is running, the mouse does not respond. In this case installing dinput with winetricks usually resolves that issue.

External Links