sprite

Javascript Sprite Animation

jersmi's picture

Posted is a working little animation using sprites, iterator and javascript. I want the animation to add the sprites (random size and color) without overlapping, and scroll as the screen fills.

  1. Regarding, for ex., sprites filling screen but not overlapping, in javascript (or otherwise, i guess), how can a relationship be set up between queue indices, so current index uses values from previous index (or indices) to determine x position, y position, width and height?

  2. Would it be better (faster) to have the random values sampled in js?

  3. How can I generate the scrolling, say after the screen fills? Best way? Sometimes I see the "dummy" patch time patch input in js -- what is this for? Am I off the mark for thinking of this re: scrolling in js?

Any help is appreciated.

Depth Sort

sorenknud's picture

Hi there - to keep the text short:

Should i just forget all about getting this to work: The attached file.

(the problem is that there is always one sprite thats NOT transparent.)

from my reading at: http://www.opengl.org/wiki/Transparency_Sorting - it seems that it is impossible to make the example i attached work.

Is this really true???

best,

soren

sprite transparency

moorooduc's picture

hello everyone, I have asked this question some time ago in the vidvox forum. I might go into some details at explaining my problem again. I have an image of some birds sitting on a power line. I cut out the birds and saved them as a png file with a transparent background. I want to overlay them to original image. the final composition for vdmx should be able to zoom in to the "cut out-picture. thus, the birds will change size, while the rest of the picture remains just a still. the problem is quite simple: I want to overlay a png or psd file wit a transparent background. I have tried to change the blending of the sprite to OVER. and it doesn't work. Someone has sent me his qtz-file, which worked fine on his laptop, but not on mine. I don't understand why this happens. The only difference was the version of QC. On his system, her was running some older version. I am running QC 4 with snow leopard. Are there known issues with QC4 and snow leopard? Is there some way to go back to QC 3 (but keep snow leopard)? has anyone suggestions for how to solve this problem? best, moorooduc