NoticEmpire's Recent Forum Activity

  • When I mention performance I'm talking about the CPU usage in the debugger. It seems to jump roughly 40% when pathfinding. Is it possible this isn't accurate? If my game is already at 60% would implementing a variation of this pathfinding system cause noticeable lag?

    Edit: For clarification I was referring to projects by R0j0hound which I found, but I tried with alextro's example and it had the same thing happen.

  • Now that I'm looking into it, the performance impact of pathfinding via events isn't negligible. Might there be a more efficient way of doing this?

  • Haha, looking at your manual path.capx is what gave me the idea in the first place. I'll take a look at redblobgames, thanks for the info.

  • Hello to anyone that still uses these forums for Construct 2. I would greatly appreciate help with an issue I've been trying to solve using my 2.5d system. In short, my 2d game has a z-axis, which works phenomenally. However, the built in pathfinding is completely broken by it.

    For starters, setting the obstacles as solids will not work, as the method of detecting if in object is solid is not based on the solid behavior, but on a variable attached to a family.

    Setting the obstacles as custom will also not work, as it is impossible to only add picked instances as obstacles, you have to add every instance of the object.

    Also, there is one shared "map" used for every object with the pathfinding behavior, meaning that what is an obstacle for pathfinders with 0 as their z-axis might be completely different from pathfinders with 100 as their z-axis.

    Finally, the pathfinding algorithm was not designed to account for changing their z-axis. It will attempt to find a way to the target without accounting for layers of verticality at all.

    To get around this I have considered using a navigation tilemap with the EasyStar pathfinding plugin, where I can set the availability of certain tiles/nodes by checking any solid sprites over them. However, just like the default pathfinding plugin, EasyStar was not designed for layers of verticality, and won't consider it when pathfinding.

    What MAY potentially work is a custom implementation of the A*star algorithm, where the nodes themselves can be given a position on the z-axis. I will attempt to do this, but I would GREATLY APPRECIATE if anyone with existing A* experience or just general pathfinding or 3d construct experience could give me tips or pointers in the right direction. Hell, on the off-chance that anyone has attempted something like this before please link me to where I can see their work.

    All help is greatly appreciated.

    Tagged:

  • These are the Construct 2 forums, not Construct 3. Since Construct 2 is no longer supported, I doubt you'd get much help here. Try asking in the Construct 3 forums if that's what you're using.

  • I have this problem as well, seems to only occur when using third party plugins. You might have to just not use the script minifier.

  • When I said up and down I meant like 8d audio, which I checked and Construct 2 does support.

    My system for detection seems to be working without the need for JavaScript, thankfully. Audio is played at an invisible Sprite's position, and tags, loops, duration etc. is stored in an array. When audio ends the corresponding invisible sprite is deleted and the audio is removed from the array. This is mostly tag independent, which weirdly enough might allow for multiple "tags" per audio. I'm surprised that isn't a feature yet either.

    The system also has easing features for volume so its really easy to fade stuff in and out seamlessly, even if a new ease is called while a tag is currently easing.

    In any case, the issue is solved. Thanks for your advice, I might look into making a custom audio plugin in the future.

  • Ah, that's unfortunate. At the moment I'm doing your second suggestion of calculating the 3d distance. I'm playing at an object which is offset from the location the sound is at to have the correct vertical panning (audio doesnt just pan left and right in Construct, up and down as well no?), and also to keep the horizontal panning, and calculating the volume from there.

    My knowledge of JS is limited, and to be honest I'm not sure how to even convert stuff I write in JS into Construct. Custom plugins maybe? I haven't done it enough to know where to start.

    I'll look around for tutorials later, seems like it'd be quite helpful for overcoming many limitations of the engine.

    Thank you!

  • Turns out the audio wasn't being preloaded correctly in the main project, which was causing the issue. I was going insane. If anyone else has this issue, try enabling the project property for preloading sounds, or try preloading the audio files individually.

  • Hey so I've found a really weird bug and would super appreciate if anyone can help me with it.

    The schedule next play event in the audio object works in my test projects, but if I literally copy-paste the code verbatim into my main project, it doesn't work.

    The file that is supposed to be played after the delay just plays immediately no matter what I do. I know the code works because it functions correctly in the test projects, but if I do it in the main .caproj it just doesn't.

    The delay is calculated correctly, I checked via setting a global variable, it just doesn't get applied. I've tried making an empty layout with an empty event sheet (besides the identical code) and it doesn't work. I've checked that the audio objects have the EXACT SAME setting. The code is also THE EXACT SAME. There are no differences, except it works in one project and doesn't in the other.

    ^ This is the code in the main project. It is used in the Event Sheet 1 which is tied correctly to the test layout.

    It doesn't work.

    ^ This is the code in the test project. it is used in the Event Sheet 1 which is tired correctly to the Layout 1.

    It DOES work.

    BUT IT'S THE SAME????

    I've been losing my mind here trying to pinpoint the issue but I can't for the life of me. Please, can anyone help with this predicament? I know that Construct 2 will never receive another bug fix, but I NEED to know if this is something I can do something about.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello everyone, I'd like to have positioned audio that is also played at different heights above the layout, similar how the height of the listener object can be changed. Only issue is, this doesn't appear to be possible, so I was thinking of implementing my own volume/panning system.

    I know that in Construct 2 audio panning wasn't possible, is this still the case in Construct 3?

    Many thanks.

    Tagged:

  • Unfortunately, I haven't found an actual fix, but instead a weird workaround.

    I moved all my audio files into the sounds folder. Yes that means that music files aren't being streamed which is less efficient, but it doesn't seem to have made any noticeable impact.

    Then I moved every sound effect I want to play at timescale 0 to the music folder, and preloaded them.

    While this is really stupid as now Sounds are in the Music folder and Music is in the Sounds folder, everything is placed in sub-folders so it doesn't really matter.

    Then its just a matter of changing the Audio object's property for "Timescale Audio" to "On (Sounds Only)."

NoticEmpire's avatar

NoticEmpire

Member since 23 Aug, 2018

None one is following NoticEmpire yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies