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

Username:   Password: 
 RegisterRegister   
 doing house project need help asap
Index -> Programming, Turing -> Turing Help
Goto page 1, 2, 3, 4, 5  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dani190




PostPosted: Tue Dec 13, 2005 9:43 pm   Post subject: doing house project need help asap

hey guys i need to know how to do the following:
make an oval(sun/moon) move across the screen
make smoke that comes out of a chimny
Sponsor
Sponsor
Sponsor
sponsor
Geminias




PostPosted: Tue Dec 13, 2005 9:55 pm   Post subject: (No subject)

To move oval across the screen:

code:

setscreen ("graphics:max,max,offscreenonly")

for i : 1 .. maxx
  drawfilloval (i, 100 , 50 , 50, 13)
  View.Update
  delay (15)
  cls
end for

[/code]
dani190




PostPosted: Tue Dec 13, 2005 9:56 pm   Post subject: (No subject)

omg thx now i just need smoke
Geminias




PostPosted: Tue Dec 13, 2005 9:59 pm   Post subject: (No subject)

smoke is pretty easy too, but you have to know how to import pictures. What you do is you get two pictures of billowing smoke, or just use the spray can in paint.

then you take the pictures making sure they each have different particle patterns and you import them into your program. And make them show up, one after the other in a continous loop, so it will appear to be billowing smoke lol.

if you can't import pictures either view the tutorial section, or ask me i'll give you a list of the functions you'll need, but i wont code it all for you.
dani190




PostPosted: Tue Dec 13, 2005 10:01 pm   Post subject: (No subject)

var row, column : int
var x : int
x := 1
loop
setscreen ("graphics:max,max")
colorback (black)
setscreen ("graphics:max,max,offscreenonly")

for i : 1 .. maxx
drawfilloval (i, 300, 40, 40, white)

delay (10)
cls



%---------------------------------------------------Stars begin


delay (200)
randint (row, 1, 20)
randint (column, 1, 158)
locate (row, column)
color (white)
put "*"
%----------------------------------------------------Stars end


% x1 y1 x2 y2 color
Draw.FillBox (150, 50, 400, 250, brightred) %Main house box
Draw.FillBox (501, 50, 620, 150, brightgreen) %Garage
Draw.FillBox (520, 50, 601, 140, brightblue) %Garage Door
Draw.FillBox (350, 140, 300, 170, yellow) %Main house window Right side
Draw.FillBox (200, 140, 250, 170, yellow) %Main house window Left side


end for


end loop

THAT IS WHAT i have now but i cant get the moon to go over the house can u guys look and see if u can get the moon to go over like a real moon
Geminias




PostPosted: Tue Dec 13, 2005 10:24 pm   Post subject: (No subject)

wow man.. you always declare your setscreen function first, and you only need one. If you use the "offscreenonly" option it will make all the adjustments off screen and you can only see the new version if you use the View.Update command. So if you run that code, you will see nothing.

The advantage of "offscreenonly" is it makes objects move smoothly across the screen rather than having them flicker like pure "cls"ing would do.

Read the tutorials and get a better feel for the turing language before you start asking all kinds of questions. And also, ask questions in the "Turing help" section, not here.
dani190




PostPosted: Tue Dec 13, 2005 10:27 pm   Post subject: (No subject)

ok then how can i make my moon arc across the screen then?
dani190




PostPosted: Tue Dec 13, 2005 10:34 pm   Post subject: (No subject)

also View.Update will not work i get an error called update is not in the export list of view
Sponsor
Sponsor
Sponsor
sponsor
zylum




PostPosted: Tue Dec 13, 2005 10:58 pm   Post subject: (No subject)

wtf? why is this in tutorials? should be in turing help... too bad i cant move threads Crying or Very sad
dani190




PostPosted: Wed Dec 14, 2005 7:58 am   Post subject: (No subject)

cant you just help i cant move it either but i really need help man Sad plz help guys
dani190




PostPosted: Wed Dec 14, 2005 1:17 pm   Post subject: (No subject)

help plz
codemage




PostPosted: Wed Dec 14, 2005 2:07 pm   Post subject: (No subject)

make sure you have View.Update capitalized as shown here.

Arcing is probably beyond your ability.

Work on getting the chimney to go. You can probably make a few grey circles clumped together to simulate smoke. Then use the same technique you used to move the moon across.

Here is your code with some of your errors removed, and View.Update in the right spot. Try to fix it from here.

code:

setscreen ("graphics:max,max,offscreenonly")

var row, column : int
var x : int := 1

colorback (black)

loop
    for i : 1 .. maxx

        cls
        drawfilloval (i, 300, 40, 40, white)

        %---------------------------------------------------Stars begin

        delay (200)
        randint (row, 1, 20)
        randint (column, 1, maxcol)
        locate (row, column)
        color (white)
        put "*"
        %----------------------------------------------------Stars end

        % x1 y1 x2 y2 color
        Draw.FillBox (150, 50, 400, 250, brightred) %Main house box
        Draw.FillBox (501, 50, 620, 150, brightgreen) %Garage
        Draw.FillBox (520, 50, 601, 140, brightblue) %Garage Door
        Draw.FillBox (350, 140, 300, 170, yellow) %Main house window Right side
        Draw.FillBox (200, 140, 250, 170, yellow) %Main house window Left side
        View.Update
        delay (5)

    end for


end loop
dani190




PostPosted: Wed Dec 14, 2005 2:14 pm   Post subject: (No subject)

ok man thx, but now my stars are going crazy and my moon is going way way to slow, iv been trying to fidle with it but it wont work, il continue trying but could u help me with the speed of the stars and the moon!
dani190




PostPosted: Wed Dec 14, 2005 4:35 pm   Post subject: (No subject)

nvm i got it guys thx for all the help but now i need help with the smoke who can help me (not provide coding)
alvini




PostPosted: Wed Dec 14, 2005 7:43 pm   Post subject: need help for a project asap!!

hey guys i just need how to make smoke and meke the stars .
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 5  [ 64 Posts ]
Goto page 1, 2, 3, 4, 5  Next
Jump to:   


Style:  
Search: