Lord Blizzard's Forum Posts

  • 11 posts
  • That's a really good option too! I hadn't considered using an array to store the values.

  • I guess that approach feels messier to me since then I end up with 60 objects sitting around rather than 60 checks in a single function, but I get how that would work too.

    I'm gun-shy about global variables because I'm more used to Object-Oriented approaches. I have a "tracker" object that keeps all the variables that WOULD be global. I know functionally it's the same thing, but it feels neater somehow.

  • Just wondering if I'm missing a hotkey or quick way to do this. I have some basic conditionals to check if a value is a given number, to represent sequential steps of user instructions. It's like changing the text depending on what page a user is reading.

    I'm doing a LOT of copy/pasting since the instructions are mostly the same (if x = 12, change text to ____), so I did a lot of copy/paste. But then each condition has the same value (if x=12, ...., if x=12,...). I'm going through 1 by 1 and incrementing the values for each conditional, but manually this is a lot of clicking into the parameter window, clicking down on the condition to check, typing in a new number, and hitting enter. I have something like 60 "pages", so this takes a while.

    I got it done, but for future reference is there a way to automatically increase/increment the conditional values from the Event Sheet? Or would this be a possible feature for the future? i.e. I copy the event for x=1, 10 times, and it automatically does x=2, x=3, etc.

    I might just be spoiled by Excel, which does this sort of auto-incrementing very nicely!

  • My guess on the outside squares is that, because there aren't squares to one (or two) sides, the math is breaking down and they aren't receiving anything. You mention your code is testing all 4 neighbors for a given square, but the edge pieces only have 3 neighbors, and the corners only have 2. Without being able to look at your code, I might guess that something's breaking there.

    Also, to avoid the bias issues you're talking about, fluid simulations typically work in "passes", from what I understand. They don't modify the array values one-by-one, but calculate the ENTIRE array and then use those results. I don't know if they'd use 2 arrays or a 3D array with the Z-axis representing the "current" and "next" values for each square. Typically these simulations are using something more advanced than just averaging two squares, though. They'll use something like Navier-Stokes, which involves a bit of calculus, but is pretty easy to find example code for in any language (even javascript!)

    An example web-app using that method is at https://www.esimov.com/experiments/javascript/fluid-solver-mono/. That guy has a link to his blog where he talks about coding it, as well, so you may be able to get an idea of the method used there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Heh, I love similar thinking. I actually did that with a circle sprite I had (multiplied by 100), then made it so the sprite's opacity was set always to the value of the peaklevel * 100. with the music, it's VERY skippy, as the peaks are constantly changing, so I'm working on either averaging out the value every 50 milliseconds or so to smooth it out, or I might just smooth the audio file itself, though I'm not sure what effect this would have on the end sound.

    Ah well, it's an experimental WIP, no reason not to try random stuff. =P

    And thanks for all your input, by the way. Very helpful, even if this doesn't end up working out quite as planned. =P

  • Ugh, I feel silly now. Okay, I didn't realize the .cap you posted was actually MADE by you right off. I thought you'd linked me to something someone else had done. hence the mixup with 'he' instead of you.

    You mentioned using the .wav format, or the channel audio, instead of the. mp3. Even without looking at the example, I tested that out, and it DID work, so that was what solved it for me.

    You mentioned rounding it in your post, so I knew you'd done something to make it smoother, even though I couldn't see it to figure out how or what did it.

    And no, I'm not running 99.72, i had 99.6. So, i'll install the new one and properly look at the .cap. =P

    Basically, I understood what you said, I just couldn't check your example to see exactly what you meant.

  • Yeah, everything I'd gotten so far was from the wiki, I just didn't realize the expressions wouldn't fetch for music files like they would channel sounds.

    The example you linked isn't working for me for some reason, but the only thing I'm curious about how he did was rounding the values, though I think I have an idea of doing that so it isn't so skippy...

  • Deadeye, you got exactly what I was looking for. I didn't realize the peak and RMS info only worked with WAV files. I converted the mp3 over and used the WAV, and it worked perfectly. it held constant at 0 before, but now it's great. I need to work on smoothing it out a bit, but it's definitely something I can work with.

    I was hoping it was something small like that I was missing, rather than something impossible, but it's good now. Thanks! =)

  • alright, far as I can tell, the values don't change with the music, and my attempts at even getting text to display properly with it, or anything dynamic related to the audio, isn't working. I guess I'll have to give up on the idea, unless I'm REALLY missing something. =/

  • Yeah, I figured as much. That was about all I could figure out from the wiki. I might just mess around with volume detectors and try to get it going. I don't want something SUPER advanced, but I was hoping to get a synesthetic experience going between the music and the game around it. Things would pulse colors and waves, etc., along with the music.

    The volume levels idea might be basic enough to get the concept in place, though. I'll try fiddling with stuff. =P

  • I'm working on a couple projects with Construct after starting a few days ago, and I love the program. I had a bit of a random idea to test if I COULD do something, and I'm wondering if there's any known way to make something react to music in Construct?

    I know how to make music play with the Xaudio plugin, but I want to make something react to the actual beat of it, kinda like a visualizer, or an equalizer-looking effect.It doesn't even have to be specific types of sounds, just beats in general.

    Is there a way to do this, or would I have to import some python scripts that can analyze audio files in order to effectively do it?

  • 11 posts