dhewm / dhewm3

dhewm 3 main repository
https://dhewm3.org/
GNU General Public License v3.0
1.79k stars 346 forks source link

General discussion, future of dhewm3, mod support.. #146

Closed ghost closed 5 years ago

ghost commented 8 years ago

Hi Daniel,

First of all, thank you for your work on dhewm3. I've been using it for a while on Linux, and it works great. Much better than id's original Doom 3 binary, that's for sure. :)

I've always liked Doom 3 a lot, and I've been eager to start developing for the technology since the beginning. I believe the time is as good as it's going to get now, with the availability of a quality source port, the Doom name being all over the news again because of the new game, and your average garden variety computer being able to run the engine well.

Coming from several years of developing for GzDoom, I regret that the community is tiny in comparison, and that the few people participating in it are stuck in a closed source mindset, which effectively means that their mods are unable to run on anything but Windows.

I believe I know what to do how to increase the user base considerably. First of all, community fragmentation must be prevented. Making Classic Doom3 and the BFG edition incompatible with each other was a really dumb move by the execs at id, and the necessity of having two separate source ports competing is far from ideal. I totally realize this is easier said than done, but having just a single source port with support for both editions would be a huge step forward towards attracting content developers.

The second problem is the reliance on precompiled C++ for mods, which further divides the scene. ZDoom supports a language called ACS, which is precompiled to platform-agnostic bytecode. This greatly simplifies mod development and distribution. I believe the addition of a scripting language such as Lua or Python that exposes the API would make modding a lot more attractive, since a single mod would work unmodified for every platform dhewm3 runs on.

I would like to try the mods you have in the repository, but I'm lost at the cmake step. Could you provide me with some assistance on that?

Syndwar commented 8 years ago

Hi, RalfVB! I have 4 years of experience in game development with Lua and if you decide to use it - you can count on me))) I can provide some already written tools for easy lua data access within C++ and vice versa. Although there are many other ready solutions like luabind (worked with it for 3 years - debugging hell of wheels, but powerfull as hell), luabridge also seems a good thing.

My first games were using Pygame (Python + SDL). And I must say - it is good, but sloooow, and very unforgiving. And it's integration with C++ is not that simple and clear comparing to lua.

ghost commented 8 years ago

Hello. Thanks for your reply and enthusiasm!

Yes, I feel that something like Lua could lower the barrier significantly for both developers and players, and it should be fast enough to serve as a fullblown replacement for C++ (which is a splendid language, but not the optimal choice in this situation). Mods shouldn't be tied to any platform, and ideally, shouldn't even be compiled by the user, just downloaded and enjoyed.

From there on, we can build the ultimate Doom 3 mod, combining all the best features from every standalone mod, and offer them as standalone modules, with the goal of making Doom 3 a sandbox experience.

Well, what does Daniel have to say about this? :)

DanielGibson commented 8 years ago

I totally realize this is easier said than done, but having just a single source port with support for both editions would be a huge step forward towards attracting content developers.

Classic Doom also has more competing source ports even for the same game, so I don't think this would help much and it'd probably be a waste of time.

The second problem is the reliance on precompiled C++ for mods, which further divides the scene.

Doom3 actually has a scripting system and uses it extensively to define weapons and monsters behavior. I guess you could do a lot without touching C++. I don't think an additional scripting language would improve anything.

If you want to make your mod compatible with dhewm3 you need to release it under GPL anyway, and if the source is available porting it to other platforms is easy (and the mod devs don't even have to do it themselves).

At some point I still want to make https://github.com/DanielGibson/dhewm3-mods official part of dhewm3, hopefully with more mods then. Hopefully Linux distributions would provide binaries of that then (like they do for dhewm3 incl. RoE now), and I could provide binaries for windows, like I do for dhewm3 now. (And hopefully some Mac-User could provide OSX binaries, but so far this didn't work out too well)

DanielGibson commented 8 years ago

How to build my existing mod support on Linux or OSX (I just updated it to the newest state of this repo):

If you're on Windows it's mostly the same, but you'll have to create a MSVC solution with cmake and build that. Same as building normal dhewm3, just make sure to pass -DMODS=ON to cmake.

ghost commented 8 years ago

Hello,

Thanks for the instructions - they worked perfectly. Classic Doom was pretty good fun to play through. The Denton mod doesn't seem to do all that much for me, and crashes occasionally. Oh well.

I still believe offering an alternative to C++ has it's merits though. The problem is simply that there doesn't seem to be a whole lot of enthusiasm for the open source philosophy in the idtech4 community, leaving a lot of interesting projects unmaintained and inaccessible for people not using Windows.

I'd be happy to help contact mod authors and kindly request they make their source code available, for anyone to enjoy and improve.

I'm particularly interested in this tool > http://gamebanana.com/tools/2489, which can convert Doom maps to Doom ³ ones. Imagine if this functionality could be included in dhewm3 and expanded a bit, so it could load and play classic Doom maps. That would be a very nice feature indeed.

I'm trying to contact the developer to see if he's willing to share the code. It's a fairly old tool, so chances are slim.

DevilMaster commented 8 years ago

I'm a long time fan of Doom 3, and I need to say that it's great that someone finally made a modernized Doom 3 port with mod support. However, there's a thing I really wish I could do: play Doom 3 mods in VR. Right now, the only version of Doom 3 that supports some form of virtual reality is the BFG edition, the PS3 port of which I played a lot with my HMZ-T1 head-mounted display. The big drawback of the BFG edition is no mod support: after you played it all, there is no incentive to come back.

The current VR bandwagon on which many developers are jumping is to have VR-related code directly into the executable, which however tends to lock executables down to a single model of HMD. The way I personally prefer to deal with VR is to base the graphical routines on Direct3D 9.0c, and let stereo 3D drivers deal with intercepting graphical calls and generate the two views according to personal preference. This widens the compatibility to a HUGE range of machines (from Windows XP all the way to Windows 10, thanks to the wide range of available stereo 3D drivers) and to a range of 3D and VR devices that is just as big (from shutterglasses, to pageflipping-based HMDs, to dual display HMDs that use side-by-side mode, to full HD 3D TVs, to anamorphic HMDs).

What I am asking here is to add a Direct3D 9.0c render mode, which would automatically open up Dhewm's support for VR and even make it future-proof, since as VR devices keep evolving, stereo 3D drivers keep up with them. If this is accepted, I can beta test the Direct3D 9.0c port with a number of different devices and provide feedback. I have already done this in 2008 with a graphical plugin for nullDC (a Dreamcast emulator).

DanielGibson commented 8 years ago

There will be no Direct3D, this is a cross-platform port.

VR generally works with OpenGL, too; pull-requests are welcome. I don't have VR hardware (nor the time) to write VR support myself.

DevilMaster commented 8 years ago

That's the problem with OpenGL: it requires the various VR rendering modes to be directly implemented within the executable, with a correspondingly longer development time.

DanielGibson commented 8 years ago

And you think that writing a Direct3D backend is fast?

Also I don't see how Direct3D would support head tracking, for example (without changing the gamecode). If you just want stereoscopic rendering, I heard that both nvidia and AMD support that for OpenGL as well - not sure if the game needs any adjustments for that and if so how to do them (still haven't gotten around to learning OpenGL), but if someone wrote that I'd merge it.

Also, if someone implemented proper VR support (with a vendor-specific SDK or OpenVR or OSVR or whatever) and the code is not shitty and doesn't break the game for non-VR users, I'd merge that, too. A Direct3D backend - probably not, as I said, this is a cross-platform port (and for me Linux has a higher priority than Windows anyway).

DevilMaster commented 8 years ago

Last year I asked questions about OpenGL stereoscopic rendering in the MTBS3D forum, in a thread about Doom 3. The reply was that, although stereoscopy in OpenGL is supported through quad-buffering, no HMD supports quad-buffering.

revility commented 6 years ago

When it comes to coding, d3 is more user friendly than most engines. You can add new weapons, menus, gui, sounds, materials, items and monsters with just notepad. Almost all this stuff can be modified in real time as well... for example you could change the damage of a weapon or its model in a text editor & then refresh in game to instantly see the changes.

Additionally monsters can inherit from one another to create varients easily.... or use the same ai, but different models & stats.

Ai & weapons have 2 main files. A def file which basically list it’s stats, and what model & animations to use. Then there is the script file. D3 script is similar to java. You don’t need c++ to access any of this stuff. Just notepad.

If your having trouble finding modding info on d3... a part of that was from the doom3world forums going down years ago. That place was a gold mine for examples & tutorials.

motorsep commented 6 years ago

Sorry @DanielGibson, not to hijack this thread, but there is a fork of D3BFG with full VR support and there is a fork of D3 with completely new rendering (and tools are included I believe) which might be ready for VR integration. So if someone has skillz and time, you folks might want to look into those forks.