Algodoo
Download
What is it?
Learn it
Algobox
Forum
Browse
Search
Popular
Register
Upload
Rules
User list
Login:
Search:
pixartist
2010/01/21 00:56:11
made me smile, 10/10
pixartist
2010/01/21 00:58:04
wish the course was longer
pixartist
2010/01/21 12:23:24
176 downloads and only 4 ratings ?
pixartist
2010/01/22 16:18:09
weird, really weird, I spent hours getting this to work 100% of the time, is your framerate low ?
pixartist
2010/01/22 16:42:52
yes it only works at realtime because the movement is controlled by the framerate, not by the simulation time...
pixartist
2010/01/22 19:24:53
if anyone cares, here's the main code in a readable format:
Programming:
Scene.my.robotMoves_0 = [30, 0, 1.6, 100, 0.79, 110, 0.76, 180, 0.76, 220, 1.06, 240, 0.96, 315, 0.96, 320, 1.0, 420, 0.6, 450, 0.59, 500, 0.58, 550, 0.75, 600, 0.8, 750, 0.7, 850, 0.7, 880, 0.79, 950, 0.78, 960, 0.76, 1100, 0.8, 1180, 0.8, 1200, 0.8, 1250, 0.864, 1380, 0.87, 1400, 1, 1500, 1.7, 1600, 1.6, 1700, 1.4, 1750, 1.3, 1800, 1.3, 1900, 1.5]
Scene.my.robotMoves_1 = [30, 0, 1.4, 100, 0.72, 110, 0.77, 180, 0.78, 220, 0.6, 250, 0.83, 320, 0.86, 350, 0.8, 430, 0.78, 500, 0.73, 550, 0.77, 600, 0.8, 630, 0.47, 700, 0.47, 750, 0.73, 850, 0.73, 900, 0.825, 920, 0.825, 960, 0.75, 1100, 0.7, 1200, 0.6, 1250, 0.87, 1380, 0.86, 1420, 0.6, 1500, 1.2, 1650, 1.7, 1750, 1.7, 1780, 1.7, 1840, 1.65, 1930, 1.7]
Scene.my.robotMoves_2 = [17, 0, 1, 250, 0.95, 270, 1.25, 320, 1.25, 350, 0.5, 600, 0.49, 750, 1.5, 880, 1.497, 950, 1.44, 1000, 1.4, 1100, 1.5, 1250, 1.405, 1300, 1.4, 1350, 1.5, 1500, 1.5, 1700, 1.6, 1720, 1.49]
Main code:
(e)=>{
Scene.my.timer = math.toInt((Sim.time-Scene.my.timersub) * 45);
Scene.my.frame(180) == 1 ? {Scene.my.grabber = 0.4} : {};
Scene.my.frame(300) == 1 ? {Scene.my.grabber = 0.15} : {};
Scene.my.frame(490) == 1 ? {Scene.my.grabber = 0.5} : {};
Scene.my.frame(920) == 1 ? {Scene.my.grabber = 0.15} : {};
Scene.my.frame(950) == 1 ? {Scene.my.lidcloser = 1.5} : {};
Scene.my.frame(1380) == 1 ? {Scene.my.grabber = 0.5} : {};
Scene.my.frame(1700) == 1 ? {
Scene.my.grabber = 0.15;
Scene.my.boxpusher = 1.5;
Scene.my.lidpusher = 1.5;
Scene.my.ballsupply = 0.2
} : {};
Scene.my.frame(2000) == 1 ? {
Scene.my.timer = 0;
Scene.my.step_0 = 0;
Scene.my.step_1 = 0;
Scene.my.step_2 = 0;
Scene.my.timersub = Sim.time;
} : {};
Scene.my.prevtimer = scene.my.timer;
Scene.my.step_0 < (Scene.my.robotMoves_0(0) - 1) ? {
scene.my.current_0 = scene.my.robotMoves_0((scene.my.step_0 * 2) + 2);
scene.my.next_0 = scene.my.robotMoves_0((scene.my.step_0 + 1) * 2 + 2);
scene.my.current_0_t = scene.my.robotMoves_0((scene.my.step_0 * 2) + 1);
scene.my.next_0_t = scene.my.robotMoves_0((scene.my.step_0 + 1) * 2 + 1);
Scene.my.phase_0 = (math.toFloat(Scene.my.timer - scene.my.current_0_t) / math.toFloat(scene.my.next_0_t - scene.my.current_0_t));
Scene.my.angle_0_target = (((1 - Scene.my.phase_0) * scene.my.current_0) + (Scene.my.phase_0 * scene.my.next_0)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_0(((scene.my.step_0 + 1) * 2) + 1) ? {
Scene.my.step_0 = Scene.my.step_0 + 1
} : {}
} : {
scene.my.robotMoves_0(2)
};
Scene.my.step_1 < (Scene.my.robotMoves_1(0) - 1) ? {
scene.my.current_1 = scene.my.robotMoves_1((scene.my.step_1 * 2) + 2);
scene.my.next_1 = scene.my.robotMoves_1((scene.my.step_1 + 1) * 2 + 2);
scene.my.current_1_t = scene.my.robotMoves_1((scene.my.step_1 * 2) + 1);
scene.my.next_1_t = scene.my.robotMoves_1((scene.my.step_1 + 1) * 2 + 1);
Scene.my.phase_1 = (math.toFloat(Scene.my.timer - scene.my.current_1_t) / math.toFloat(scene.my.next_1_t - scene.my.current_1_t));
Scene.my.angle_1_target = (((1 - Scene.my.phase_1) * scene.my.current_1) + (Scene.my.phase_1 * scene.my.next_1)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_1(((scene.my.step_1 + 1) * 2) + 1) ? {
Scene.my.step_1 = Scene.my.step_1 + 1} : {}
} : {
scene.my.robotMoves_1(2)
};
Scene.my.step_2 < (Scene.my.robotMoves_2(0) - 1) ? {
scene.my.current_2 = scene.my.robotMoves_2((scene.my.step_2 * 2) + 2);
scene.my.next_2 = scene.my.robotMoves_2((scene.my.step_2 + 1) * 2 + 2);
scene.my.current_2_t = scene.my.robotMoves_2((scene.my.step_2 * 2) + 1);
scene.my.next_2_t = scene.my.robotMoves_2((scene.my.step_2 + 1) * 2 + 1);
Scene.my.phase_2 = (math.toFloat(Scene.my.timer - scene.my.current_2_t) / math.toFloat(scene.my.next_2_t - scene.my.current_2_t));
Scene.my.angle_2_target = (((1 - Scene.my.phase_2) * scene.my.current_2) + (Scene.my.phase_2 * scene.my.next_2)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_2(((scene.my.step_2 + 1) * 2) + 1) ? {
Scene.my.step_2 = Scene.my.step_2 + 1} : {}
} : {
scene.my.robotMoves_2(2)
}
}
Last edited at 2010/01/22 19:25:34 by pixartist
pixartist
2010/01/22 20:05:29
LShome .. what? Oo
what happens after the 1. box ?
Last edited at 2010/01/22 20:15:28 by pixartist
pixartist
2010/01/22 21:00:35
try the new version, it works with any framerate
pixartist
2010/01/23 01:01:17
it works 100% perfect 100% of the time for, wtf is going on ? are you sure you didn't modify the phun settings ? (e.g. frequency)
pixartist
2010/01/23 11:23:23
i guess they're finnish
pixartist
2010/01/31 22:20:51
?!
works perfectly for me, just downloaded it from here and the dl version works
Last edited at 2010/01/31 22:21:31 by pixartist
pixartist
2010/01/31 22:23:00
y sorry, had frequency 200 -.- fixed it
previous
|
1
2
3
| next