# Untitled

By: a guest on Jun 10th, 2012  |  syntax: None  |  size: 1.68 KB  |  hits: 24  |  expires: Never
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
1. SCREEN 640, 480
2. Const TUMMU_SIZE = 32
3. tummu = MakeImage(TUMMU_SIZE, TUMMU_SIZE)
4. DrawToImage tummu
5. Color 0, 0, 0
6. Box 0,0,ImageWidth(tummu), ImageHeight(tummu), 1
7. DrawToScreen
8. MaskImage tummu, 255, 0, 255
9.
10. ping = MakeImage(320,240)
11. pong = MakeImage(320,240)
12. Dim pos(1439,4)
13.
14. For i = 0 To 39
15.     For j = 0 To 35
16.         pos(j+i*36,0) = 151+Cos(j*10   )*(12*(i+.6))
17.         pos(j+i*36,1) = 111+Sin(j*10   )*(12*(i+.6))
18.         pos(j+i*36,2) = 151+Cos(j*10+.7)*(12*(i+.68))
19.         pos(j+i*36,3) = 111+Sin(j*10+.7)*(12*(i+.68))
20.         pos(j+i*36,4) = Min(20,12+i*4)
21.     Next j
22. Next i
23. PositionCamera 320, -240
24. Repeat
25.     k = k + 1
26.     If k Mod 2 Then
27.         For i = 0 To 1439
28.             CopyBox pos(i,0)+Rand(-1,1),pos(i,1)+Rand(-1,1),pos(i,4),pos(i,4),pos(i,2),pos(i,3),Image(ping),Image(pong)
29.         Next i
30.         tmp = ping
31.         ping = pong
32.         pong = tmp
33.     EndIf
34.     If k Mod 20 = 0 Then col = Rand(16777215)
35.     Color 0, 0, -col
36.     DrawToImage ping
37.     Circle 155,115, 10
38.         // keskelle vähän mustia pikseleitä
39.         Color 0,0,0
40.         Box 155 + Cos(k*2) * 10,115 + Sin(k*2) * 10, 4, 4, 1
41.
42.         steps = 4
43.         angleoffset# = Rnd(360)
44.         For o=1 To steps
45.                 ang# = angleoffset + (360.0/steps) * o
46.                 dist# = Rnd(40, 220)
47.                 alpha = (dist/220.0) * 55
48.                 DrawGhostImage tummu, 155 + Cos(ang) * dist - TUMMU_SIZE/2, 115 + Sin(ang) * dist - TUMMU_SIZE/2, 0, alpha
49.                 //Color 255, 5, 255
50.                 //Box 155 + Cos(ang) * dist, 155 + Sin(ang) * dist, 4, 4, 2
51.         Next o
52.
53.
54.     DrawToScreen
55.     DrawImage pong, 0, 0
56.     For i = 240 To 0 Step -1
57.         CopyBox 0, i, 320, 2, 0, i*2
58.     Next i
59.     For i = 320 To 0 Step -1
60.         CopyBox i,0,2,480,i*2,0
61.     Next i
62.
63.     DrawScreen
64. Forever