Jump to content
The Dark Mod Forums

Octavian

Member
  • Posts

    5
  • Joined

  • Last visited

Reputation

3 Neutral

Recent Profile Visitors

183 profile views
  1. Yes. The problem now is how the switch between one speaker to the next is handled so the transition is as smooth as possible. For example one speaker has been playing for X amount of time but, when the switch happens, the other speaker plays the same loop but from the start. So the switch is jarring. One idea at the moment is to have all but the "first" speaker that handle this turned on at map start but muted. So when a switch happens and volume is "handed over" to the next speaker they are in sync in terms of "time into the sound loop". And that's a start. But still, only ambients within 11 portals will start playing at map start. Within 11 portals, matching volume should be easy enough. After 11; well, we'll see. This is not about actual mazes, and these transitions would be, at least ideally, seamless. Seamless and over time rather than instant. And the maze is an abstraction to test the limits of this idea, and find solutions. But since I tend to talk a lot and be confusing, mostly due to language barrier, I tried to abstract it. If you are curious about the design reasoning for having this long sound travel distance and how I'd like to use it in an actual mission to tell a story, feel free to PM me and we can talk about it Yes, I think I understand how it works now. I took a quick look at the code too. It makes sense why they did it this way.
  2. You are totally right. It's obvious but I couldn't see it. Thank you so much for pointing out this fatal flaw of my reasoning. Now I can move on knowing that, if there is way to do what I want to do, this is definitely not it. Thanks for the explanation about the portals and sound attenuation. I'll put it to good use.
  3. Thank you all for the quick and comprehensive answers. TL;DR Goal : I need to make a sound reach the player by taking the literal route the player would walk to reach it. Problem : A sound cannot be carried further than 10 visportals. Most likely solution, and my questions: 1. Is there any possible way for me to override this limit for certain sounds ( this one right here, but none else ). 2. Is there any possible way for me to change that variable, globally. So it affects all sounds. 3. Can I make a visportal attenuate sound based on the distance to the previous visportal ( or sound origin ) so volume depends on overall distance and not on visportal loss? End TL;DR And thanks for the ideas. Unfortunately, I don't think any of the proposed solutions would work for my problem. Wanting to experiment with the concept of audio "beacons" as navigation aids ( or hinderances ) I made this, into a map, a 3D maze. "/" is a hole to the upper floor, "\" one to the lower floor and "X", both. A sound is playing at the exit in the top left square ( top floor ) and the player starts at the entrance in the bottom square ( first floor ). 3D mazes are great at "compressing space", and there's a lot of it in that cube, 125 cells or "rooms". My basic thought process and intention was, make this thing, visportal each "hole" leading into every of the 125 rooms, find the furthest room from the source of the sound ( not in a straight line but the longest path you would literally have to "walk" ) and tweak sound_loss across all portals until the sound in that room is barely a whisper. The effect would then be, if you want to reach the sound, wherever you may be at any particular moment in time, walk in the direction it gets louder. Simple. Crucial however, it works even in a maze so it does take global geometry into account ( as an abstract proof of concept and springboard for designing gameplay around this mechanic, as an added layer of complexity or simply as world detailing ). Visportals solve, kind of ( not really* ), a problem and that is sound attenuation as a function of distance. An ambient on the top floor can attenuate to the third floor due to distance in a straight line. Say it travels 300 units in a straight line. But with visportals, the path is 3000 units. It twists and turns, loops, because, well, the sound "walks" to you on the same path you'd walk to the sound. This means, on the top floor for example, in each of the rooms ( except the exit room where the sound source is located ) the sound has a different volume. Because the "walking" distances from each of those rooms to the exit room are ( wildly ) different. All this in a very confined place ( why I figured out this would be the best test ). However, where the player and the sound are in space at any point in time is just part of the issue and I'm afraid the proposed solutions won't do much to solve this particular problem. Let's look at an example. This maze has one solution, marked by the black line; the player starts at the top and the exit is at the bottom. Also at the bottom exit I choose to place one of these special sounds. Now, at map start, the black line, the solution to the maze, is also the path the sound must necessarily take to reach the player. At map start there is no other physical path the sound can take to reach the player if it can't go through walls. The blue player facing north and taking the left corridor will experience a gradual loss in the volume of the sound. Even if he may at times walk towards the sound ( "down" ), with every step he increases the physical distance the sound has to travel to reach him, since it can't travel through walls. So it must get quieter. Sound pipes is an awesome idea if the paranoid lord has in his mansion a room into which sound pipes route all the sounds from all the other rooms so he can effortlessly eavesdrop on everybody at once. But it would not work for a maze. Just for argument's sake, you can make this 2D maze into a map ( just the geometry ) in an afternoon, visportals and all. Say there is no portal sound travel limit. Then you're done, it just works. More importantly, if you decide, I'll move this wall here, delete whis wall here, and make another there, you're also done too. If you were to manually zone or script this, not only it would take a ridiculous amount a time, even a small change as removing a wall section would mean you would have to redo all your manual work. This would not happen with visportals as they do the job for you. And what about doing this with moving sound sources? What if my source moves through the maze, and I move too. *The problem however is deeper. Even if this limit is to be removed or circumvented visportals don't really solve the problem of sound attenuation. Correct me if I'm wrong but from what I can tell, having two sounds, both as loud, one 10 meters to your left, the other 20 meters to your right, both sound just as loud if each passes through just one visportal to reach you, both with the same sound loss. This is a problem and I have to tweak the sound loss on one of the portals. But that won't solve anything. If I set the portal that routes the further sound to cut more, I affect all sounds coming from that direction. But what does s_drawsounds do? It makes a sound source point to a portal. Not its path trough all the portals, just the last one it "walked through". It knows the path through all the portals, i.e. all the "arrows". Sound to first portal, first arrow, first portal to second portal, second arrow, and so on. But instead of showing you all those arrows, the engine tells you I've "walked" "this" sound to the portal I'm pointing at and each time I had to cross a visportal I had to pay a volume toll ( taking into account zero too ). So, then, is there any possible way to tell the editor to tell the engine, right, this particular sound is a special sound. Its volume isn't tolled when crossing visportals. Instead, add up the length of all the arrows, multiply it with this number, and that's your volume toll. Since it presumably "knows" what those arrows are. Because sometimes it makes all the sense in the world to cut volume at visportals. Like if they're bound to a door or a window. But, sometimes, it makes the least sense in the world to cut volume at a visportal by X regardless if the previous visportal on its path is 10 meters away or 50 meters away.
  4. Thanks for the quick reply. Indeed, the Horn would have been done with ambient noise. The problem with ambient however is that, for example in this small example I concocted, the sound would be louder at the west corridor relative to the north corridor simply because of proximity. What I want is to have the sound louder at the north corridor since that's directly connected to where the sound comes from. Even in this tiny example the sound has to be bent around through 6 visportals so the 10 limit is, well, extreme when it comes to me wanting to carry a sound across a level.
  5. Hey guys, TL;DR can a sound travel more than 10 visportals? I'm working on a map and visportals aren't working how I would like them to. To illustrate my problem I've made a test map. A speaker with s_maxdistance set to 100, and 11 visportals; embedded in each of those an info_portalsettings with sound_loss set to 0. My problem is that the player, at map start, doesn't hear anything; the visportal closest to him completely blocks sounds. So my only possible assumption given the little that I know about DM/DR is that there's a limit to the number of visportals a sound can travel, and that limit is 10. So then my question is, am I missing something, or doing something wrong, or is this a limitation? And if so, could someone give me an idea for a workaround? To put this problem in a bit of context, think about the "Down In The Bonehoard" mission where you could hear the Horn more or less across the map. I want to make maps where audio plays a key role, in particular for navigation of especially winding, maze-like level geometry. So for example, given a choice of n corridors, walking down some the sound would get louder as those paths are ultimately connected to the source of the sound, while walking down others the sound would get quieter as those paths are ultimately not connected to the source of the sound, which is only coming from "behind", as it were. Of course, new problems and questions would arise. Like how do I carry one particular sound across the map through twists and turns, ups and downs, while having all other sounds behave, i.e. not travel across the map, i.e. get attenuated more by visportals. But, before all this, I have to know, what's with this unexpected 10 visportal sound propagation limit? Help, please. Thanks.
×
×
  • Create New...