PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

old demo effects

Hi

Im using easy ce and have sprites on screen but i would like to know how to do "sinus" effects like in the old C64 demos where the sprites would all move together in a cool pattern can you help me please

Thank you
Guy, that's too easy. If you can't figure it out immediately, excuse-me, but your mind needs a lot more exposition to programming logic.

Hope you don't take this as non-constructive criticism, this is not.

Below a (sample, non-tested) snippet. Happy hollidays.

Code:

...
float ang = 0;

while (1)
{
for (int s=0; s<numSprites; s++)
{
sprite[s].x -= SPEED;
sprite[s].y = sin(DEG2RAD(ang+(s<<1)));
}
ang += 5;
}
...
Hi Vander
Thankyou for bothering to reply
and yes your right im a newbie much too newbie for this type of code but im dying to see the sinus effect after watching all those cool C64 demos

After all the "hello world" program soon becomes dull :P
search some old sites with tons of tuts on old effects... programmersheaven might be a good place to start, they have tons of old docs...

www.programmersheaven.com