Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Cool Trippy Effect
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kit-kat-kid




PostPosted: Fri May 07, 2004 12:40 pm   Post subject: (No subject)

hey for when you set your grpahics its not setscreen
("graphics:400,400")
its
setscreen ("graphics:400;400")
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Fri May 07, 2004 2:38 pm   Post subject: (No subject)

kit-kat-kid wrote:
hey for when you set your grpahics its not setscreen
("graphics:400,400")
its
setscreen ("graphics:400;400")


It is true that the way the turing doc says is to uses a ; but it dose work with a , (at least in 4.0.5).
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
s_climax




PostPosted: Fri May 07, 2004 5:59 pm   Post subject: (No subject)

Here's another cool thing. What's unique about this one is that I actually understand why it works.

code:

setscreen ("graphics:500,500;offscreenonly")
colorback (black)
cls
var worms, randomness : int
worms := 8
randomness := 10
var x, y, dir : array 1 .. worms of real
var ang : array 1 .. worms of int
var ix, iy, count : int
var speed : real
speed := 1
count := 0
for i : 1 .. worms
    % randint (ix, 0, maxx)
    % randint (iy, 0, maxy)
    % x (i) := intreal (ix)
    % y (i) := intreal (iy)
    dir (i) := 180
    x (i) := maxx div 2
    y (i) := maxy div 2
    randint (ang (i), 0, 360)
end for
loop
    %cls
    for i : 1 .. worms
        dir (i) += intreal (ang (i))
        randint (ang (i), -1 * randomness, randomness)
        x (i) += cosd (dir (i)) * speed
        y (i) += sind (dir (i)) * speed
        delay (0)
        if x (i) > 0 and x (i) < maxx and y (i) > 0 and x (i) < maxy then
            count := 0
        else
            count := count + 1
        end if
        drawfilloval (round (x (i)), round (y (i)), 1, 1, i)
    end for
    exit when hasch or count >= 2
    View.Update
end loop

the_short1




PostPosted: Fri May 07, 2004 11:11 pm   Post subject: (No subject)

my bad.... i wrote , isntead of ;

hhahah... well u got the point of making the screen bigger...


i dont use setscreen...
i use
View.Set... acually i dont use that much these days either..

the best way in my opinion


var wind : int := Window.Open ("graphics788;540,title: Kevin's Cool Program,nobuttonbar,position:center;center,offscreenonly")


taht way i can close the window at the end.. neat eh...??
Window.Close (wind)





wow... that program is simple but complex at the same time...
i like it LOTS!!!! keep the good stuff rolling...
greenapplesodaex




PostPosted: Sun May 09, 2004 7:47 am   Post subject: reply

wohohohoho, trippy, man! @_@
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 20 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: