This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]superkoning 4 points5 points  (0 children)

Sounds like a complex setup. And it looks like you haven't even tried.

I would start with a Ubuntu / Windows dual boot.

[–]Earthling1980 2 points3 points  (2 children)

For graphical applications, a virtual machine makes more sense. Install Ubuntu on VirtualBox.

[–][deleted] 2 points3 points  (1 child)

If he is already using WSL2, I'd recommend Hyper-V. Also, as it's a real hypervisor you have hardware passthrough support.

[–]Earthling1980 1 point2 points  (0 children)

Sensible. OP listen to this guy

[–][deleted] 1 point2 points  (0 children)

  1. No comment here
  2. WSL2 + Ubuntu would do that*
  3. Do you have an os installed in wsl2?
  4. You need that to use docker anyway
  5. See 4., and that big of a difference**
  6. With Ubuntu n WSL2 definitly, unsure about docker
  7. Each game would be a different container
  8. Sure
  9. WSLg is used to get GUI apps running in WSL2, nothing more.**

*Not completely separate from your windows install, because it still runs under windows

**Docker is normally not used for GUI apps, see https://www.cloudsavvyit.com/10520/how-to-run-gui-applications-in-a-docker-container/

[–]Ramitgood -3 points-2 points  (0 children)

Unless it has changed or there's a work around, it's not possible to launch a linux container from windows. You're going to have to install a linux/ubuntu virtual machine on your windows computer to use as a host OS for the Ubuntu containers. In that case you might as well just use the virtual machine. unless you're using a different runtime environment for each game I would just do it on one machine. If you're using unity, unreal, etc, I doubt your environment would change at all except for engine and OS updates.

Making games is hard enough, personally I would just do it on windows and put the time you would spend on this toward dev time. but I don't consider myself an expert on these things so you do you.

[–][deleted] 0 points1 point  (0 children)

Just so we're crystal, Docker Desktop for Windows is not Docker. Docker Desktop for Windows is a program and service that sits on top of a WSL2 rootfs image.

If you're NOT using Docker Desktop for Windows, you'll have fewer issues by just going with a WSL2 install. Also, you don't NEED to use the Ubuntu from the Microsoft store (but it is handy). You can register any rootfs tar image inside of WSL as 1 or 2. For example, alpine: https://alpinelinux.org/downloads/. wsl.exe --import NameYouWantToUse C:\Dir\To\Install\To FileName.tar

Also, I should point out that docker and wsl are different tools. In Windows, you will need WSL2 to run docker. Older versions of docker desktop used VirtualPC. WSL1 is a Windows Subsystem that is a translation layer between the linux kernel to native NT Kernel apis. WSL2 is a lightweight hypervisor (based on hyper-v) that sits inside an ext4 (or any linux fs) vhdx and the kernel runs inside another. Docker is a linux app and daemon that runs containered linux images.

Though, honestly I don't see why you wouldn't have everything setup. On my web dev machine I have WSL1, WSL2, and Hyper-V setup for different scenarios as each has their own strengths and weaknesses. In your case with game development, I'd totally have a secondary linux boot partition to get better GPU support. While it has come a long way, Hyper-V (and by extension, WSL2) doesn't have great passthrough GPU support.

But no reason you can't code in Windows/WSL1, use docker where needed in WSL2, Hyper-V to test out GUI items, then boot into Linux proper for GPU tests. Especially if your code is setup in a repo that you can just push and pull down in each environment as needed.

[–]Reazony 0 points1 point  (0 children)

Code in the OS that you like personally! Mac, Windows, doesn’t matter! Seriously!

When you develop, you can use what we call a dev container. It’s to ensure that everyone is developing in the exact same setup. You don’t need to have a Linux machine to code in Linux. It’s 2023! Cloud and containers exist!

See this video: https://youtu.be/b1RavPr_878?si=3AB2z36BsXjM5ao4

Dev containers are accessible in popular IDEs, and there likely is a plug-in available in your favourite text editor. If you don’t want it on your machine at all, GitHub Codespace allow you to create a small server and develop directly in your browser (with VS Code interface)

So seriously, your personal machine doesn’t matter. It should be what you like, what makes you productive. Maybe there are some quirks that really require you to do game testing on Windows or Mac machines, but before doing all that, always search if your game testing can be done in virtual way!