Snake Effect ?

Write here what nice effects or shows you have done with MADRIX or ask other users.

Moderator: MADRIX Team

Locked
C64
Posts: 1
Joined: Tue Jun 11, 2013 12:41 pm

Snake Effect ?

Post by C64 »

Hallo,

ich würde gern Wissen ob es eine Möglichkeit gibt einen "Snake Effect" darzustellen. Sowie damals auf den alten Nokia Handies blos das ganze noch
in 3D.

Wir verwenden dazu im Moment die Madrix 3.0 RC welche sehr Stabil läuft seit 4 Wochen. Mit einer LED Decke 16x16x24 Pixel over Art-Net.

For us English User:

I would like to know is there any way to Create a "Snake Game Effect" like from old Nokia Phones.

We are at the Moment the Madrix 3.0 RC which pretty Stable since 4 Weeks.
Us LED Roof is 16x16x24 Pixel over Art-Net.


Offtopic:

Könnt ihr mir etwas genauer erklären die "Fade OUT / IN" bei Diversen S2L Effekten ?

MfG

Andreas

P.S. Falls Interesse besteht kann ich Euch meine LOG-Files zusenden, für Diverses Fehler Debuging.
User avatar
Wissmann
Developer
Developer
Posts: 768
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Snake Effect ?

Post by Wissmann »

To create a snake effect the MAS Script would be the right choise.
Just a small sample you could start to work on it.

Code: Select all

@scriptname="Snake 3D";
@author="S.Wissmann - inoage GmbH";
@version="";
@description="";

int x,y,z,ax,ay,az;
color subcol = {0,0,0,0,5};

void InitEffect()
{
	ax = GetMatrixWidth();
	ay = GetMatrixHeight();
	az = GetMatrixDepth();
}

void RenderEffect()
{
	ChangeBrightness(subcol);
	x = x + random(-1,1);
	y = y + random(-1,1);
	z = z + random(-1,1);	
	x = max(0,min(ax-1,x));
	y = max(0,min(ay-1,y));
	z = max(0,min(az-1,z));
	SetPixel3D(WHITE,x,y,z);
}

void MatrixSizeChanged()
{
	InitEffect();
}
LEDs are nothing without control ;-)
Locked