Jump to content
The Dark Mod Forums

TDM Engine Development Page


zergrush

Recommended Posts

Download it. It's part of an dll called vccomp<version>.dll. Putting that into your darkmod directory should do the trick (unsure about that, as I did not need to do it).

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Obs may not have seen the problem if he compiled under Linux as OpenMP is included there as I recall?

 

(The current struggle is to get it working with Windows.)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I've compiled under Windows ;)

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Hello.

 

I been working on and off to get this thing working and some parts are indeed working just not giving any noticable performance improvements yet.

The last thing thats still keeping it from release is that the #pragma omp calls dont seem to work correctly on windows (patch originated from a linux user) and will hang the engine.

I do have the Intel compiler though and it should be possible to set it up to point out where omp would give the biggest benefit and also provide the nessesary code changes.

 

Ill post back if i get something going :).

  • Like 2
Link to comment
Share on other sites

I've got a bit of experience with omp (and TBB, and Boost Threads, and pthreads), so I'd like to have a look at the code / diffs.

 

More for the rest of us trying to compile and see the benefits: on Windows you'll need to enable OpenMP support in VS under the Engine project properties (C/C++ -> Language) and under Linux, the -fopenmp open needs to be set for GCC (the compilers ignore the omp pragmas otherwise).

  • Like 1

I am the bat. The night is mine.

Link to comment
Share on other sites

More for the rest of us trying to compile and see the benefits: on Windows you'll need to enable OpenMP support in VS under the Engine project properties (C/C++ -> Language)...

 

I added this for the Engine.

 

Building the DLL complains, so I also added it for the DLL. But the build is still complaining about not being able to find omp.h.

 

HELP!

Link to comment
Share on other sites

I just got caught up with this thread.

 

We already have boost threads.

 

Why are we interested in OpenMP?

 

Is this simply to try to interest people in the community who work in open source areas?

 

I'm curious, because I've begun experimenting with boost threads to improve the loading time, and if we're moving to something completely different, then I need to wait for that to be proven and working before continuing the experiment.

Link to comment
Share on other sites

Nothing but crickets here, so ...

 

After searching around, I found a comment that omp.h is not included in Visual Express. Thus the failures, since that's what I use to build.

 

I found an archive that would provide me with the missing pieces. After installing them, and making the project change suggested by taaaki, the build completed properly.

 

In the future, if someone finds that something missing is needed to support work that that person has committed to SVN, PLEASE ALERT THE REST OF US, and provide the missing parts and instructions on what project changes are needed, if they are. This will save us hours of lost time.

 

For anyone encountering this problem on Windows, here is the archive I found:

 

OpenMP-Studio-Express.zip.txt

 

Now I have to go figure this out for Linux, since it's suffering the same problem.

Link to comment
Share on other sites

I added this for the Engine.

 

Building the DLL complains, so I also added it for the DLL. But the build is still complaining about not being able to find omp.h.

 

HELP!

 

My VS2010 has omp.h under C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\omp.h. Maybe check if it lives there in your Windows VM (might require the non-free version).

 

Boost Threads basically just provides a wrapper around a lower-level threading library like pthreads. OpenMP provides nice and simple way of defining parallelism using compiler pragmas. The compiler then inserts the relevant threading code (using pthreads or whatever the particular compiler uses - I guess MSVS uses the Windows threading libs). I don't see why both can't be used simultaneously. OpenMP is far simpler to implement and maintain in there areas where its use makes sense (data parallelism, certain task-based parallelism, etc.).

I am the bat. The night is mine.

Link to comment
Share on other sites

I actually reckon we just remove the current OpenMP changes. We should only be committing code to SVN that works. I'm happy to work with someone on this on the side or in a branch, but it shouldn't hit trunk until it's ready.

I am the bat. The night is mine.

Link to comment
Share on other sites

I actually reckon we just remove the current OpenMP changes. We should only be committing code to SVN that works. I'm happy to work with someone on this on the side or in a branch, but it shouldn't hit trunk until it's ready.

 

The commits to SVN don't work, or they cause the builds on Express to not work?

 

SVN should only be receiving code changes that work. (In the case of the recent sikk changes, it was probably okay because they could be turned off at the Main menu.)

Link to comment
Share on other sites

The commits to SVN don't work, or they cause the builds on Express to not work?

 

It's not to do with the version of VS from what I can tell (although, I'm not actually sure if Express actually supports compiling with OpenMP). Even with the correct headers and compiler flags, the code in svn trunk is syntactically incorrect, so it won't compile. I'm just going to comment out the omp stuff and commit so that other work can continue (I'll also commit the updated SCons scripts for building with OpenMP support on Linux - will make it possible to toggle with or without).

I am the bat. The night is mine.

Link to comment
Share on other sites

I have opened a bountysource tracker for porting BFG's GPU skinning to vanilla Doom 3:

 

https://www.bountysource.com/issues/2883499-port-gpu-skinning

 

This would be for raynorpat's morpheus branch which already has BFG's VBO and GLSL backend.

 

Whether this ever helps TDM, at least the campaign may help getting more activity going on the vanilla Doom 3 scene.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

So it seems revelator has a new repo to continue his previous work:

 

https://github.com/revelator/Revelation

 

It looks like he added BFG's "constrain shadow volume to light volume and player view" optimizations...

 

He's also converting the built-in tools to wxwidgets similar to what Greebo is doing to Dark Radiant.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 2 weeks later...

I created a bountysource tracker for replacing the realtime script interpreter with a JIT implementation.

DanielGibson has recommended the use of LLVM for this feature:

 

https://www.bountysource.com/issues/3139677-feature-request-jit-for-script-compiling

 

Shall I open a local bugtracker for this too? Anyone familiar with LLVM?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Heh, that is actually an idea I had a while back (using LLVM for the script interpreter). I don't have any LLVM experience, but I do have a wee bit of (university) compiler development experience, so I was going to use this as a learning project. It's not on my current todo list though (which has been delayed trying to get a complete and correct SVN to Hg conversion going).

  • Like 1

I am the bat. The night is mine.

Link to comment
Share on other sites

Has anyone done any profiling to see how much time tdm is spending in scripts and in handovers between the script interpreter and the game code? There's code in the animation scripts that I've been looking at recently that looks like it passes control back and forth several times per frame per ai, but I've no idea whether that has a noticeable effect or not. I don't know anything about llvm so can't contribute to that party of the conversation but I can help reduce the context switching if that turns out to be a burden. That's a big part of my day job: the main platform I develop on (Oracle) has an overhead for every context switch between pl/sql and sql, and in some apps it can really add up.

Link to comment
Share on other sites

My initial interest is in the script interpreter to LLVM idea was more for improved error-checking and warnings and not so much on the performance side. Like I said, it isn't on my current todo list, so I haven't given it too much thought. So yeah, don't expect anything from me on this topic until after I've finished off some other stuff and have some time to think about it properly (assuming someone else doesn't take up the task).

I am the bat. The night is mine.

Link to comment
Share on other sites

Has anyone done any profiling to see how much time tdm is spending in scripts and in handovers between the script interpreter and the game code? There's code in the animation scripts that I've been looking at recently that looks like it passes control back and forth several times per frame per ai, but I've no idea whether that has a noticeable effect or not. I don't know anything about llvm so can't contribute to that party of the conversation but I can help reduce the context switching if that turns out to be a burden. That's a big part of my day job: the main platform I develop on (Oracle) has an overhead for every context switch between pl/sql and sql, and in some apps it can really add up.

 

You might glean some better insights from the Fabien Sanglard himself: fabiensanglard.net@gmail.com

 

If I interpret his code analysis here:

 

http://fabiensanglard.net/doom3/scripting_vm.php

 

correctly, such context changes definitely look problematic...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...