Browse Search Popular Register Upload Rules User list Login:
Search:
Ohhhhhh.... THAT Bacon!





(Never heard of him.)
UDG -- In a comment to me, you asked: "is there a function that can determine the distance at which a laser changes direction, such as a reflection or refraction, instead of the position of the object that reflected or refracted the laser?" Well, this scene doesn't do that. Because you set it up with only one laser beam (maxRays = 1), the laser cannot reflect off of one box and hit another box. A few parameters need to be changed to make that happen. Here is how you can do that.... In the laser, change maxRays to 2 or more. Then in the first box that the laser hits, change the "Refractive Index" to some high value (infinite has the highest reflection). After doing these things, you will then be able to bounce the laser beam off the first box, and into the second box, and the readout will show the distance to the second box!
When you create a game that no one is familiar with (like this one) you should provide some instructions which explain how to play the game, and also explain what keys or mouse clicks are used to control certain parts of the game. If you don't do that, then no one will be able to figure out how to play the game! :o
Apparently, the color OR the texture can be altered, but not both. Is that how you intended it? I just think that giving the option to separately change both the color AND the texture would be more useful and desirable. What do you think?
I like this one better than your previous version. :tup:
Btw -- I was wondering if you knew about this Algodoo behavior that I recently discovered (it has nothing to do with this particular scene of yours). Here's the setup: Create a very simple scene with any geometry (let's use a box for this demo) and a laser. The laser beam does not necessarily need to hit the box. Then right-click on the box and then hover down to the Material panel and make note of the Refractive Index value. Then close that panel and go over to the laser and delete the laser. Then go back to the geometry as before, and make note of the Refractive Index value again. YOU CAN'T, because it's no longer there! Apparently, Refractive Index only shows in the Material list when there is at least one laser in the scene. Now, if you were to open the Script Menu of any geometry, you would still see refractiveIndex in the list of events and variables. It's only the Material panel that displays Refractive Index when a laser is included in the scene.

Did you know about that? I discovered it just a couple of days ago.
Last edited at 2019/09/23 03:28:47 by Xray
Excellent scene! :tup:
The ball gets stuck at the beginning of the game because the right-hand wall is shifted a little to the left, which blocks the path, preventing the ball from moving DOWN. It just needs a little adjustment to the right.
Last edited at 2019/09/25 02:22:07 by Xray
You obviously put a lot of thought and a lot of time into this project. And because of that, it looks good and functions perfectly. Definitely worthy of a high ranking! Nice job, as usual. :tup:
Ummm.... I tried using the texture tool for the first time, and, unless I'm doing something wrong, it doesn't seem to work. Here is what I did: I clicked on the eye-dropper, and then I clicked on a texture. The sample thumbnail image showed the texture that I had selected, but when I tried to draw the geometry, it showed a solid color (no texture).
NP... Works great now. :tup:
The song has a good tempo but it's in the wrong key. It would sound much more sparkly and zesty in the key of C# major. Also add a jazzy bass line to it.
Last edited at 2019/09/26 23:59:11 by Xray
Danjr -- Just curious, why do you need such a large number? :huh:
Nope, it's still the same. Are you sure that you are uploading the correct version of the scene on your computer? It may be fixed as far as you can see, but when others download and play the game, it is still the original version.

After I upload a scene to Algobox, the next thing that I do is to download the scene and run it just to make sure that I am seeing what everyone else will see rather than the version that happens to be on my computer. Give that a try!
Last edited at 2019/10/02 02:49:01 by Xray
Cotasam Nemano -- What did you mean when you said, " I'm going to post some of my creation on the account named "Little". "

Is the account named "Little" your account too?
How does this scene demonstrate a Fourier Series? It looks to me like a mechanical Lissajous curve generator. Back in my earlier days when I worked as a design engineer, I worked with Fourier transform software that converted waveforms from the time domain to the frequency domain (and also the inverse). These Lissagous curves, although they look rather nice, don't have anything to do with Fourier math, unless I am mistaken.

Comments?
Holy cow! I don't recall what the min/max range of Algodoo's floating point math is, but I'm sure that it's nowhere close to the kind of values that you are looking to compute. There are a few very smart math wiz's (I'm not one of them) who occasionally hang out here on Algobox who might be able to provide some suggestions for you, but in the mean time you might try searching around the Algodoo Forum. There are a lot of interesting chats that happened back in the early days (around 2009 ~ 2010) when people talked about the math and physics capabilities of Algodoo. At the very least, I think you would find those discussions to be quite interesting and informative.
No problem. So, according to your recent description of what you wanted to do, it does look like you made that happen in this scene. But it is not called an "altimeter" because an altimeter is a device that measures height above the ground. For example, and airplane measures its altitude with an altimeter. What you have here in this scene is simply a distance measuring device.
It works now.............. YAY!
Last edited at 2019/10/04 00:21:24 by Xray
This could be done with only one laser for each of the seven segments. The Thyme script is a little more complex, but the segments do not flicker when a number key is held down like they do with using multiple lasers. Let me know if you are interested, and I will show you an example script for one laser. You can then easily figure out the scripts for the six other lasers.
Okay, here is what you need to do:
Put just one laser on each of the seven segments. I will show the script for the center horizontal segment because it gets activated by a lot of number keys. This is the script that goes in the "onKey" event of the laser for the center segment:

keys.isDown("2") || keys.isDown("3") || keys.isDown("4") || keys.isDown("5") || keys.isDown("6") || keys.isDown("8") || keys.isDown("9") ? {
maxRays = 1
} : {
maxRays = 0
}


The script above converted into words is this: If 2 key is pressed, OR if 3 key is pressed, OR if 4 key is pressed
, OR if 5 key is pressed, OR if 6 key is pressed, OR if 8 key is pressed, OR if 9 key is pressed, Set "maxRays" to 1. Otherwise if none of those keys is pressed, Set "maxRays" to 0.

When maxRays is 0 (zero), the laser will not shoot out a beam. This is how a laser can be controlled instead of using the normal "activation button" method. So, be sure to disable the activation button for each laser if a button had previously been assigned.

Now in the center horizontal segment you must create a local variable named _timer. You do this by entering the following in the data entery area in the upper left corner of the script menu:
_timer = 0
After you enter that script, you should see the new local variable named _timer in the list of events and variables for that geometry. Then in the "onHitByLaser" event, you enter the following script:

color = e.laser.color;
_timer = 5

That will set the geometry color to the same color as the laser (which happens to be Red), and also it will set the _timer to 5.

Then in the postStep event for the geometry, you enter the following script:
_timer > 0 ? {
_timer = _timer - 1
} : {
color = [0, 0, 0, 1]
}

That script checks to see if the _timer is greater than zero. If it is greater than zero, subtract 1 from it. If it is NOT greater than zero (meaning it is zero) then set the geometry color to black.

The reason why this geometry needs a timer is because we cannot directly detect when a laser is NOT hitting an object. We can only detect when a laser IS hitting an object. So, the way I get around that is by presetting a timer to some arbitrary value (in this case 5) whenever a laser is hitting it. The timer cannot count down to zero as long as a laser is hitting the geometry. But when a laser is NOT hitting it, then the script in the postStep event will be allowed to subtract the timer value down to zero. When zero is detected, then the geometry color returns to black.

You will of course need to adjust the scripts for each of the other lasers.

Have fun!
Last edited at 2019/10/05 17:57:50 by Xray
Excellent! :tup: :tup:
Quote: "kinda doesn't know the heart as a polygon,"

Well, it does for me! I don't know why it doesn't detect YOUR heart. (he he)

Just kidding... Maybe slow down the scene by moving the simulation speed slider to a slower speed and see if that makes any difference. Also, let me know which one doesn't detect.... The laser version or the collide version.

Thanks
With Algodoo (and especially with Thyme script), there are so many different ways to do the same thing. Some ways may be simpler and more efficient, and other ways may be more clever. But it doesn't matter because it all boils down to the fact that people should have fun and learn some things while having fun. That's what it's all about!
The only exception to all this talk about information not being able to move FTL is the exception that supposedly occurs in quantum mechanics (Einstein called it "Spooky action at a distance"), and it is known as quantum entanglement. It's where two twin sub-atomic particles "know" when the other twin has changed state exactly when the action occurs without any delay at all. Not even light speed delays! It's crazy stuff that they can make happen with some crazy mathematics, and some scientists supposedly made it actually happen in some weird experiment. That stuff is WAY over my head, and so if you want to learn more about it, then GOOGLE it.
When you are testing for true or false, you do not use equal signs. This is how you do it:

scene.my.a0 ? {Do this if true}:{Do this if false}

When testing for a numeric value or for text, you then use two equal signs like this:

scene.my.variable == 3.14 ? {}:{}

or
scene.my.variable != 3.14 ? {}:{} The explanation sign is the NOT symbol.

scene.my.variable == "This Text" ? {Do this if text matches exactly}:{Do this if text does not match exactly} Text always must have quote signs at beginning and end of text.
One more suggestion.... Disable those annoying Algodoo clouds! LOL
Wow, those scenes are incredible! I don't know how I missed seeing them before, but I am glad that you posted the links to them. Very impressive! _o_
This is amazing! Where is the Thyme script in this scene? I want to see how you did this. :)
I knew people would comment about that, and I did that intentionally because I wanted to show that you cannot "pause" your brain when it gets messed up from taking street drugs. It stays with you, sometimes for a very long time. :y
previous | 1 … 247 248 249 250 251 … 443 | next