Live data from Hacker News

Running decade-old games in containers

misha.brukman.net

21–30 of 57 posts

Re: Running decade-old games in containers

#22

I'd really love to see a similar approach but applied to games much older, like the ones you have to pull out a DOSBOX to play, or a Win95 virtual machine. The Win95 games are going to be much more difficult to set up because the VM needs a bunch of stuffs to work properly (sound, video) while the DOSBOX does everything for you.

Blog post author here.

Yes, I'm planning to do this for much older games in the future, and you're also right that DOSBox does a lot of that for you!

One thing I've noticed is websites that let you play using old DOS games via DOSBox right from your browser (e.g., see https://www.dosgames.com/), so I was going to make a blog post for how to do that yourself, from scratch.

Would that be of interest?

Re: Running decade-old games in containers

#23

I'd really love to see a similar approach but applied to games much older, like the ones you have to pull out a DOSBOX to play, or a Win95 virtual machine. The Win95 games are going to be much more difficult to set up because the VM needs a bunch of stuffs to work properly (sound, video) while the DOSBOX does everything for you.

If I were to guess, I'd try to run qemu-kvm with exposed VNC... a "builder" intermediate that installs w95 as a base image, with a second dockerfile using that as base and installs the game in the virtual disk using overlay images.

That should be decently fast, the only thing I dunno is how easy it is to automate a w95 install when you only have an 1:1 iso image of a retail setup CD/diskette.

Re: Running decade-old games in containers

#24

Is this easier than VirtualBox?

Blog post author here.

A virtual machine solution (such as VirtualBox) requires more CPU/RAM resources than a container, because you're running an extra copy of the entire operating system, in addition to your base system that you're always running.

A container is much more light-weight than a VM because it relies on the services of the underlying OS and just provides the runtime environment, but not the OS; please see https://www.backblaze.com/blog/vm-vs-containers/ for more detains on the distinction.

In any case, it would actually be more complex to use a VM, because I would first have to do a full installation of Ubuntu in the VM, before I could get started with installing the game, whereas with Docker, I can just build a container image starting with ubuntu:14.04 as a base, and have it working in seconds (minute or two once I started installing the required i386 packages, but that's unavoidable).

If you look at the end result, it's actually quite a simple Dockerfile, and the installation from start to playing will take you less time than installing a full Ubuntu distribution in a VM.

Re: Running decade-old games in containers

#25
post #17
post #16

Earlier quoted context omitted.

On of the first Humble Bundles for Linux games came with a Deb package of the game. The game is a Linux i386 binary, which means that installing directly on your host will pull in all sorts of i386 libraries. If you host is amd64, it is quite messy.

Looks like Proton does a better job than snap or rpm. I don't get why there is no Linux layer dedicated to translating x32 library calls into x64 calls. The other way around is often impossible I know.

Proton is a packaged Wine (Windows emulator) with DXVK (like DirectX for Linux).

Snap packages are based on core images, so if there was interest, they could create a core image that has Wine and DXVK. Then any game would result Wine and DXVK.

RPM is comparable to Deb packages. There is no significant separation of one package from another apart from file permissions.

Re: Running decade-old games in containers

#28
post #18
post #15

Earlier quoted context omitted.

They could make a base image and then an image layer that contains the game files only. Now you have a single file image per game with a consistent base.

Sure, as a follow-up they could do that. That's (very clearly declared to be) not the goal of the author though.

My point is that by separating the layers it does fulfill the declared goals but in a more portable way. As implemented, there could be hidden dependencies on the local file system or across game installs.

Re: Running decade-old games in containers

#30
Hi HN, blog post author here.

Rather than just posting the end result that worked, this is my trial-and-error "walthrough" of building a container from start to finish, in order to run several games from a while back.

Hopefully, this can get you started with playing these and other games again, or discovering them for the first time! Let me know what you think and if you'd like to see more of this in the future.

Post reply on HN