Television static: Any tips

BlitzMax Forums/BlitzMax Beginners Area/Television static: Any tips

Hi,
Wondering if anyone has been experimenting with a television routine or if anyone has any tips ? Thanks in advance.




You could use different images for the 'noise fx' and other images for 'disturbing' image that go up and down...
with scaling & moving them I suppose you could obtain the fx you want.

Offset every second line of the image slightly to get that interlaced look.

Colorcycling?

I use this for a 'broken tv' effect. It looks reasonable.
You might be able to improve it via scaling/blending etc..
' Broken TV

SuperStrict

Const sw%=640,sh%=480

Const cellW%=256
Const cellH%=128
Const pixSize%=2

SetGraphicsDriver GLMax2DDriver()
Graphics sw,sh,32,50

Local tvimage:TImage=CreateImage(cellW,cellH,1,DYNAMICIMAGE)

Repeat
	Local x%,y%
	'
	For y%=0 Until cellH Step pixSize
		For x%=0 Until cellW Step pixSize
			Local c%=Rand(50,240)
			SetColor c,c+5,c+8
			DrawRect x,y,pixSize,pixSize
		Next
	Next
	'
	GrabImage tvimage,0,0
	SetColor $ff,$ff,$ff
	'
	x=cellW ; y=0
	While y<sh
		While x<sw
			DrawImage tvimage,x,y
			x:+cellW
		Wend
		x=0 ; y:+cellH
	Wend
	'
	Flip
Until KeyHit(KEY_ESCAPE)

End


One thing I've done in the past in a commercial game is simply to fill the screen randomly with 255,255,255 and 0,0,0 pixels. At 60Hz or better, you see shades of gray and the effect is convincing in short doses (I used it for a "changing the channels" kind of effect, with a bit of static between channels). Playing a white-noise sound at the same time is what really does it :)

Much appreciated.