Matrix

Miscellaneous Forums/General Discussion/Matrix

If anybody cares, While i was cleaning up my Documents a little, I found this really cool thing I found online a long time ago. I still think it is neat.
Look here
You will have to adjust the scrollbar in your browser to see the main part.

cool :D

IMPRESSIVE!

cool :D

cool :D

I've seen a website full of these once. Several scenes from the matrix & reloaded & some other movies too...
It is kind of cool. :)

http://onyx.chattanoogastate.edu/~jack/matrix/The.Matrix-ASCII-sample.mpg
this has an old mpg version

http://www.asciimation.co.nz/ nice starwars one :)

hey how'd they do that ?!! - pretty cool ! :)

A long while ago someone did a renderer for Blitz3D that did the same. Cant find the thread though. Its quite a straight forward thing to do.

 ;  Team Rebellion Matrix Screen Save.
;
;	Test Code. [ 23 March 2003 ]
;   Start Time [ 9:45          ] 
;	End   Time [ 9:58          ]
;
; Coders.
;  Yavin.
;Possible Screen Saver.

Graphics3D 640,480,16,1
SetBuffer BackBuffer()
Cls

Global colos%
Dim Speeds(63)

Type Char
	Field x%,y%
	Field r,g,b
	Field char$
	Field speed
End Type

Global char.char = New char
Delete char

timer=CreateTimer(60)
set_speed()
create()

While Not KeyHit(1)
	render()
	update()
Wend

Function update()
	For char.char = Each char
		char\y=char\y+char\speed
		char\g=char\g-2
		If char\g=<0 Then char\g=Rnd(155,255)
		char\char=Rnd(65,90)
		If char\y>480 Then char\y=char\y-480
	Next
End Function


Function render()
Cls
	For char.char = Each char
		Color char\r,char\g,char\b
		Text char\x,char\y,Chr$(char\char)
	Next
Flip
End Function


Function set_speed()
For looper=0 To 63
	speeds(looper)=Rnd(5,10)
	colos=255
Next
End Function


Function create()
Local index
index=0
For loop=1 To 25
	colos=colos-3
	For looper=0 To 63
		char.char = New char
			char\x=looper*10
			char\y=loop*20
			char\r=0
			char\g=colos
			char\b=0
			char\char$=Chr$(looper+32)
			char\speed=speeds(looper)
	Next
Next
End Function 


 ; Matrix code by Mike Connor

Global time
Global oldtime
Global newtime
Const fps = 20
Global fps_set = fps


Global maxtrails = 4000

Graphics 800,600,32

Global matrix1=LoadImage("Images/pic.bmp")
Global code=LoadAnimImage("Images/code.bmp",12,12,0,400)

MaskImage code,255,0,255

Dim graphic(100,66,50)

SeedRnd MilliSecs()

SetBuffer BackBuffer()

Global small = LoadFont("mCode",12,False,False,False)
Global med = LoadFont("mCode",12,False,False,False)
Global large = LoadFont("mCode",12,False,False,False)
Global pictureon = 0

; Define types

Type snippet
	Field x,y,size
End Type

Type trail
	Field x,y,bright,size,char,count,hold
End Type

Type xline
	Field pos,length,start,life,count
End Type




Global mode
mode = 1

ReadBitMap()

While Not KeyDown(1)

	If MouseDown(2) Then mode = 2
	If MouseDown(1) Then mode = 1
	; Clear screen
	Cls
	; Redraw everything
	ReDrawSnippets()
	If MouseDown(3) Then SaveBuffer(FrontBuffer(),"screenshot"+Rand(1,1000)+".bmp")
	; Wait time
	HandleFPS()
	; Special effects!
	SpecialEffects()
	; Update everytning
	UpDateSnippets()
	; go again!
Wend

Function ReDrawSnippets()

	For a.snippet = Each snippet
		Color 255,255,255
		If a\size = small Then Color 200,200,200
		Select a\size
			Case 1
				SetFont small
			Case 2
				SetFont med
			Case 3
				SetFont large
		End Select
		DrawImage code,a\x*12,a\y*12,Rand(0,19)
	Next
	For b.trail = Each trail
		Select b\size
			Case 1
				SetFont small
			Case 2
				SetFont med
			Case 3
				SetFont large
		End Select
		Color 0,b\bright,0
		DrawImage code,b\x*12,b\y*12,19+b\char+(b\bright*20)
	Next
	Flip
	
	
End Function

Function UpDateSnippets()

	; Random X-lines
	a = Rand (1,50)
	If a = 1
		ff.xline = New xline
		ff\pos = Rand (1,40)
		ff\length = Rand (10,60)
		ff\start = Rand(1,50)
		ff\life = Rand (5,200)
	End If
	
	a = Rand (1,500)
	If a = 1
		ffl = Rand (0, 35)
		strt = Rand (1,60)
		lfe = Rand (5,200)
		For b = 1 To Rand (2,20)
			ff.xline = New xline
			ff\pos = ffl + b
			ff\length = Rand (5,30)
			ff\start = srt+Rand(-10,10)
			ff\life = lfe
		Next
	End If
	
			
		
		
	For lar.xline = Each xline
		lar\count = lar\count + 1
		If lar\count > lar\life Then Delete lar
	Next



	
	;If pictureon = 1 Then g = 3 Else g = 1
	;For a = 1 To g
		h.snippet = New snippet
		h\x = Rand (0,66)
		h\y = 0
		h\size= Rand(1,3)
	;Next
	
	count = 0
	For n.trail = Each trail
		If n\hold > 0 Then n\hold = n\hold - 1
		count=count+1
		a = Rand(1,100)
		If a = 1 Then n\char=Rand(1,20)
		n\count=n\count+1
		If pictureon = 1 Then ddd = 5 Else ddd = 2
		If n\count > ddd And n\hold  <1
			n\count = 0
			n\bright = n\bright + 1
			If n\bright > 18 Then Delete n
		End If

	Next
	
	
	For z.snippet = Each snippet
		x.trail = New trail
		x\hold = 20
		x\char = Rand(1,20)
		x\x = z\x
		x\y = z\y
		For jj.xline = Each xline
			If x\y = jj\pos And x\x => jj\start And x\x =< jj\start + jj\length
				x\hold = jj\life - jj\count
			End If
		Next
		x\size= z\size
		x\bright = 0
		If pictureon = 1 Then x\bright = graphic(1,z\x,z\y)
		z\y = z\y+1
		
		
		If z\y > 50 Then Delete z
	Next
	If count>maxtrails
		cnt = count-maxtrails
		cnt2=0
		For ll.trail = Each trail
			cnt2=cnt2+1
			If cnt2<cnt
				Delete ll
			End If
		Next
	End If
	
;	For z.snippet = Each snippet
		;z\bright = graphic(1,z\x,z\y)
	;Next
			
	
End Function

Function HandleFPS()
	oldtime=newtime
	newtime=MilliSecs()

	time=1000/(newtime-oldtime)

	If time<fps Then fps_set=fps_set+2
	If time>fps Then fps_set=fps_set-2
	
	a = MilliSecs()
	While b<(a+(1000/fps_set))
		b=MilliSecs()
	Wend

End Function

Function SpecialEffects()

	a = GetKey()
	
	If Chr$(a) = "f" Or Chr$(a)="F"
		For b.trail = Each trail
			b\bright = Rand(1,18)
		Next
	End If
	If Chr$(a) = "p" Or Chr$(a)="P"
		pictureon = 1
	End If
	If Chr$(a) = "o" Or Chr$(a)="O"
		pictureon = 0
	End If	
	
End Function

Function ReadBitmap()

	SetBuffer ImageBuffer(matrix1,0)
	
	For a = 1 To 66
		For b = 1 To 50
			GetColor a,b
			graphic(1,a,b)= ((ColorRed()+ColorGreen()+ColorBlue())/3)*0.07
			
		Next
	Next
		
	SetBuffer BackBuffer()
	
	
End Function 


that's.... not quite what he meant. he's talking about the GFX>ASCII conversion routine.

I have it lying around somewhere, I'm certain!

Oh.

I never looked at it.

I don't get it - how do you actually view the movie?

What do you mean puki

click link it plays itself

pretty cool i must say
some java wot not i noticed

It looks alot better if you stand back from the screen a few feet.

Ah, I see.

I had previously blocked googlepages scripts.

Yeh, not bad.

I found the 2 code snippets I posted to be more exciting.