Guest User

Steps to build Doom on unkernel.dev

a guest
Nov 22nd, 2026
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.38 KB | None | 0 0
  1. steps to build Doom on Linux in the browser.
  2.  
  3. This paste shows the steps I used to build ascii Doom on Linux running in the browser on https://unkernel.dev
  4.  
  5. This can be useful to anyone who's new to Linux and wants to try it in the browser. If you follow the steps below you can legit say you've compiled and built Doom on Linux. This is more useful than you might think, since there's less and less untrusted code we can just `git clone` and build as root, but if it's on a Linux instance in your browser, you can build anything, so you can just follow these steps to build any project you see shared on HN or anywhere else, without worrying about setting up sandboxes etc. Once you close the tab it's nuked, and has no permissions that you didn't grant unkernel.dev
  6.  
  7. If you think it's better if I "just share the prompt", the url is https://share.gemini.google/jP8zeejhhd5Q or you can just ask any AI for the same steps, you can follow that instead of all the steps below.
  8.  
  9. I wrote the below but I do read a lot of AI writing so anything that triggers your slop senses would be me picking up on its way of talking.
  10.  
  11. Summary
  12. =======
  13.  
  14. Since https://unkernel.dev (the project we're discussing, which runs Linux in the browser and is where you'll paste the commands below) doesn't have graphics or an X server (graphical server), I built wojciech-graj's ascii port of Doom:
  15.  
  16. https://github.com/wojciech-graj/doom-ascii/
  17.  
  18. and used it with a free level from the freedoom project:
  19.  
  20. https://github.com/freedoom/freedoom/
  21.  
  22. The game built successfully in https://ukernel.dev on Safari (I had to update to the latest version of safari) and I was able to start the game.
  23.  
  24. Video: https://youtu.be/Tn0zzS-kUoY (2 minute 17 seconds)
  25.  
  26. Playthrough starts at 1 minute 29 second, link to timestamp: https://www.youtube.com/watch?v=Tn0zzS-kUoY&t=1m29s
  27.  
  28. Beginner-friendly Details
  29. =========================
  30.  
  31. Due to the terminal graphics it is a bit difficult to see but it runs in real time, in the video you can see it fires when I press space and I turn and move around a bit.
  32.  
  33. If you want to try it these are the steps I followed. The commands were originally provided by Google Gemini Neon, which I'm copying into here from the bash history, since we also built a few other things.
  34.  
  35. 1. Open a new tab with https://unkernel.dev in your browser and check that it runs. You might need to update Safari at this point, as even 1 version behind the latest doesn't work. Similar steps might work in Chrome or Firefox since everything below is run in the unkernel.dev environment, if you try it in Chrome or Firefox on any OS please let people know in a reply to my comment on HN so that they know it works there too. All of the steps below will all be done in that one Safari (or other browser) tab.
  36.  
  37. 2. next I ran:
  38.  
  39. sudo apt update && sudo apt-get install -y build-essential curl wget vim python3 gcc nano git
  40.  
  41. to get most of the tools to build things.
  42.  
  43. 3. I checked to see that it could run gcc and can run programs, these worked well.
  44.  
  45. 4. Next you will clone and build the doom-ascii project. This took around 5-10 minutes to complete.
  46.  
  47. git clone https://github.com/wojciech-graj/doom-ascii.git
  48.  
  49. This puts the project into your current directory.
  50.  
  51. 5. next run:
  52.  
  53. cd doom-ascii
  54.  
  55. to get into the directory and run:
  56.  
  57. make
  58.  
  59. which will start the build. It builds for 5-10 minutes. The build shouldn't fail, if there are any problems you would have to ask an AI why it doesn't work, but it'll build for a really long time, like 5-10 minutes.
  60.  
  61. ( Optional aside:
  62.  
  63. Good to know for later:
  64.  
  65. During this time you can click the "+" on the bottom of the screen (this starts different terminals to the same Linux instance) and in the new terminal run
  66.  
  67. top
  68.  
  69. so you can see the processor usage and you can see when the build gets done, since while it's building, top will show that process at 99% processor usage. (To the author of unkernel, I would suggest adding processor usage as well to the status bar at the bottom so people don't have to open a new terminal to see that info.)
  70.  
  71. When you're running top you can quit it with 'q'. For me once I got Doom running I couldn't figure out a good way to terminate the game while it's running (ctrl-c didn't work for me), so eventually when I was done playing it, I terminated it in the other terminal by running top to see what the pid is, then q to quit top and I typed 'kill' followed by the pid (which stands for process id) that was listed for the game in top. When you're running top the pid is the first number on the line that has doom-ascii. So you'll type something like `kill 5410` to kill the doom-ascii process.
  72.  
  73. For now, you can try top while you wait for the game to compile.
  74.  
  75. )
  76.  
  77. 6. Once the build is done, you will need to get a free level file for it. To do so I followed these steps:
  78.  
  79. Get a zip file of one of the freedoom releases:
  80.  
  81. wget https://github.com/freedoom/freedoom/releases/download/v0.13.0/freedoom-0.13.0.zip
  82.  
  83. Unzip it:
  84.  
  85. unzip freedoom-0.13.0.zip
  86.  
  87. Find the file you'll be using (one of the files that end in .wad), for example you can run:
  88.  
  89. cd freedoom-0.13.0
  90.  
  91. then
  92.  
  93. ls
  94.  
  95. and you will see that there is a .wad file, that's what you'll be running. you can run
  96.  
  97. pwd
  98.  
  99. to show which directory you're in, copy it down somewhere because you'll need it later. This is where the wad file is and you'll need it to run the game you've compiled, because it doesn't come with a level.
  100.  
  101. Once it's built, the actual game is in _unix/game within the ascii doom directory so type
  102.  
  103. cd ..
  104.  
  105. to return to the ascii-doom directory (if you were in freedoom-0.13.0 directory before) then type:
  106.  
  107. cd _unix/game
  108.  
  109. or if it doesn't work
  110.  
  111. cd doom-ascii/_unix/game
  112.  
  113. so that you're where the game is. anyway try to find that directory.
  114.  
  115. if you type
  116.  
  117. ls
  118.  
  119. you'll see one file called doom-ascii which is what you'll now start (it's in green showing that it's an executable file), and you'll specify the free level file you downloaded as a parameter, this is why you had to find where it is just above and copy it somewhere. You can navigate around directories by typing "cd" to enter a directory, "cd .." to go to the parent directory, "ls" to list the files in that directory, or "pwd" to print what directory you're currently in (which stands for print working directory.)
  120.  
  121. When you're in the directory that has the game (probably you'll be in the directory ~/doom-ascii/doom-ascii/_unix/game ), remember that path you found above for the free level, make sure you got it right you can type ls with the file to make sure you have the correct path to the .wad file. I typed:
  122.  
  123. ls /home/user/doom-ascii/freedoom-0.13.0/freedoom1.wad
  124.  
  125. and press enter. (You're asking ls to list just that one file). So then if it does list it (rather than not found), you then press up to get that line again and replace the ls part with the rest of the line around it, starting with ./doom-ascii (which will start the doom-ascii program in the directory you're in) then the command -iwad to specify the level file, then the long path you found above, and then -scaling 6 to make it run in a smaller window which makes it faster. I ended up typing:
  126.  
  127. ./doom-ascii -iwad /home/user/doom-ascii/freedoom-0.13.0/freedoom1.wad -scaling 6
  128.  
  129. Which is what I ran to produce the video linked in the comment but the point is to specify the correct exact path to the .wad file you downloaded above.
  130.  
  131. Once the game starts you then press enter a bunch of times to just accept the default menu options (which are difficult to see in the ascii rendering, you can't see anything you just have to press enter a bunch of times) and get to the level and start moving around and start shooting. The keys are listed here: https://github.com/wojciech-graj/doom-ascii/#Controls they're:
  132.  
  133. UP ARROW UP
  134. DOWN ARROW DOWN
  135. LEFT ARROW LEFT
  136. RIGHT ARROW RIGHT
  137. STRAFE LEFT ,
  138. STRAFE RIGHT .
  139. FIRE SPACE
  140. USE E
  141. SPEED ]
  142. WEAPON SELECT 1-7
  143.  
  144. in the video, you can see me use the arrow keys and space to fire.
  145.  
  146. As I mentioned before, I couldn't figure out how to quit the game once it was running, so to quit, I killed its pid in another terminal using the steps I listed before, after that you can try anything else you'd like to try in Linux, now that you've successfully compiled and played Doom.
Advertisement
Add Comment
Please, Sign In to add comment