i fixed your code so that the matrix look right in dbp
`This code snippet should give an old film look to you game
`It pretty fun and extremely easy to do.
`@@@@ is around the code areas you need
`How to add snippet into your game:
` 1)Set Sync rate to 40 or less
` 2)Set gamma to 325,225,75
` 3)Put Gosub Draw_noise inside main loop
` 4)Copy Draw_noise subroutine into your code
`Easy eh? Great effect! :)
`****Initialize stuff****
Sync On
Hide Mouse
Set camera range 1,5000
Set display mode 800,600,32
`@@@@Set Sync rate to 40 or less@@@@
Sync rate 40
`@@@@@@@@
`@@@@Set gamma to get the old faded old yellow-brown color@@@@
`Try looking at the difference with and without
Set gamma 325,225,75
`@@@@@@@@
Gosub load_stuff
`****Main Loop****
Do
`Screen refresh rate
Text 10,10,str$(Screen fps())
`Movement
If Upkey()=1 Then Move camera 4
If Downkey()=1 Then Move camera -4
If Leftkey()=1 Then Yrotate camera wrapvalue(camera angle y()-2)
If Rightkey()=1 Then Yrotate camera wrapvalue(camera angle y()+2)
Position camera Camera position x(),Get ground height(1,Camera position x(),Camera position z())+20,Camera position z()
`Get some shadows going
Set point light 0,Camera position x(),Camera position y(),Camera position z()
`@@@@Draw the noise@@@@
Gosub Draw_noise
Sync
Loop
`****End of Main****
`****Sub Routines****
`@@@@Adds the lines and noise to create a great 'old' look@@@@
Draw_noise:
Ink 0,0
`scratches
For i=0 to 1
x=rnd(Screen width()+1)
Line x,0,x,Screen height()
Next i
`dust
`change the destination value to add more dust if desired
For i=0 to 10
x=rnd(Screen width()+1)
y=rnd(Screen height()+1)
s=rnd(1)*(Screen width()/800.0)
Box x,y,x+s,y+s
Next i
Return
`@@@@@@@@
`Load everything
Load_stuff:
`Make texture
For x=0 to 100
For y=0 to 100
Ink RGB(rnd(50),rnd(200),rnd(75)),5
Dot x,y
Next y
Next x
Get image 1,0,0,100,100
CLS
`Color sky
Backdrop on
Color backdrop RGB(185,175,255)
`fog
Fog on
Fog color RGB(200,200,200)
Fog distance 2500
`Make ground
Make matrix 1,5000,5000,50,50
Prepare matrix texture 1,1,1,1
Randomize matrix 1,20
update matrix 1
Return
http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.