Forum

User posts Mentalist
16 January 2016 19:12
@Yuri Thank you! I can't wait to see my game started, haha. I'm still experimenting in the learning stages.
But yes, the Logic Editor is a great help, because I don't have much experience with javascript, but I am very comfortable with Blender's node system.

@Konstantin Thanks! It will be so cool if this can be done easily in the future! Also, it would be useful if we could have synced loops that can be made to fade in or fade out according to the player's proximity to an empty… if I can slip in that feature request. ;-)
12 January 2016 17:35
Thank you for your explanation and example node setup! That helps a lot.

As for getting the samples to play one after another, I'm guessing something will have to come next after the Play Sound nodes to get the engine to check the variable again and find out which loop to play next. This is just a guess, I need to experiment with it.

To better explain what I want to do, here is a screen shot of what the loops look like in Ableton Live:

The green arrows indicate that the drum loop (left), and the first melody loop (right), are playing. If pattern #2 (in yellow) gets clicked the melody will switch to pattern #2 when the next bar begins.
I want to cue loops in a similar way, by interacting with objects in the .blend.
12 January 2016 15:23
I would like to create a game level in which the background music's melody is different depending on which area of the map the player is in. Instead of transitioning suddenly I would like to cue up the next melody to be triggered using a variable, so that when a certain measure of music has been reached it will start the melody for that zone of the map.

Before trying to build the level, first I want to test this concept with a simple switch system of four cubes. When cube #1 is clicked it will cue up melody pattern #1, when cube #2 is clicked it will cue up melody pattern #2, etc… I have prepared four melody patterns as separate audio loops, and a drum pattern to go in sync with them that will not change.

I have started setting this up in the Logic Editor, using a Switch Select node and four Variable Store nodes. What I'm not sure about is how to call the stored variable and have it determine which audio sample will be used. Also I need to somehow create a delay that is the length of one bar of music in time, so that it triggers the next sample at the transition between bars.

Here's a screen shot of my Logic Editor node setup so far. Please help.

08 January 2016 15:56
I don't completely understand your issue, but one thing I noticed is that your UV map had not been specified in your Texture settings. It seems this isn't the only problem though, because it still isn't rendering, even after I selected your UV map.
08 January 2016 07:17
Thank you, Alexander!
06 January 2016 22:29
Edit: I was thinking that if fixing the web page will take a while, it might be better to serve a different page to iOS users that uses only a static logo. That way we can at least access the forum from mobile devices. Just an idea as a temporary solution.
06 January 2016 17:38
Thank you both for this helpful info. And sorry for the late reply.

I did a quick test animating a simple spinning object at 30FPS, and then I tried slowing it down to 1FPS. I was surprised that the motion was still smooth, although of course much slower. I think I understand now, what you mean about Blend4Web trying to refresh at the fastest rate possible.
And of course it makes perfect sense that video textures require a higher frame rate to appear smooth. I'll keep this in mind.

Finally I would like to ask, is there a recommended frame rate for creating game animations?
28 December 2015 19:02
1. Does Blend4Web use the frame rate of a .blend to determine the refresh rate in the browser?

Since animation playback speed is determined by frame rate I imagine it is important to pay attention to. However, I also realize that games are different from video, and more latency can occur depending on how heavy part of a level is.

2. Let's say we have monsters who are animated and their animation cycles are created for 30-FPS - when we throw too many of these monsters into part of a level will they all get really slow one-by-one, or will the game stay synchronized but slow down globally?

3. Does frame rate play a role in the synchronization of game music?

I'm not sure if I'm asking the right questions, but I'm trying to understand frame rate in the context of games.
28 December 2015 12:20
This was really helpful! Thanks.

The only part that had me confused for a moment is I didn't know that Simplify Curves is an add-on. For anyone else reading this, it's bundled with Blender, you just have to search in Preferences and enable it.
28 December 2015 10:45
Okay, thank you for confirming this. I will bake for now.