Tuesday, January 26, 2010

Plasma effect


I'm going to describe my version of the popular plasma demoscene effect. There may be another way of doing it, but my version works.

The basic effect uses an index into a pallete, which is defined using a sine based equation. The index depends on two variables (x and y). These are the coordinates of the screen point being evaluated. Example:

idx = sin((PI * x) / 45.0f) + sin((PI * y) / 90.0f);

45 and 90 are just values I've chosen randomly. Change them to alter the plasma. To plot this in screen, do this: for each point in the screen, apply the code. Use idx as an index into a greyscale pallete. There is a problem : it's static. The effect doesn't move. But don't worry, because it's very easy to animate! Change the first formula to:

idx = sin((PI * x) / 45.0f) + sin((PI * y) / 90.0f) + sin((PI * i) / 180.0f);

There's a new element in the formula (sin((PI * i) / 180.0f)). There's a new variable in it (i). If you increment that variable, the effect will animate. You could increment it after a screen draw.

Tuesday, January 19, 2010

M4GTracker


Smiker and I are working in a tracker for GBA, known as M4GTracker. It's popular in the chiptune community, because it's one of the first trackers for GBA. We are currently redoing the UI system, using artwork from iLKke. You can find the link here: http://8bitcollective.com/forums/viewtopic.php?id=13641&p=1.