Translations of this page:

Разные эффекты

Здесь собраны эффекты не использующие внешних файлов

Автор: intre

Снег

Раскрыть код

Солнце (алгоритм вычисления квадратного корня)

Раскрыть код

Автор: Alex Zolotov (NightRadio)

Торнадо

start_timer(0)
l:
transp(16)
clear(BLACK)
t=get_timer(0)
t_reset
t_rotate_z( t/28 )
c = rand&255
transp(256)
dot(,,get_color(c+128,c+64,c))
transp(128)
pixi(0,0,1,2) pixi(0,-1,0) pixi(0,0,-1)
frame(50)
go l

While

start_timer( 0 )
 
start:
 
t = get_timer( 0 ) / 16
 
effector( 0, 32, 1, -800, -800, 1600, 1600, 1 )
effector( 0, 32, 2, -800, -800, 1600, 1600, 1 )
 
y = -64 while( y < 64 ) 
{
	x = -64 while( x < 64 ) 
	{
		dot( x, y, get_color( csin( x + ccos( x+y+t ) + t*2 ) + 80, ccos( y+x + t*3 ) + 90, csin( x + 80 + t ) + 40 ) )
		x + 1
	}
y + 1
}
 
frame
go start

Blobs

clear( BLACK )
MAKE_BLOB
 
start:
x = ( rand%320 ) - 160
y = ( rand%240 ) - 120
pixi( BLOB_IMG, x, y, rand&3, 0 )
frame( 50 )
go start
 
MAKE_BLOB:
BLOB_SIZE = 64
if BLOB_IMG = 0 
{ 
	BLOB_IMG = new_pixi( BLOB_SIZE, BLOB_SIZE, 1 ) 
	pixi_alpha( BLOB_IMG, BLOB_IMG )
	p = 0
	y = 0 while( y < BLOB_SIZE ) {
		x = 0 while( x < BLOB_SIZE ) {
			c1 = cos( ( (x-BLOB_SIZE/2)*2 * 256 ) / BLOB_SIZE ) / 2 + 128
			c2 = cos( ( (y-BLOB_SIZE/2)*2 * 256 ) / BLOB_SIZE ) / 2 + 128
			c = ( c1 * c2 ) / 256
			BLOB_IMG[ p ] = get_color( c, c, c )
			p + 1
			x + 1
		}
		y + 1
	}
}
ret

Blobs_with_zoom

xsize = 320
ysize = 240
 
MAKE_BLOB
 
scr_cnt = 0
scr2 = new_pixi( xsize, ysize, 1 )
 
start:
if scr_cnt = 0 { 
	set_screen( scr2 )
	pixi( 0, 0, 0, 1, 32 )
} else {
	set_screen( 0 )
	pixi( scr2, 0, 0, 1, 32 )
}
scr_cnt + 1
scr_cnt & 1
x = ( rand%xsize ) - xsize/2
y = ( rand%ysize ) - ysize/2
pixi( BLOB_IMG, x, y, rand&3, 0 )
effector( WHITE, 16, 0, -500, -500, 1000, 1000, 0 )
frame( 50 )
go start
 
MAKE_BLOB:
BLOB_SIZE = 64
if BLOB_IMG = 0 
{ 
	BLOB_IMG = new_pixi( BLOB_SIZE, BLOB_SIZE, 1 ) 
	pixi_alpha( BLOB_IMG, BLOB_IMG )
	p = 0
	y = 0 while( y < BLOB_SIZE ) {
		x = 0 while( x < BLOB_SIZE ) {
			c1 = cos( ( (x-BLOB_SIZE/2)*2 * 256 ) / BLOB_SIZE ) / 2 + 128
			c2 = cos( ( (y-BLOB_SIZE/2)*2 * 256 ) / BLOB_SIZE ) / 2 + 128
			c = ( c1 * c2 ) / 256
			BLOB_IMG[ p ] = get_color( c, c, c )
			p + 1
			x + 1
		}
		y + 1
	}
}
ret

Автор: ZUF

Stars

Раскрыть код

Автор: vtl

#1

Раскрыть код

#2

Раскрыть код

Тема на форуме

Автор: Gekon

xx=get_window_xsize
yy=get_window_ysize
 
x=xx/2
start_x:
y=yy/2
start_y:
color=get_color(sin(2*x),cos(3*y),x*y)
dot(x,y,color)
y=y-1
if y>-yy/2 {go start_y}
x=x-1
if x>-xx/2 {go start_x}
frame(0)
examples/mini_effects.txt · Последние изменения: 2009/01/02 03:26 — 89.169.160.32
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki