Jump to content
The Dark Mod Forums


Development Role
  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by demagogue

  1. Since it's a one-off problem, only for the first ambient at game start, then the way you fixed it is really the right way, because the system-level alternative would be whole a little subsystem (a specialized fidelay and mandatory _z soundshader) just to handle the first 0.1 seconds of game start, and then the old system for all the maps already out there, which is a bit much. And I think it's not even that common because many ambients start quietly to begin with.

    That said, there might be an easy bit of code that could make sure the fade in always works for the first ambient that doesn't mess with anything else in the system, like a hardcoded initial 0.1 sec. delay only for it, and that may be worth doing. But it'd need experimenting and testing to make sure it works as intended and doesn't have unintended consequences.

    Anyway, it's good we have this documented for now as the way to fix the problem for other people in the future that run into it searching for a fix. In fact it'd be good to put in the wiki to make sure the fix doesn't get lost.

  2. This is a different issue than the click of sound at the start of every transition that I was talking about in earlier posts that you're referencing. This may be a problem that's always been there but nobody really noticed or commented on it, or maybe only for certain ambients?

    So the first problem is that the ambient starts abruptly at game start presumably because the sound system isn't online yet to process the fade in, and it just starts the ambient at full sound. So then you added a delay, but since you're not coming off of a previous fade out to sets the volume to zero, it plays the full volume ambient through that delay and then cuts to zero and fades in.

    My idea is that if you want a fade in from the start, don't start with that ambient as it is. Start with a .1 second of silence, and then fade in the ambient.

    There are two ways I can think to do that. (There might be other ways.)

    1. Some ambient soundshaders start with a "leadin" spawnarg that starts it with a bit of silence, originally used to stop the click of sound (soundshaders ending in "_z", there were two versions, one with and one without the _z, unless that was later changed). You could confirm that the soundshader for that ambient uses a "leadin" arg, or if it does but it's not long enough, maybe use a custom soundshader to use a longer leadin blip of silence. (In that case you'd have to make the longer silence file yourself.)

    2. Or another possibly easier way may be to start with an "override" sound, look at the Sound Override part of the tutorial with silence, and then after .1 second or whatever, transition that to the normal location-based ambient according to the instructions, and then the override sound will fade out and yours will fade in. I think you'd do that by setting the override arg to "1" from the start and then change it back to "0" after 0.1 seconds using Target_setKeyVal as the instructions say. Confirm that the "silence" sound is stereo. I noticed if you start it with a non-stereo sound, the system stays non-stereo. I think that was fixed, but good to double check. If it isn't, then you could do the same thing with a normal ambient that just starts off silent or very quiet for that first .1 second.

    • Thanks 1
  3. No I can't see the videos. Put them up on Youtube as non-listed videos. Also, what's your system? Is it a relatively slow or older system? The first time one enters a location, there's some work being done that might be pre-churned from then on, so I think it might have something to do with the work load slowing all kinds of things down, including the ambient going online.

    If you know your way around DR (or editing the map file directly), you could test things like setting the native volume of the location entity to zero from the start, and see if it happens when other speakers turn on for other reasons the first time, like a trigger. It may be an issue that all speakers face that this system inherits.

  4. On 1/22/2024 at 12:09 PM, Skaruts said:

    One definitive advantage of the zone approach is that it's easier to setup for irregular places. Speakers work based on a radius, but there might be areas within that radius that should have different ambient sounds.

    Keep in mind we're usually talking about something like a massive forest or mansion or cathedral, etc., where it's absurd to think you're going to cover it very well with a simple circle the radius of the whole area, or even 30 circles for all the different rooms or areas, whereas with the location system, the locations are created out of walls and doorways, so 99% of the time they're exactly overlapping where you want your ambients transitioning on and off.

  5. Bumping this thread. I was trying to parse the code for LibreCoop recently, the multiplayer coop mod for Doom3, or Dhewm3 more exactly. The main alternative is OpenCoop, but I think LibreCoop is more developed. Anyway, it got me thinking how much work would have to go into a coop mod for TDM. It's still my biggest wish item.

    The idea I got was one has to basically walk system by system through the code and think about the client and server side of packet swapping. TDM has a lot more and more complicated systems than Doom3, but once you start getting a feel for it, I think the basic system doesn't change that much. In a way it reminded me a bit of a pared down save/load system, what you need to update a game state, except you're streaming it in in real game-time, and you using tricks to fill in gaps to ease the load.

    The other thing I noticed is that maps themselves need their scripts tweaked and anything else happening in the world. But I wonder if there's a way to procedurally do that when a map is loading, so one could just use the FM files as released.

    It looks like it'd take more than a year or two if one were working steadily through it, although I think one would get efficient at it over time. Like I was noticing, there's a consistent logic to it. But most of all I think it'd be worth it. I really like Thief coop, and I think it'd be great for TDM. I'm just FYI'ing about it now because I was browsing through the other coop mods. Not even soliciting opinions or anything. Just thinking aloud (avisible?) about it.

    • Like 3
  6. We had extensive discussion of why our license is the way it is, especially when we were going standalone. There are reasons it's CC-NC-etc., and one of the big ones is that anything that tries to link the mod with money and formalization has been trouble for us, like team-breaking trouble. Well the asset license was settled long before that just in dealing with the contributors (and the engine came with GPL3 from the start of course). There would be asset creators that would (rightfully) riot if money were able to flow to some creators and not to them, because they didn't spend 1000s of hours on this mod for some knucklehead to spend 2 hours for some crap whatever and get paid for it. But the debates happening during the run up to 2.0 validated it.

    But even before that, we've talked a lot about the basic principles for how the team works, and avoiding entanglements with money and formalization are like two of the central pillars that most of us (I understand) wouldn't like to open back up to debate.

    What I see from this whole line of discussion is that you want to make a branch project with the engine. That's fair by itself. The engine license let's you do that. But it's something that should be a true branch, like you ought to make your own forum for it and develop it there. Then I think it's fair for you to let us know it's happening and even ask if anyone is interested in joining you there, and some people may want to do that. But I think it's best if you branch off and develop it separate from this forum and team if you're going to drop one of our central organizational pillars in what's gotten us this far.

    • Like 2
  7. In the early versions there was an initial pop of sound right at the moment of transition, then an immediate drop to zero sound, and then the fade in, or that's what I thought was happening. I never really understood the source of the problem to begin with, I guessed what I said above, and the shader business was a speculation about how to fix it if that really was the problem. 

    I don't recall hearing that kind of pop since like 2010 though. So I figured it fixed itself at some point. It may have been that my laptop at the time was very, very slow, or something like that too.

  8. You can walk through every entity and spawnarg in the set up piece by piece and see if there's a logical problem buried in there.

    I don't recall how the fade-in works for the initial ambient anymore. It's been too long. But you can experiment to see if it's really borked.

    But what I came to say is that note there's a Sound Override setting where you can just set up an ambient transition yourself by some trigger if the location transitions aren't working properly for some reason.

    One thing you might try, if the initial ambient always borks the fade in no matter what you do, is to set a dummy initial sound by immediately triggering the Sound Override as soon as the map starts, like just a quarter second of silence, and then turn the Sound Override off a half second later to have the system immediately transition back into the initial location ambient, and then the fade in should work properly. It's a bit of a hack, but it could fix your problem. You might be able to think of other ways to deal with it along those kinds of lines.

  9. The new version of DR is crashing on startup, and an older version (2.8), the one I'm trying to update, still opens fine.

    Do you know of any reason why the new version of DR would crash over older versions and a fix that I might try?

    Also, I set the initial configuration "mission" slot to a possibly bunk folder, and I wonder if that's contributing to the crash. So I wanted to know how to either reset the initial config window, or anyway where the config file is so I can either delete it or edit it directly.

    Edit: Okay, I found the config file in ...\AppData\Roaming\DarkRadiant.

    I deleted it, I redid the initial config & left off the mission info, and it did reset. But that didn't stop the crash on start up.  So it must be for some other reason. This laptop uses an Intel graphics card (not a specialized one), so that might be related to the crash too. Anyway if you know how I can stop the crash, let me know, otherwise I'll use the older version. This is a convenient little laptop to build on, even without a graphics card.

  10. I think there could be some tips about how some mappers make maps that can confuse people.

    E.g., Mappers may use different methods to distinguish useable and non-useable doors and windows, and some may not distinguish them at all.

    I think there may be other author-focused issues like that if you read through mission threads. I just think it's good to think about issues due to authors beyond just the vanilla game mechanics.

    That reminds me there might be a tip like: Guards may relight torches that you douse or close doors that you open if they are responsible for them.

    • Like 1
  11. That wasn't Nirvana's fault anyway. Cobain fell apart and committed suicide probably because of becoming too mainstream. It helps to listen to their music in the indie spirit in which they made it.

  12. You can use the Location System, but the issue is that the entire location will have the river sound and it won't sound like it's coming from the river nor fall off with distance. That might work if you can make your location close enough to the river, but if it's outside it might not work well. But the advantage is, once you define the location, you could have it miles long and you've got the whole area covered with a few simple steps and parameters.

    Speakers are the main alternative that are localized and have a falloff with distance.

    Well another option is that you can create a special dummy object and in its def file you can define a sound, like the way a machine or AI makes sounds. Then you could maybe make an invisible & long skinny object out of brushes that follows the river and convert it to a func_stat, but that seems like a really elaborate solution to a simple problem that'd probably be more trouble than its worth.

    I think practically speaking a line of speakers would work just fine, but maybe the location system depending on just how big and location-able this river is.

  13. There are a lot of missions that have the player effectively cooking or crafting something as part of the plot. I think it's not even uncommon, so evidently a fine fit with the game. But it's usually handled by the vanilla scripting and the objective system, since it should be tailored to the mapper's own story they want to tell, and I think that's the best way to do it.

    Edit: I almost forgot, the S/R system is also designed to do this kind of job. It lets you create a reaction whenever you have two things of some type in some kind of contact with each other.

    • Like 2
  14. On 4/8/2023 at 7:18 AM, HMart said:

    John Carmack the main idTech 4 developer once said, "best way to mesure performance is not FPS numbers but frame timing" and I agree, we tend to mesure game performance by counting higher and higher fps's but you can have a very responsive and playable game at 30fps, if the frame timing is constant and a very lagging game if not, even if the fps numbers are 60 or higher.


    I was just reading a post over on TTLG about Thirith's experience playing Sable when he realized the game played significantly more smoothly, and the movement control was less wonky, at 30 fps than 60 fps, and then I see your post explaining just that.

    Edit: I should have double checked the date. I didn't realize when I clicked the thread that it didn't take me to the latest page but evidently to the last point I had read up to, which was more than 2 months ago. Sorry about that. Well it's still an interesting thing to point out anyway.

  15. I don't recall a system for noise masking. It sounds like it'd be a good idea, but when you get into the details you realize it'd be complicated to implement. It's not only noise that that goes into it, I think. E.g., a high register can cut through even a loud but low register rumble.

    And it's not like the .wav file even has data on the register of what it's playing. So either you have to add meta-data (which is insane), or you have to have a system to literally check pitch on the .wav data and paramaterize it in time to know when it's going to cut through what other parameters from other sounds. For that matter, it doesn't even have the data on the loudness either, so you'd have to get that off the file too and time the peaks with the "simultaneous" moment at arbitrary places in every other sound file correctly.

    And then position is going to matter independently for each AI. So it's not like you can have one computation that works the same for all AI. You'd have to compute the masking level for each one, and then you get into the expense you're mentioning.

    I know there was a long discussion about it in the internal forums, and probably on the public subforums too, but it's been so long ago now I can't even remember the gist of them.

    Anyway the main issue is I don't know if you'll find a champion that wants to work on it. But if you're really curious to see how it might work, you could always try your hand at coding & implementing it. Nothing beats a good demo to test an idea in action. And there's no better way to learn how to code than a little project like that.

    I always encourage people to try to implement an idea they have, whether or not it may be a good idea, just because it shows the power of an open source game. We fans can try anything we want and see if it works!

    • Like 2
  16. I was about to say, follow the tracker and you can see exactly what's being worked on, and often the entries come with comments talking about all the issues involved with it, so you know why this or that is being done and not that or this. Then you can even give comments to the comments here, and you're on your way.

    The point is, it's important to follow the tracker because otherwise you don't really have any idea what's going on behind the scenes. It happens so often, something you think should be a really trivial thing is actually mindbendingly complicated because of how the game deals with that system, and other things you think could never be done, once you actually look into it, turn out to be really easy, or something you think you see is really a kind of illusion once you dig into it. You just never really know until you get into the details of it.

    But if you do get into the details, once you starting understanding your way around the code, suddenly your comments can be really helpful.

    Oh, sorry, I didn't even mention the main point of following the tracker. That's where you can see if the issue you're worried about has already been tracked and its status, or you can track a new issue if you don't see it already there, and then follow its status from there.

    • Like 2
  17. 9 minutes ago, Skaruts said:

    How do you do that, though? I tried changing its success logic to make it depend on the "go to exit" objective, but that didn't make any difference. Still didn't get checkmarked at the end.

    I think it has to occur before the "go to exit" objective is triggered. That may just mean moving its place in the objective list, but another idea is to change the "go to exit" objective from that specific objective into triggering two arbitrary objectives in a row or triggering a script that triggers two arbitrary objectives, "objective1" (which checks the "don't kill" box) then "objective2" (which checks to "go to exit" box if all others are fulfilled).


    This question has probably come up before, so run a search for it. I feel like somebody would have thought about this in designing the objective properties.

  • Create New...