Browse Search Popular Register Upload Rules User list Login:
Search:
Thanks.
To uncouple two objects connected by a hinge, just set the hinge's timeToLive = 0.

If your thinking "I cannot respawn whole truck and trailer every time they couple", then my question is: Why not? Maybe you could do it, but choose not to. You can spawn a whole scene if you want to. See Eight In One.

What's wrong with the solution you show in the scene above?
Works good. You just need to glue those numbers on. Wow, no moving parts. I never realized until now that you can change the color of just part of an object. Nice use of a 105 byte texture and textureMatrix. Small texture and small textureMatrix code. I like your elegant design and coding.:tup: :tup:
Last edited at 2018/01/23 09:53:43 by s_noonan
Works 100% now. My only complaint is the clouds. I find them distracting, and I hate having to turn them off for most scenes.
Thanks.
How about a circle that fits in a ring and you use collideSet to engage and disengage.

P.S. A circle in a triangle frame made of boxes is fairly strong and is quicker for Algodoo to calculate than a circle in a ring.
Last edited at 2018/01/30 23:19:16 by s_noonan
Xray,
I agree. Thanks for clarifying that.
Thanks for checking it out. Regarding "female to male voice", that is most likely system dependent. I'm running Win10 and I suspect it came with 2 voices. You can download more voices. Google "SAPI voices" to see how.
Xray,

You need to tell us where to get the sound files. I get the error "File 'sonar.wav','Torpedo_Launching.wav', and 'Torpedo+Explosion.wav' not found."

P.S. Users can get the files here (right-click and select "Save Link As..."):
Sonar.wav
Torpedo_Launching.wav
Torpedo+Explosion.wav

P.P.S. The scene works great after I added the sound files to the "sounds" folder. Nice work. :tup:

See the YouTube video here: Seawolf. Xray, you can post the youtube video in the Description if you choose.
Last edited at 2018/02/23 22:51:47 by s_noonan
Open and run the scene and you should be able to see how I made the thumbnail. Changing the thumbnail directly in the .phz is not reliable.

By the way, I made some comments to your Airport crash tender.
Xray,

I agree with your "monkeying around" statement. Here are some possible solutions:

1. Build a library of sounds that apply to most scenes.
2. Create an Algodoo function that writes the sound urls to a text file. The vbScript or Python file can then download the files invisibly from the internet before processing any sound commands.
3. Only make scenes that use the original sounds.
4. Only use the text to speech component of AlgoSound. Make up words that sound like the sounds you desire.
5. Use two utilities, wav2hex and hex2wav. Convert the wav to hex, save it as a variable in Algodoo, Algodoo prints the hex to a file, then have AlgoSound convert the hex file to a wav. file.
Last edited at 2018/01/28 00:28:34 by s_noonan
2.Yes, but I don't know if they want to fix it.
3. Yes
5./6. One ends in a "z" and the other ends in an "n". One can be modified with a text editor and the other can't.
8. I thought it was good, only a small error in math.
10. Thanks.
Thanks.
Looks good and works the way you would expect. The math may not be correct (see Heat Transfer Lumped Analysis), but that might not matter. In short, the braking energy would go directly into the rotor while at the same time the rotor would be exponentially cooling at a rate depending on the temperature difference between the rotor and the surrounding air.

P.S. For more accurate modeling:

Initialize variables:

_tempAir := 20.0;
_tempOld := _tempAir;
_capacity = 0.1;
_resistance = 20.0;


colorHSVA := {
[20, 1, 1, (_temp - _tempAir) / 100.0]
};

In postStep:

Keys.isDown(_key) ? {
_heat = Scene.my.abs(_torque * angvel)
} : {
_heat = 0
};
_temp = _tempOld + _heat / (_capacity * Sim.frequency) + (_tempAir - _temp) / (_capacity * _resistance * Sim.frequency);
_tempOld = _temp;

Note: The cooling time constant = _resistance * _capacity

If you want to plot temperature:

colorHSVA := {
[20, 1, 1, (_temp - _tempAir) / 100.0];
scene.my.angVel = (_temp - _tempAir) / 100.0;
};

In a circle with center hinge put "angVel = scene.my.angVel", then plot the angular velocity for that circle.
Last edited at 2018/01/28 10:46:52 by s_noonan
Thanks. I appreciate the feedback. I developed the code a few months back and it appears that only a few people have tried it out. Search for the tag "AlgoSound" to find other scenes that use AlgoSound.
Last edited at 2018/01/28 15:07:52 by s_noonan
Q: Why?
A: Since text to speech does not require an external sound effect file, you don't need to supply the .wav file or url to the sound effect file. So the text for the torpedo launch could be "oooooooooooooooooooo", the text for the explosion could be "kibluem", and the text for the sonar ping could be "pean".
Q: Can realistic and convincing sounds be made with just text?
A: No.

I just tried using TTS for game sounds and it did not work well because it can only process one voice at a time.
Last edited at 2018/01/29 01:26:20 by s_noonan
I checked it out on YouTube. That must have been quite a design effort to create something like that.
It's difficult to take items off the shelf. I'm sure you can fix that.
Regarding "ONLY 2 lines of code", I'm proposing 3 lines. I know it's 50% more code, but that's the price you pay for more accurate results (linear heating with exponential cooling).

I recently updated Braking Bad. I liked your tight coding so much that I used your code with the modifications mentioned above.
Last edited at 2018/01/29 09:31:10 by s_noonan
Xray,

You're right! Thanks for correcting me.

JakubKubo,

Nice work. :tup:
Last edited at 2018/01/29 02:16:47 by s_noonan
Yes. I downloaded them shortly after you had posted them. They sound great and are much better than the ones I had suggested. I then changed the links in my original comment to your sounds with the intention of saving users the step of cutting and pasting the urls.
Try:

g0 := scene.entityByGeomID((readable(entity)).geom0);
g1 := scene.entityByGeomID((readable(entity)).geom1);
x := g0.angle - g1.angle;
x < 0 ? {x = x + 2.0 * math.pi} : {};
g0.text = "" + math.toInt(x / math.pi * 180)
Pretty sweet. I "hot wired" it and took it for a spin and even launched off a ramp. :tup: :tup:
Last edited at 2018/02/02 21:15:33 by s_noonan
Q: Can you make that game where dots are sliding down and you need to press button at right time?
A: I can, but I have no plans to do so.

Q: how are channels working? Is it like layers in algodoo?
A: Yes, from the point of view that channel sounds can overlap.
All channels are on all the time. You can't turn separate channels on and off.
Please refer to Xray's comment below.
Last edited at 2018/02/06 08:51:59 by s_noonan
Hinges and FixJoints can't connect geometries without first recreating the geometries and then making sure that geom0 and geom1 refer the new geometries. It sucks, but that's the way it is.
Nice work. I like your use of hinges. Did you come up with the hinge idea yourself, or did you see it somewhere else?:tup:
Thanks for bringing up the problem and solution. You can use AlgoSound to solve the puzzle even with the display turned off. I would suggest using headphones.

The next version of AlgoSound (not posted yet) has left and right volumes for the tones and I have made a scene similar to this that uses the left/right speaker balance to determine the circle x position. The next AlgoSound version will also automatically download sounds from the scene creators suggested web location which will be in an Algodoo generated text file. It's fast, and the user would never notice that he was originally missing the file.
Last edited at 2018/02/10 18:22:59 by s_noonan
Thanks for the comment. I can put a filter on it, so it can only download .wav, .mp3, or .mid files. Would that be OK? Do you have any other ideas? Next time state the problem and solution like Xray did above. Why can't you be more like your brother?
previous | 1 … 69 70 71 72 73 … 121 | next