r/ComputerCraft • u/JackMacWindowsLinux CraftOS-PC & Phoenix Developer • Aug 20 '24
DOOM is now playable in CC emulators
147
Upvotes
r/ComputerCraft • u/JackMacWindowsLinux CraftOS-PC & Phoenix Developer • Aug 20 '24
9
u/JackMacWindowsLinux CraftOS-PC & Phoenix Developer Aug 20 '24
A few years ago, I ported DOOM to ComputerCraft via the CraftOS-PC Accelerated emulator. However, it was locked to very specific features in that version (FFI support), which not only required the Accelerated version with LuaJIT, but also needed a manual config change to work.
I finally got around to updating the RISC-V emulator core to work on other systems, including theoretically in-game. I also implemented JIT compilation, which was able to tremendously speed up the game, to the point where it's now possible to play (and beat) the entirety of DOOM.
Sure, it's still slow, and has lots of lag, but it's amazing to see it able to be played at anywhere near a decent framerate without LuaJIT, as compared to my previous version. It's also currently locked to the CraftOS-PC emulator family due to using graphics mode, but I hope to implement a library that can convert the graphical framebuffer into a text screen - at which point it would be fully possible to play in-game.
The code is available at https://github.com/MCJack123/DOOM-CC/tree/jit.
2
u/OakCobra Aug 20 '24
Insane
2
u/9551-eletronics Computercraft graphics research Aug 20 '24
uwu
1
u/popcornman209 Aug 21 '24
Jack at it again with the insane computer craft stuff lol
1
u/ItsBlonk No AE2? Not for long. Aug 21 '24
Damn you fucking COOKED
1
u/recca275 Aug 21 '24
Ok I'm so new is there a pasteben you can pull from without downloading?