
-----------------------------------
vertozia
Fri Jan 19, 2007 2:30 pm

program/immage effects in turing...(scratch effect mainly)
-----------------------------------
Having a look at this picture...
http://www.ransen.com/repligator/Images/oldblu.JPG


and this one.....
http://www.visual-effect.de/assets/images/tut.gif


I wanted to create this effect in turing using a .gif picture format, but since the format is not supported in turing i cannot, so i will have to create it usingturing, i was thinking of using Draw.Line in turing, but it will take too many lines and too much time. If i can do this otherwise please tell me. Thanks in advance.

-----------------------------------
Clayton
Fri Jan 19, 2007 4:09 pm

Re: program/immage effects in turing...(scratch effect mainly)
-----------------------------------
of course it's possible to do, you just have to put some thought into it. You could use a series of .jpg's and create a class that could do this, drawing thick lines or random length and a variable thickness vertically. just think about it some more.

-----------------------------------
vertozia
Fri Jan 19, 2007 5:39 pm

RE:program/immage effects in turing...(scratch effect mainly)
-----------------------------------
i thought of this, using bitmaps, about 3 of them, ,then use array to rotate through them, and use array to shift them so it has a vibrating effect. but there is an issue to this, the bitmaps will go over my other pictures and words.

-----------------------------------
Clayton
Fri Jan 19, 2007 5:45 pm

Re: program/immage effects in turing...(scratch effect mainly)
-----------------------------------
could we see some code? my guess is that you draw the pictures after you output your text and such.

-----------------------------------
Tony
Fri Jan 19, 2007 7:03 pm

RE:program/immage effects in turing...(scratch effect mainly)
-----------------------------------
It shouldn't take many lines of code, probably just a few.

Those "effects" are simply noise. Turing comes with a pre-build noise function

Rand.Int(min,max)

You just have to adjust your min and max values to determine how far appart and how long the lines will be. Then iterate over it in a loop.

-----------------------------------
vertozia
Fri Jan 19, 2007 11:04 pm

RE:program/immage effects in turing...(scratch effect mainly)
-----------------------------------
i didn't really get the last post, but sure let me just finish (trying) and ill upload it as a zip or rar archive.

-----------------------------------
[Gandalf]
Sat Jan 20, 2007 2:14 pm

RE:program/immage effects in turing...(scratch effect mainly)
-----------------------------------
Tony was talking about drawing something like this over your image:
setscreen("graphics:400;400")
for i : 1 .. 100
    var x : int := Rand.Int (5, maxx - 5)
    var y : int := Rand.Int (5, maxy - 5)
    Draw.Line (x, y, x + Rand.Int (-30, 30), y + Rand.Int (-30, 30), black)
end for

-----------------------------------
vertozia
Sat Jan 20, 2007 4:37 pm

Re: program/immage effects in turing...(scratch effect mainly)
-----------------------------------
Thanks for explaining, you guys have been really helpful to me. I played a little with the code you gave me and ended up with this

the following code:


loop
for i : 1 .. 500
    var x : int := Rand.Int (5, maxx - 5)
    var y : int := Rand.Int (5, maxy - 5)
    var z : int := Rand.Int (10,maxy - 17)
    Draw.Line (x, z, x + Rand.Int (-8, 111), y + Rand.Int (-90, 111), white) 
    Draw.Line (x, y, 444 + Rand.Int (-50, 777), 255 + Rand.Int (-20, 555), white)

    delay (90)
    cls
end for
end loop

I need to merge it with the math.t file, but everywhere i put it, it always overwrites the other images and files, i need to make it only run during the introduction screen, and the menu. Can you please help me?

-----------------------------------
Bored
Mon Jan 22, 2007 4:47 pm

Re: program/immage effects in turing...(scratch effect mainly)
-----------------------------------
very simply create a procedure to draw the random lines (i.e.)
proc DrawLines
    for i : 1 .. 50
        var x : int := Rand.Int (5, maxx - 5) 
        var y : int := Rand.Int (5, maxy - 5) 
        var z : int := Rand.Int (10,maxy - 17) 
        Draw.Line (x, z, x + Rand.Int (-8, 111), y + Rand.Int (-90, 111), white) 
        Draw.Line (x, y, 444 + Rand.Int (-50, 777), 255 + Rand.Int (-20, 555), white) 
    end for
end DrawLines
You then call this procedure everytime you need "random" lines drawn.
