Skip to content

Instantly share code, notes, and snippets.

@wey-gu
Last active March 6, 2024 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save wey-gu/9ef27e5a34ea1c5058ade42fd0d9b798 to your computer and use it in GitHub Desktop.
Save wey-gu/9ef27e5a34ea1c5058ade42fd0d9b798 to your computer and use it in GitHub Desktop.
Red Alert 2 on Chromebook

TOC

Table of contents generated with markdown-toc

Options

In ChromeOS(probably similar with other Linux Distributions), we could play RA2 in browser or with Wine.

The browser version is really SOTA solution while it doesn't support single user mode(but we could play with friends!).

The Wine version had taken me quite some hours, thus I put things together in this gist, so you don't have to.

Wine

We will need:

  • Linux Env to run normal Linux
  • Flathub to run X App w/o taking care of dependencies
  • POL(PlayOnLinux) as a handy Wine Frontend/Shell
  • CNC-ddraw to mitigate slow gaming

Installation

Flathub

sudo apt install flatpak
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Restart the machine

PlayOnLinux(Wine Shell)

flatpak install com.playonlinux.PlayOnLinux4

# Run it with
flatpak run com.playonlinux.PlayOnLinux4

Wine(3.21)

This is the verified latest working version, all newer versions will not display properly of RA2.

To download it, in POL, Click Tools --> Manage Wine versions

Wine

Configuration and Place Game

Create Virtual drive

Let's create a virtual drive with Wine 3.21 prefix. To do so just:

  • Click Configure
  • Click New, Next
  • Select 32 bits windows installation
  • Select 3.21 Wine version
  • Provide name of the virtual drive, i.e. ra2_wine3.21
  • Next, Next, Next...

We'll see this:

Virtual_Drive_Wine_3.21

Place Game Dir

As for now, .var/app/com.playonlinux.PlayOnLinux4/data/PlayOnLinux/wineprefix is the path our virtual drive(wineprefix) is placed, we could create a soft symbolic link for it like:

cd ~
ln -s .var/app/com.playonlinux.PlayOnLinux4/data/PlayOnLinux/wineprefix pol_wine_prefixes

Then we could copy game dir from ~/pol_wine_prefixes/ra2_wine3.21/drive_c/Program Files:

Assume I had placed my ra2 game folder(with ra2.exe under it) under: '~/misc/Red Alert 2', then we copy them to the Program Files of our wineprefix with:

cp -r ~/misc/Red\ Alert\ 2 .

Create Game Shortcut

Then, we just Click "Make a new shortcut from this virtual drive" and "Browse" our game entry .exe file as a shortcut that we could run with POL/Wine:

Create Shutcut

And afterwards, we'll see it's there on first window of POL:

Shortcut

Configuations

Leveraging cnc-ddraw

W/o cnc-ddraw, ra2 will be quite slow running in Wine.

Thanks to https://github.com/FunkyFr3sh/cnc-ddraw, we could mitigate compatibility issues in older games, such as black screen, bad performance, crashes or defective Alt+Tab.

First we follow its readme to download the cnc-ddraw.zip and extract all files and place it in our ra.exe dir.

The next step of winecfg will be done then.

Configure Wine

With POL, we could go to Wine, Configure Wine to change settings like:

  • For Graphics, we need to ensure it's not emulating virtual desktop(for cnc-ddraw to work properly).

  • For Applicaiton, we could set Windows Version as Windows XP.

  • For Libraries, type ddraw and click add.

Then, we could configur Display of Wine like this:

Configuration display refresh rate(external monitor)

I found, when connecting to my 4K display, the sound of the game will be lagging, and after some inspection, the root cause was the refresh rate that causing this.

So I changed refresh rate to 30Hz to fix it.

Run it!

In main screen, run the shortcut we created, enjoy and have fun!

Play Online

All we need is to browse our purchased game package or folder, and visit https://game.chronodivide.com/ to play with others.

chronodivide.com

@wey-gu
Copy link
Author

wey-gu commented Dec 31, 2023

Verified on

  • Pixelbook GO(non-4k)
  • Pixelbook GO, with external 4K monitor(need limit 30Hz refresh rate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment