I am not sure it is a bug, but here is my problem: I wanto to simulate some bunching with bullets. And the problem is that the exported movie is different (and wrong) from the running animation at runtime. Below is the code. If you try it, you can see bullets moving from left to right. But when exporting (100 frames, 10 fps), bullets disappear before reaching the image limit!
Am I wrong somewhere?
Cedric
P.S. Image size is just to fit with a customized Quantum Of Solace background...
coreimage = ximport("coreimage")global frame, bullets, w, h
w, h = 1280, 950
bullets = coreimage.canvas(w, 30)size(w, h)speed(24)background(None)defsetup():
global frame, bullets, w, h
frame = 0defbullet_factory(deltax=0):
fill(0.5)
bullets.append(oval(0, 0, 15, 15, draw=False))
bullets[-1].x = 0
bullets[-1].y = 15return bullets
defdraw():
global frame, bullets, w, h
frame += 1ifrandom() > 0.5andlen(bullets) < 25:
bullet_factory()for bullet in bullets:
if bullet.x > w:
del bullet
else:
bullet.x = bullet.x + 23
bullets.draw(670, 705)print' Current bullet content: %i'%(len(bullets))
Disappearing Bullets...
Posted by Cedric on Nov 10, 2008I am not sure it is a bug, but here is my problem: I wanto to simulate some bunching with bullets. And the problem is that the exported movie is different (and wrong) from the running animation at runtime. Below is the code. If you try it, you can see bullets moving from left to right. But when exporting (100 frames, 10 fps), bullets disappear before reaching the image limit!
Am I wrong somewhere?
Cedric
P.S. Image size is just to fit with a customized Quantum Of Solace background...