r/PowerShell • u/oleyska • Apr 12 '26
Misc So I ported Doom to Powershell.......
I guess I'm close enough to let the cat out of the bag...
At some point for the hell of it I wondered what I could make powershell do.
I made a window and drew pixels with ogl using sdl2 I believe, registering inputs on the window.
My immediate thought was, has anyone ported Doom to Powershell ?
No, all I could find was dismissive comments, so I was thinking....
"I got only 2 things left to do."
Play music and play sound effects and not halting the loop, and that was easy and all the reasons it couldn't atleast technically run was out the window.
Doom is ported nearly everywhere, so I saw it as my duty and off I went!
it runs excessively slow.
Especially with Windows due to Anti Malware Scan Interface.
Linux runs a lot faster.
I lean on the shoulders of the Managed Doom Project.
https://github.com/sinshu/managed-doom
What doesn't work ?
Framecap, splash screen and level completion summary will run at likely vsync.
amd64 Windows,macos (arm) and amd64 Linux Powershell 7.5.4 and 7.6 have been tested.
An earlier build with macos has been tested but need to validate if I've done some hard coding.
as for libraries, I use the same libraries as Managed-Doom Project.
4 small parts had to be written in c# either cause I'm too dense to find a way around or just cause it's impossible in Powershell using the libraries.
The libraries were a hard lock to not rely on other libraries as I wanted as clean of a port from Managed-Doom for a functional version.
This serves as a comparison between C# and Powershell, one can reference the C# project and find almost always the same structure, methods and calls in powershell and if you don't - It's cause of Powershell.
I have tested some runspace things that has worked flawlessly to being a minefield of dependencies to improve things.
Fetching input async in a runspace is one that works and is easily done and a huge uplift to experience for menu navigation..
Screenshot is done with
Windows performance 9800x3d with 5070 TI:
Doom running in powershell
Edit:
Video updated to linux version playable github release.
https://www.youtube.com/watch?v=yJiiTx4C87o
Github - Runnable version published.
https://github.com/oleyska/ManagedDoomPowershell
71
u/edhaack Apr 12 '26
Powershell: What can't it do?
16
u/lastDose Apr 12 '26
Bravo man, bravo. Very impressive work and righteous of you to post it to GitHub. It’s a cool technology milestone, hell, it’s a meme basically, to get Doom to run on various platforms, right?
How confident are you that this is the actual first public PS port of Doom? I have no reason to doubt you, rather I’m hoping that you can solidify your claim as first so to speak.
Any vision for improving performance?
8
u/k_marts Apr 12 '26
Meanwhile there are still many in IT who "don't need to learn PowerShell"
Bravos, guy/gal. Let's see the GitHub repo.
2
u/saagtand Apr 14 '26
The video isn't available unfortunately. Can you upload it again?
20
u/AyeMatey Apr 12 '26
Ok you are 12 days late for April Fool’s !
Oh wait, YOU’RE SERIOUS !!
9
u/Vern_Anderson Apr 13 '26
powersHELL
6
u/cantstandmyownfeed Apr 12 '26
I can't imagine how long this took, and I can't say it was a good use of your time on this planet to do it, but the planet is a better place for it regardless. Well done.
4
u/renome Apr 12 '26
This is beautiful.
4
u/GisseGisseGiss Apr 13 '26
RemindMe! 1 year "Powershell Doom"
1
u/J3ffO Apr 13 '26
Imagine implementing save files as a custom object.
1
u/BarronVonCheese Apr 13 '26
Can I run it on a remote powershell session?
3
u/ElvisChopinJoplin Apr 12 '26
Dang man, I effing love this.❤️🤘
3
u/fluege_taetscher Apr 15 '26
usually, people who hate on PowerShell have no idea how powerful that shell is
2
u/Stock-Albatross6396 Apr 14 '26
This has to be the coolest rabbit hole anyone’s gone down. All IT pros (the real pros, not the COVID cert course wonderboys) have experienced the black hole effect. The thought that you can’t shake until you’ve given it a solid proof of concept effort….much respect OP, you’re a real one!
2
u/CutSignificant2979 Apr 15 '26
How does the cyber demon look?
1
u/macartm Apr 13 '26
I know the OP so I know he's been working on this for MONTHS.
If you think it's slow now, you should have seen it a few weeks ago :-D
1
u/DueBreadfruit2638 Apr 13 '26
You're an absolute madman.
I love it! Bravo!
1
u/ompster Apr 14 '26
Don't listen to the haters, this is cool as hell
0
u/[deleted] Apr 13 '26
[deleted] — view deleted comment
1
u/[deleted] May 12 '26
[removed] — view removed comment