I was trying to make him walk also. The method you are using has a lot more potential. I will post my scene as a response to this one. If you dislike my using your Carl in my scene, then let me know and I will delete it.
Q: Please explain why moving the code would make a difference.
A: I don't know why, but if you don't move the code, then Algodoo v2.1 crashes upon cloning. Something changed between v2.0.2b15 and v2.1.
Q: How are the recorded snapshots stored?
A: They are stored in the _angleList for each hinge.
I did this by using Animated Gumby, replaced Gumby with Carl, modified all the axles' code to be the same as Gumby, imported an image of a "walk cycle", took snapshots of 16 poses, deleted the walk cycle image, and looped the playback. It was very tedious just to create a few seconds of animation. I think you have the right idea by making a mechanical version. In your scene Carl walks very smoothly and has more potential for user initiated actions.
1. Click "Show plot" in the context menu for the orange circle.
2. Make a car to carry the box of balls at constant speed. Check Selection>Follow in the car context menu. Add a circle to the scene directly below the car. Make the circle's x position equal to the car's x position. Make the circle's y position a function of the amplitude of (orange ball velocity minus car velocity). Add a tracer to the speed circle.
3. Spawn a box of fixed width with a length equal to the distance between two points. Place the box exactly between the two points. Set the angle of the box equal to the angle between the two points.
1. Move all code from opaqueBorders into postStep for both box and hinges. If postStep already has code, then add the opaqueBorders code to it. Set opaqueBorders to true.
2. In Box onHitByLaser:
I see that I lied in my last statement of the previous response (item #2 had changed).
Q: I was hoping that pressing H (Home) would be like adding another step to the stored moves.
A: With these changes, pressing H will position the alien at the home position, you then would need to press S to add that position to the list.
Q: That way the user can place a Home command either at the beginning or at the end (or even in the middle) of the dance routine.
A: With these changes, he can do that, but he has to do it in order, not asynchronously.
I looked into single stepping forward and back, but haven't figured out a way to do that yet.
I see all your dance moves are missing. I have a copy of your previous version if you need it. I also have a copy with the suggested updates, except it has one added step that I was using for testing.
Psuedocode:
v = orange ball speed;
newPos = new plot circle position;
oldPosNow = old plot circle position minus how much it has moved since it was created;
boxLength = distance between newPos and oldPosNow;
boxPos = halfway between newPos and oldPosNow;
boxAngle = angle between newPos and oldPosNow;
Scene.addCircle({
...
pos = {
newPos minus how much to move it since it was created
}
});
Scene.addBox({
...
size := [boxLength, 0.02];
pos = {
boxPos minus how much to move it since it was created
}
angle := boxAngle;
});
_oldPos = newPos;
_oldTime = sim.time
Nice discovery. I played with this for a while. This is what I found:
1. Higher simulation frequency makes the trace smoother.
2. Higher simulation speed makes the trace brightness more uniform.
3. I made the circle invisible.
4. It worked well on my PC with all planes set at -50000 attraction.
5. If one axis has small amplitude, even when the space between planes is square, then wiggling the plane that effects the axis may increase the amplitude.
Another good one. I see the sensor affects the motion of the geigers . This is positive proof of the Heisenberg (Werner Heisenberg, not the "Breaking Bad" guy) principle.
I suggest you move the aliens more to the right, start, loop, stop Algodoo near the beginning of the loop, and save with the snapshot only showing aliens. This way when the user starts the scene it will already be in loop mode and they don't have to read or see any controls until they zoom out. Either that, or put a "Press L for Demo" sign next to an alien. The reason for the suggestion is that most users don't look at this web page. At this point, I see 51 downloads and 2 views. Those two views are probably just from you and me.
So I'm thinking, 95 steps times maybe 5 adjustments per step results in almost 500 adjustments, plus the time you spent modifying the software. My guess is that you put some serious time into this. You could enable ratings to get some feedback. No need to give me any credit.
I'm still looking into modifying the Gumby scene based on some of your suggestions. I have single stepping working, but I am not able to modify any of the steps yet. I had tried using keypress instead of lasers but also ran into the "ignore the first keypress" problem. The latest version (not posted yet) uses clickable "buttons".
It works for me except the drag tool is still active. I could just lower the drag tool strength or always point to the center of rotation or am I missing something.
#1. Both ideas in suggestion #1 are good ideas as can be seen in your scenes. Just to be contrary, I used a third method. This gives users who read the comments three possible methods.
#2. The #2 suggestion is good, but I am not a YouTuber. You can make an instruction video, and attach it to your new scene, if you are so inclined.
I see you are being modest. I know you put in a lot of time understanding and modifying code. Also if you compare version 2 Gumby with number 1, you will see that most of the functionality comes from your ideas. Enabling ratings may benefit both of us, but it is your call.
P.S. I would also like to encourage other users to create animations and enable ratings. If you do it, maybe others will follow.
Applematic! Only $19.95. Order before midnight, and we will add a second Applematic for free. Impress (deeply impress) your friends and bothersome neighbors.
I can see you are working on it, but textures are still not showing. I can see that the textures folder in the .phz file is missing, meaning that the textures are not being saved. It could be that Algodoo does not like the name or the extension. I typically use .png drawings, although others may work. If all else fails, you might try resetting Algodoo.