City of Heroes on Linux: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
imported>TonyV
No edit summary
 
(I may be missing something here but I've no idea why it was suggested to scribble on the root filesystem!)
 
(96 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{TOCright}}
{{see also|City of Heroes on Mac|City of Heroes on Steam Deck}}
{{EdNote|note=Homecoming Developers do not support any client bugs on Linux.  If an issue cannot be reproduced in a Windows client, Linux specific bugs will be given a form response and closed without resolution.  Please use the [https://forums.homecomingservers.com/forum/12-help-amp-support/ Homecoming Forums] for Linux client support from other users.}}
== Overview ==
== Overview ==


It is possible to run City of Heroes on Linux through a technology called [http://www.winehq.com/ ''WINE''] (''W''INE ''I''s ''N''ot and ''E''mulator). 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.  A program called [http://www.transgaming.com/index.php?module=ContentExpress&file=index&func=display&ceid=29 Cedega] allows City of Heores to be realtively user-friendly to configure and run.
It is possible to run City of Heroes on Linux through a technology called [http://winehq.com/ ''WINE''] (''W''INE ''I''s ''N''ot an ''E''mulator). 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.
 
== Instructions (Homecoming Launcher) ==
[[File:Thunar-hidden-files.png|right|300px|thumb|If you can only see Desktop, Images, Documents and similar folders in your home folder, make sure "Show hidden files" is checked in your File Manager first".wine" should appear normally.]]
[[File:Additional-drivers.png|right|300px|thumb|NVidia users: higher numbers will support newer features, lower and older numbers are more stable if the higher numbered ones have problems.  Don't use server drivers or "Nouveau", they won't allow City of Heroes to launch.]]
''For sake of brevity, we'll assume you have a working Linux installation that is fully patched.  The distro does not matter.  Also assuming a 64-bit system and you can replace '''"usernameGoesHere"''' below with your Linux username where needed.''
 
''Using a Steam Deck? An install script is available on [[City of Heroes on Steam Deck]].''
 
*Install Wine Stable using this download page -- https://wiki.winehq.org/Download
*Once installed the default Wine Prefix (/home/usernameGoesHere/.wine) will be made. It will prompt to install Gecko and Mono. Note that NEITHER library is necessary to run Homecoming: City of Heroes (although Mono will be useful if you wish to use Mids Reborn or other .NET apps later.)  Another note worthy of mention -- it is not prompted during setup but you do NOT need to install Visual C++ Runtime at all.  Wine handles this requirement automatically.
*Run the Homecoming Installer.  Choosing a location on drive C will try to install Homecoming in ~/.wine (eg C:\Games\Homecoming -> ~/.wine/drive_c/Games/Homecoming); Z: is the root Linux drive (so Z:\Games\Homecoming would correspond to /Games/Homecoming; an ordinary user account would not have permission to create this directory).
 
It is also important to note this procedure is sufficient for a single-user Linux system alone. For a multiuser system, either you need to repeat the procedure for each user (and sufficient disk space is required: 6-12GB per user), or configure permissions to allow multiple users access to the same WinePrefix.
 
== System Requirements ==
 
As a generality, if a system would not be able to play City of Heroes using Windows because of the hardware in use there's a good chance Linux won't work either.
*1 GHz Dual Core processor (AMD/Intel 32 or 64 bit),
*2GB of RAM,
*a video card or integrated graphics support capable of OpenGL 2.0/3.0,
*6-12GB free hard drive space. 
 
'''Most systems made since 2018 should more than meet these requirements.'''  The biggest factor is video support; in most cases performance will be either equivalent to, or have a slight performance increase (around 10%-20%) over Windows due to less overhead processes present in the OS.  This varies due to the distribution used, graphics driver installed, and power consumption setting (such as a laptop on a battery, or any 'Eco mode' settings used.)
 
== Support Lifeline ==
Linux has one key difference over Windows for support: When NVidia, AMD, or Intel drop Linux driver support for a video card and the kernel fails to compile with the legacy driver in-place, you can no longer play City of Heroes on that system. '''There is no specific date when this support ends; it will not be announced publicly when a software upgrade fails.'''  The day that the video driver fails to recompile kernel modules for your current OS is when you need to decide.  Possible fixes include:
 
*Run COH on an older OS (that still receives updates) so older drivers continue to compile normally,
*Upgrade your hardware, or
*Set up your system to dual-boot (or wipe and restore) Windows to continue play.
 
== Unsupported Linux Hardware ==
The following Linux systems will not have the resources to play City of Heroes.
 
=== ARM Linux ===
Homecoming Launcher (and more importantly the City of Heroes client) is not compiled for ARM.  Wine will not run HCLauncher on an ARM system without a Software Emulator for X86 apps.  Single-Board Computers (Raspberry Pi and variants) will not run City of Heroes with Wine alone.
 
=== Chromebooks ===
As any Chromebook with an ARM chip is a non starter (see "ARM Linux" above this section), Chromebooks generally cannot run City of Heroes. The few exceptions out there either are discontinued models no longer supported, or cost more than a Windows Laptop which can run it far easier.
 
== Paid Support ==
=== Codeweavers ===
The main sponsor of the Wine Project, [https://www.codeweavers.com/crossover/#linux Codeweavers], maintains a paid license of Crossover as a Prosumer Wine distribution offering tech support for use.  It is important to note two things:
#''Paying for Crossover is not required to play Homecoming if you can install Wine on your own'', however, it will work if you require paid Tech Support assistance instead of a Community-led forum.
#Crossover's main customer base is business-class users.  (They will support gaming, but a lot of what Cedega did in the past to simplify gaming use is not built into the application.)


== How It Works ==
== How It Works ==
{{hidden|Click to Read|bg1=brown|
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).


Most programs that run on Windows do not directly access the hardware in one's machine. For example, if a program needs a file from the hard drive, it does not talk directly to the hard drive. Instead, it calls a function in Windows, which in turn talks directly to the hard drive.
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 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).
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.


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, a graphics library that is largely implemented through open source software.  Since DirectX is a proprietary (or ''closed source'') software library, programs that use it will typically only run on Microsoft's software, which is the various versions of Windows.  Since OpenGL has Windows and Linux versions, however, programs that run using this library are much more easily converted between Windows and Linux.
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.


Unfortunately, City of Heroes uses the DirectX library for all of its graphics, which means that it would normally only run on Windows.
;WINE - Wine is Not an Emulator.
:The app compatibility layer that can be optionally installed on *nix systems (Linux, including Debian, Fedora, and FreeBSD variants, Android and MacOS under the Darwin project) to allow x32/x64 Windows apps to run at close-to-native execution. Wine includes libraries, system files, and enough of a Windows filesystem to fool most Windows apps into thinking they're running on Windows itself.


However, the open source community developed an application called WINE that implements many of the DirectX library functions using calls to the functions in OpenGLWhen this application 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 the same now under Linux and Windows.
;Wine Prefix - Basic unit of Wine access.
:A Wine Prefix is a miniature file system of Windows.  The default one on your system is /home/YourUsernameHere/.wine and is made automatically the first time you run a Windows app or use Wine.  (The . in front of Wine means it is a hidden directory.  You can turn on "Show Hidden Files" in your file manager to see it.)  Inside the .wine folder is a similar directory structure to a Windows Hard Drive, with a Windows folder and essential DLLs inside, all the folders in Windows such as System32, Fonts, and other system resources, and a Program Files folder for installed apps that require oneYou can made additional Wine Prefixes, assuring your programs are isolated from each other (if an app fails in one prefix, the others are unfazed.)


== Cedega ==
;OpenGL & Vulkan - Graphics Libraries.
:OpenGL was originally created by Silicon Graphics Inc. as an open source graphics library for game and 3D programming use.  Later adopted by the Khronos Group OpenGL is a legacy standard on most graphics cards succeeded by the backwards-compatible Vulkan standard.  City of Heroes uses OpenGL 2.0 and 3.0 features in the game engine.


Unfortunately, Linux is a rather difficult operating system to configure and run properly, and configuring programs to run using WINE is challenging task. A company named [http://www.transgaming.com TransGaming] has developed an application named [http://www.transgaming.com/index.php?module=ContentExpress&file=index&func=display&ceid=29 Cedega] that makes the task of installing WINE and configuring Linux to run games much easierCedega is commercial software that requires a $5 per month (or $55 per year) subscription fee to maintain the latest version, but many users use Cedega to make ease of installation and use of games running on WINE easier.
;DirectX - Microsoft's Gaming Support Library.
:DirectX since the 2000's has been Microsoft's attempt to unify multimedia features of Windows with performance expectations for PC Gaming. While most games are shedding older versions of DirectX support, City of Heroes remains a DirectX 8 compatible title that is modified to work on newer versionsDirectX also includes Direct Input (an older gaming accessory signaling standard) and Direct3D (Microsoft's approach at OpenGL.)


== How Well Does It Run? ==
;DXVK - Linux Direct X to Vulkan Translation Layer
:As graphics cards de-emphasize performance in legacy areas for more current standards Vulkan will receive more improvements over time over OpenGL.  DXVK allows a modern graphics card to take current Vulkan support already in place to use on older OpenGL calls for a slight performance increase.  (Lutris is a GUI Game Launcher that handles DXVK installation in the same package for you along with other optimizations as well.)


There are advantages and disadvantages to running City of Heroes on LinuxSome of them are discussed below.
;FUSE - Filesystem in USErspace
:FUSE is Linux's approach at a secure file system for users to save configuration files, run local applications specific to each user, and store data secure from other users on the same system.  A user's home folder in FUSE has the same shortcut: ~ (tilde), which can be used on a relative path similar to Windows %APPDATA% shortcut: "~/.wine/drive_c/" will always send you directly to your default WinePrefix's drive_c folder. When you have a WinePrefix installed it resides in userspace on your home folderThe apps you install and play are only available to you initially (without editing permissions or ownership) and other users will need to install their own WinePrefix as well.  This separation prevents one user's Wine apps from affecting another and adds modularity. (Multiple WinePrefixes can exist per user, such as a work one vs. a home one, separate ones per game, etc.)


=== Advantages ===
:FUSE is preferable over another location such as /usr, /var, or /etc as it simplifies file changes, allows Windows file permissions to exist and ignore Linux attributes, and is safer to other users on the same system from a security standpoint.


* Because WINE actually implements many of the DirectX functions better than Microsoft has, City of Heroes typically runs faster on Linux.  This is typically reflected in a higher frames-per-second (fps) rate, faster zone loading, and faster game loading and exiting.
;Mesa - Freedesktop open source graphic drivers that are vendor-neutral.
* Because Linux is open source software, one does not need to pay several hundreds of dollars for a copy of Windows to run City of HeroesAlso, there are no issues regarding upgrades (e.g. to Windows Vista), as all upgrades to most Linux distributions are free.
:Mesa graphic drivers are used as the core of most Linux distributions as they come with the installation regardless of what card you useCertain cards such as Intel only use Mesa in their core setup and require no other proprietary drivers to work. Others use Mesa as a fallback or safety option when the main driver fails.
* Running City of Heroes on Linux allows one to access other convenient features of Linux, such as virtual desktop switching, filesystem links, etc.


=== Disadvantages ===
;Nouveau - Freedesktop approach at a 100% open source NVidia video driver.
:Nouveau was started in the 2000s as a response to NVidia's open source ambitions at the time (none would be fair to say).  The effort is trying to make a video driver for NVidia cards without reverse engineering their proprietary drivers so it is compatible with GPL and Free Software standards.  The downside to the current approach for gaming is Nouveau is aiming for legacy compatibility over new features.  While Nouveau may be useable for gaming purposes someday it is not advisable to play City of Heroes using Nouveau at this time. (Users who have strong opinions on Free Software standards that prevent them from accepting the use of proprietary drivers on a Linux system may have an easier time seeking Intel, AMD and Radeon hardware over NVidia until this improves.)


* In spite of remarkable strides in making Linux more user-friendly, it can still be rather difficult to configure applications to run on it. This is especially true of applications that are not written for the specific Linux distribution one is using.
;Kernel Modules - Linux's approach at hardware driver support.
* There are a few quirks in the game.  The primary one is that City of Heroes detects that the video drivers in use are an old version of the drivers, which prevents some graphics functionality, such as water effects and depth-of-field effects from being enabled.
:A kernel module is a compiled piece of software that "hooks" between the Linux kernel itself and the hardware system calls. Kernel Modules can be compiled when a system updates a hardware driver OR Linux Kernel.  This causes the Kernel Module to recompile to handle the new instructions on either side.  The focus on Free Software and Open Source code means that when a problem is found with hardware the community has the ability to handle it on their own; when proprietary drivers are used issues with Linux are 100% up to the hardware manufacturer to solve. Proprietary driver improvements have had middling to low results for Linux users historically. (Intel and AMD have had a far better track record of open sourcing their firmware code; NVidia since 2012 is improving gradually.)
* Currently, none of the City of Heroes-related third party utilities (such as [http://www.citygametracker.com/ City Game Tracker], [http://www.herostats.org/ HeroStats], [http://sourceforge.net/projects/piggviewer/ PiggViewer], [http://net-marks.com/cohtools/tweakcoh/ Tweak CoH], etc.) have been verified to work on Linux. This may be a minor issue of configuring WINE for these applications, but that work has currently not been completed.
}}


== External Links ==
== External Links ==
* [https://forums.homecomingservers.com/topic/23284-homecoming-launcher-linux-advice/ Linux Advice] - Written in 2020, most distributions listed here are outdated. Also, Lutris is not necessary to run the title at all.
* [http://appdb.winehq.org/objectManager.php?sClass=version&iId=2980 City of Heroes/City of Villains] entry in the WINE application database.
* [http://winehq.com/ WINE], the underlying technology that allows Windows programs to run on Linux
* [https://archive.paragonwiki.com/wiki/City_of_Heroes_on_Linux Paragon Wiki Archive version of this same page]


* [http://www.gameamp.com/guide/viewGuides/330.php Detailed HOWTO] on GameAmp's site for how to get City of Heroes running on Linux
[[Category:Game Client]]
* [http://www.transgaming.com/index.php?module=ContentExpress&file=index&func=display&ceid=29 Cedega], an application published by [http://www.transgaming.com TransGaming], to make installation and configuration of City of Heroes on Linux more user-friendly.
* [http://transgaming.org/gamesdb/games/view.mhtml?game_id=3321 City of Heroes] and [http://transgaming.org/gamesdb/games/view.mhtml?game_id=3956 City of Villains] entries in the Cedega games database
* [http://transgaming.org/forum/viewforum.php?f=49 TransGaming forum] for City of Heroes and City of Villains
* [http://cedegawiki.sweetleafstudios.com/wiki/City_of_Heroes City of Heroes on Linx wiki] dedicated specifically to information about running City of Heroes on Linux
* [http://www.winehq.com/ WINE], the underlying technology that allows Windows programs to run on Linux

Latest revision as of 16:31, 18 January 2024

See also: City of Heroes on Mac and City of Heroes on Steam Deck
Editor's Note:

Homecoming Developers do not support any client bugs on Linux. If an issue cannot be reproduced in a Windows client, Linux specific bugs will be given a form response and closed without resolution. Please use the Homecoming Forums for Linux client support from other users.

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.

Instructions (Homecoming Launcher)

If you can only see Desktop, Images, Documents and similar folders in your home folder, make sure "Show hidden files" is checked in your File Manager first. ".wine" should appear normally.
NVidia users: higher numbers will support newer features, lower and older numbers are more stable if the higher numbered ones have problems. Don't use server drivers or "Nouveau", they won't allow City of Heroes to launch.

For sake of brevity, we'll assume you have a working Linux installation that is fully patched. The distro does not matter. Also assuming a 64-bit system and you can replace "usernameGoesHere" below with your Linux username where needed.

Using a Steam Deck? An install script is available on City of Heroes on Steam Deck.

  • Install Wine Stable using this download page -- https://wiki.winehq.org/Download
  • Once installed the default Wine Prefix (/home/usernameGoesHere/.wine) will be made. It will prompt to install Gecko and Mono. Note that NEITHER library is necessary to run Homecoming: City of Heroes (although Mono will be useful if you wish to use Mids Reborn or other .NET apps later.) Another note worthy of mention -- it is not prompted during setup but you do NOT need to install Visual C++ Runtime at all. Wine handles this requirement automatically.
  • Run the Homecoming Installer. Choosing a location on drive C will try to install Homecoming in ~/.wine (eg C:\Games\Homecoming -> ~/.wine/drive_c/Games/Homecoming); Z: is the root Linux drive (so Z:\Games\Homecoming would correspond to /Games/Homecoming; an ordinary user account would not have permission to create this directory).

It is also important to note this procedure is sufficient for a single-user Linux system alone. For a multiuser system, either you need to repeat the procedure for each user (and sufficient disk space is required: 6-12GB per user), or configure permissions to allow multiple users access to the same WinePrefix.

System Requirements

As a generality, if a system would not be able to play City of Heroes using Windows because of the hardware in use there's a good chance Linux won't work either.

  • 1 GHz Dual Core processor (AMD/Intel 32 or 64 bit),
  • 2GB of RAM,
  • a video card or integrated graphics support capable of OpenGL 2.0/3.0,
  • 6-12GB free hard drive space.

Most systems made since 2018 should more than meet these requirements. The biggest factor is video support; in most cases performance will be either equivalent to, or have a slight performance increase (around 10%-20%) over Windows due to less overhead processes present in the OS. This varies due to the distribution used, graphics driver installed, and power consumption setting (such as a laptop on a battery, or any 'Eco mode' settings used.)

Support Lifeline

Linux has one key difference over Windows for support: When NVidia, AMD, or Intel drop Linux driver support for a video card and the kernel fails to compile with the legacy driver in-place, you can no longer play City of Heroes on that system. There is no specific date when this support ends; it will not be announced publicly when a software upgrade fails. The day that the video driver fails to recompile kernel modules for your current OS is when you need to decide. Possible fixes include:

  • Run COH on an older OS (that still receives updates) so older drivers continue to compile normally,
  • Upgrade your hardware, or
  • Set up your system to dual-boot (or wipe and restore) Windows to continue play.

Unsupported Linux Hardware

The following Linux systems will not have the resources to play City of Heroes.

ARM Linux

Homecoming Launcher (and more importantly the City of Heroes client) is not compiled for ARM. Wine will not run HCLauncher on an ARM system without a Software Emulator for X86 apps. Single-Board Computers (Raspberry Pi and variants) will not run City of Heroes with Wine alone.

Chromebooks

As any Chromebook with an ARM chip is a non starter (see "ARM Linux" above this section), Chromebooks generally cannot run City of Heroes. The few exceptions out there either are discontinued models no longer supported, or cost more than a Windows Laptop which can run it far easier.

Codeweavers

The main sponsor of the Wine Project, Codeweavers, maintains a paid license of Crossover as a Prosumer Wine distribution offering tech support for use. It is important to note two things:

  1. Paying for Crossover is not required to play Homecoming if you can install Wine on your own, however, it will work if you require paid Tech Support assistance instead of a Community-led forum.
  2. Crossover's main customer base is business-class users. (They will support gaming, but a lot of what Cedega did in the past to simplify gaming use is not built into the application.)

How It Works

External Links