Sinshu Posted July 31, 2020 I really respect Mocha Doom, so I tried the same thing for C#. Managed Doom is a Doom source port written in C#. The entire code is manually translated from Linux Doom with some effort to make it natural C# code. Most functionalities necessary for single player game are implemented, and now it's in the playable state. Here is a demo video: GitHub:https://github.com/sinshu/managed-doom 30 Quote Share this post Link to post
andrewj Posted August 1, 2020 How difficult was it to convert the C code to C#? I don't know anything about C# but given the name I assume you get at least a bit of compatibility with C (like curly brace syntax), but I imagine the semantic differences would be signficant. 0 Quote Share this post Link to post
Sinshu Posted August 1, 2020 @andrewj In general, if the target C code does not contain tricky pointer arithmetics or macros, it should not be so hard to convert to C#. Regarding the Doom source code, although such tricky parts are not so much, there are lots of array index out of bounds errors especially in the rendering module. These errors are not fatal in C, but the program immediately crashes in C#. It was not easy to consider how these errors can be avoided without performance degradation. 1 Quote Share this post Link to post
Lobo Posted August 1, 2020 Interesting! Is it compilable in say VS 2010 Express? 0 Quote Share this post Link to post
Sinshu Posted August 1, 2020 @Lobo This port requires .NET Core 3.0 or higher. Since VS 2010 only supports .NET Framework, it's not possible to compile without modification. 0 Quote Share this post Link to post
plums Posted August 1, 2020 Interesting project. Any plans for it beyond re-implementing the vanilla game? Andy Stewart (eschdoom) at one point was working on a C# port of Doom. I don't think it ever got an actual release, even though he recorded a few demos with it (notably Sunder MAP11). He's gone MIA and his website no longer exists, here's about the only info I could find on it: https://web.archive.org/web/20131208054504/http://whatisblueandfurry.com/eschdoom/tech1dotnet/t1dn.html 3 Quote Share this post Link to post
taufan99 Posted August 1, 2020 Seems interesting! I used to have a very few C# lessons during high school, and gotta say it's sorta more complicated than C/C++. Calling @Redneckerz here... 1 Quote Share this post Link to post
Sinshu Posted August 1, 2020 56 minutes ago, plums said: Interesting project. Any plans for it beyond re-implementing the vanilla game? Although there is no long-range plan now, I think DeHackEd support is essential to catch up with other ports. 0 Quote Share this post Link to post
Mr.Rocket Posted August 1, 2020 (edited) Wow, very nice achievement! All in all, how long did it take you to do this? Cheers Edited August 1, 2020 by Mr.Rocket 0 Quote Share this post Link to post
slayermbm Posted August 1, 2020 (edited) I have an immense amount of respect for people with the technical knowledge and determination to do something like this. Congratulations! It is always satisfactory to see new ports being released, specially using different programming languages! Edited August 1, 2020 by slayermbm Grammar 1 Quote Share this post Link to post
Redneckerz Posted August 2, 2020 On 8/1/2020 at 1:37 PM, plums said: Interesting project. Any plans for it beyond re-implementing the vanilla game? Andy Stewart (eschdoom) at one point was working on a C# port of Doom. I don't think it ever got an actual release, even though he recorded a few demos with it (notably Sunder MAP11). He's gone MIA and his website no longer exists, here's about the only info I could find on it: https://web.archive.org/web/20131208054504/http://whatisblueandfurry.com/eschdoom/tech1dotnet/t1dn.html Oh i remember that one. Was Eschdoom not known for his weird levels, which were Escher-like (Hence the user name)? On 8/1/2020 at 1:41 PM, InDOOMnesia said: Seems interesting! I used to have a very few C# lessons during high school, and gotta say it's sorta more complicated than C/C++. Calling @Redneckerz here... I was aware of this port for some time already but, being the clueless idiot that i am, when i saw it was a port to C#, i didn''t immediately think much of it. But in reality, it obviously is. Very impressive stuff and i am glad the author is here in this very thread :) Thanks for the tag! 0 Quote Share this post Link to post
plums Posted August 2, 2020 16 minutes ago, Redneckerz said: Was Eschdoom not known for his weird levels, which were Escher-like (Hence the user name)? No, the only mapset he released was Doom 2 Reloaded. 0 Quote Share this post Link to post
Redneckerz Posted August 2, 2020 (edited) 2 hours ago, plums said: No, the only mapset he released was Doom 2 Reloaded. Thanks. I recalled the one thing i was trying to come up with my question, but it was not weird levels perse. Eschdoom used to work on a PrBoom based source port that would render Doom levels in isometric/orthographic projection in real time. Never was released.Sources: And the original source: Edited August 2, 2020 by Redneckerz 1 Quote Share this post Link to post
Sinshu Posted August 7, 2020 Adding DeHackEd support. Now Batman Doom seems to work... 5 Quote Share this post Link to post
taufan99 Posted August 7, 2020 (edited) Impressive progress, I must say. Batman Doom has some of the most unorthodox behavior out of most DeHackEd-based mods, with a few but significant differences of the Mac DOOM one and the DOS one. Link for the DeHackEd patch of Zeke's Mac behavior for Batman Doom: https://www.doomworld.com/idgames/themes/batman/macmoltv Edited August 7, 2020 by InDOOMnesia 1 Quote Share this post Link to post
Sinshu Posted August 7, 2020 @InDOOMnesia Thank you for the information. I tested the patch, and the flame effect worked fine! 1 Quote Share this post Link to post
taufan99 Posted August 7, 2020 Cool to see that! Seems good to go by now. 0 Quote Share this post Link to post
slayermbm Posted August 7, 2020 (edited) @Sinshu Do you plan to implement better mouse controls? I would like to disable vertical movement if possible. I use keyboard exclusively for running and strifing. Edited August 7, 2020 by slayermbm 0 Quote Share this post Link to post
Sinshu Posted August 8, 2020 Managed Doom v1.1a is released.https://github.com/sinshu/managed-doom/releases Added MIDI format support (mainly for SIGIL). Added partial DeHackEd support. Added option to disable Y-axis of mouse movement. Fixed some bugs. @slayermbm Now you can disable vertical movement by adding the following line to the cfg file. mouse_disableyaxis = true 4 Quote Share this post Link to post
Sinshu Posted August 8, 2020 On 8/1/2020 at 10:39 PM, Mr.Rocket said: All in all, how long did it take you to do this? According to the oldest backup files, it seems that I started this work on Sep. 3, 2019. It therefore took about 11 months to reach the playable state. 2 Quote Share this post Link to post
Mr.Rocket Posted July 12, 2021 (edited) Wow, this was pretty easy to compile and run! I've been checking it out lately and added Hacx.wad to the iwads list via Wad.cs, GameMode switch. Also added Freedm.wad there, even though there's no multiplayer. However, I saw that there's a branch that might be adding it. I didn't place any changes on the git about it, just doing this locally. I'm aware that Managed-Doom supports drag n drop, but I ended up making a simple launcher for it also, just to make it easier to load iwads, pwads, and .deh from various locations. ~ as well as a fullscreen/window resolution selection, among other things. ;) Question: do you plan on adding a sizable window where it can be scaled by using the mouse? ~ since obscure resolutions can already be changed without effort and the engine's ok with it. ~ Or would SFML not like it? I like this source engine! Thanks Edited July 12, 2021 by Mr.Rocket cause I wanted to.. 0 Quote Share this post Link to post
Sinshu Posted July 13, 2021 Thank you for the reply! 10 hours ago, Mr.Rocket said: Wow, this was pretty easy to compile and run! That's nice to hear, since one of the main goals of this project was to make an easy-to-compile port. Regarding the window size, I have added the variable window size support as well as some options to choose a preferable aspect ratio in the past. You can see these changes in the aspectratio_correction branch. However, I didn't merge them to the main branch for several reasons. The biggest reason was that I wanted to keep the codebase simple. Another reason was that the implementation above was not good in terms of graphic quality, since it simply scales the software rendered backbuffer to the window size. The best way is to modify the software renderer to make it support arbitrary resolutions, but that requires a lot of study and work... 1 Quote Share this post Link to post
Sinshu Posted January 9, 2022 (edited) It has been a long time since I last posted about v1.1a here. I've improved various parts of Managed Doom, and would like to inform you about them. Fixed crashes caused by various factors. Added full DeHackEd support. The SoundFont MIDI synthesizer has been re-implemented from scratch, with improved quality and support for reverb and chorus. Added drag & drop support for loading WADs. Improved demo playback compatibility. I've tried a number of D2ALL speedrun demos, and none of them went desync so far. Fixed issue where zoom keys do not work on some keyboards (thanks to Mr.Rocket). Refactored the platform dependent code for better portability. The newest Windows binary (v1.2e) is here:https://github.com/sinshu/managed-doom/releases By the way, a friend of mine reported that this port runs on Mac without any difficulty. I didn't notice this because I only have a Windows machine, but Microsoft has done a great job of making .NET cross-platform. Edited June 17, 2023 by Sinshu 10 Quote Share this post Link to post
Sinshu Posted January 4, 2023 (edited) Since it's the New Year, let me announce an update to Managed Doom. The latest version is now v2.0b and the biggest change is the move from SFML.Net to Silk.NET. I still like SFML and its API design is the best for me, but since SFML.Net has not been updated for a long time, I decided to use Silk.NET which is better maintained. The following is a list of changes from v1.2e: Migrated from SFML.Net to Silk.NET. Fixed issue where cheat codes that should work in nightmare mode do not work. Improved DeHackEd compatibility. Added -solo-net option. Reduced CPU load of the SoundFont synthesizer. Fixed wrong calculation in spatial audio. Fixed crash in some PWADs (now KDiKDiZD should work). Updated .NET to 7 and introduced the officially supported native AOT compiler. The latest win-x64 binary is here:https://github.com/sinshu/managed-doom/releases By the way, in developing Managed Doom, I created several libraries on my own, and I would like to introduce them to you in case they may be of some use. MeltySynthhttps://github.com/sinshu/meltysynth/ MeltySynth is a SoundFont MIDI synthesizer written in pure C#. It was originally started as a built-in synth for Managed Doom, but later released as a separate library. This library is primarily intended for gaming applications and is tuned to have a low CPU load during playback. DrippyALhttps://github.com/sinshu/DrippyAL Managed Doom uses OpenAL to handle sound. While it is easy to play sound effects in OpenAL, streaming music is tricky. This library is an SFML-like OpenAL wrapper that makes playing sound effects and streaming music easier. Edited January 4, 2023 by Sinshu 6 Quote Share this post Link to post
taufan99 Posted January 13, 2023 Congrats on the new Managed Doom release! Oh, and those libraries could be game-changers for any C#-based ports. @hobomaster22 might love them. 1 Quote Share this post Link to post
Maes Posted February 20, 2023 Well, I somehow missed that. I guess you went through similar pains that I went through with Mocha Doom some 10 years earlier. Maybe with a few more niceties -Java didn't even have unsigned types, when I tackled this... 2 Quote Share this post Link to post
Sinshu Posted February 21, 2023 14 hours ago, Maes said: Well, I somehow missed that. I guess you went through similar pains that I went through with Mocha Doom some 10 years earlier. Maybe with a few more niceties -Java didn't even have unsigned types, when I tackled this... The biggest pain for me was demo compatibility. I was surprised that Mocha Doom maintains demo compatibility in a managed language, so I tried to do the same, but it required a lot of work... 1 Quote Share this post Link to post
Maes Posted February 21, 2023 (edited) 6 hours ago, Sinshu said: The biggest pain for me was demo compatibility. I was surprised that Mocha Doom maintains demo compatibility in a managed language, so I tried to do the same, but it required a lot of work... Well, basic/non-overflow/non-bug demo compatibility should come "naturally", if you otherwise translate the base mechanics of everything correctly (assuming that you keep working with the equivalent of fixed_t and BAM angles internally and don't screw up the signedness of certain operations). For more exotic stuff you need to add special handling/bug emulation, as that, indeed, won't come "naturally" in a managed port. That being said, if you have a way to compare memory/variable values at key points where desyncs occur, using a regular source port as a reference, you can actually go a long way towards emulating pretty much whatever you want. It's just that it's a long and tedious process (I didn't forget about you, @kb1, thank you for all the time we put in this together). Edited February 21, 2023 by Maes 2 Quote Share this post Link to post
dmnwizard Posted February 21, 2023 Sinshu, I really liked Doom Managed. It's clean, light and tastes vanilla. I gonna follow the project. My question is: in the managed-doom.cfg file, I changed mouse_disableyaxis from "False" to "True", but the system remains "True" during gameplay. How should I proceed? Thank you for creating this beautiful sweetness! 2 Quote Share this post Link to post
Sinshu Posted February 21, 2023 34 minutes ago, dmnwizard said: Sinshu, I really liked Doom Managed. It's clean, light and tastes vanilla. I gonna follow the project. My question is: in the managed-doom.cfg file, I changed mouse_disableyaxis from "False" to "True", but the system remains "True" during gameplay. How should I proceed? Thank you for creating this beautiful sweetness! Oh, that is a bug I made when the mouse-related code was moved to Silk.NET. I'll fix it later. 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.