
-----------------------------------
alvini
Wed Dec 14, 2005 7:53 pm

Doing a project..need help asap
-----------------------------------
hey guys i just nedd to know how to do the following:
1.make smoke
2.make stars on the screen

thx

-----------------------------------
Saad85
Wed Dec 14, 2005 7:58 pm

Re: Doing a project..need help asap
-----------------------------------
hey guys i just nedd to know how to do the following:
1.make smoke
2.make stars on the screen

thx

there are quite a few ways to make smoke. probably the best way on turing is to just make an image and move it slowly up, or make a bunch of particles move in random directions(but still going up)

for stars, Draw.Star, or drawfillstar

-----------------------------------
md
Wed Dec 14, 2005 7:58 pm


-----------------------------------
1. paint the screen grey
2. randomly draw white pixels.

-----------------------------------
alvini
Wed Dec 14, 2005 8:33 pm

Re: Doing a project..need help asap
-----------------------------------
hey guys i just nedd to know how to do the following:
1.make smoke
2.make stars on the screen

thx

there are quite a few ways to make smoke. probably the best way on turing is to just make an image and move it slowly up, or make a bunch of particles move in random directions(but still going up)

for stars, Draw.Star, or drawfillstar

can you start me off with "how to make smoke?"
thx

-----------------------------------
Paul
Wed Dec 14, 2005 8:44 pm


-----------------------------------
Without code or ideas, we can't really help you beyond giving you ideas. And don't ask cornflake to write code for you :P it won't end well... for you.

-----------------------------------
alvini
Wed Dec 14, 2005 8:49 pm

help?
-----------------------------------
var x, y, a, b, countx, county, c, c2 : int
var xstar, ystar : int
setscreen ("graphics:max;max")
colourback (blue)


c := blue
c2:=5

countx := 10
county := 7
a := 465
b := 120
x := 1000
y := 300
var x1 : array 1 .. 4 of int := init (300, 450, 377, 250)
var y1 : array 1 .. 4 of int := init (250, 250, 350, 350)

cls

loop
    View.Set ("offscreenonly")



    drawfillbox (300, 100, 450, 250, 65)    %The box of the house
    drawfillbox (315, 190, 345, 220, white)     %The left window
    drawfillbox (400, 190, 430, 220, white)     %The Right Window
    Draw.FillPolygon (x1, y1, 3, red)     %The roof of the house
    drawfillbox (362, 280, 387, 305, white)     % The window on the roof
    drawfillbox (355, 100, 390, 150, 114)     %The door
    %Border of Left window
    Draw.ThickLine (315, 190, 315, 220, 5, 114)     %The right side
    Draw.ThickLine (315, 190, 345, 190, 5, 114)     %The low side
    Draw.ThickLine (315, 220, 345, 220, 5, 114)     %The high side
    Draw.ThickLine (345, 220, 345, 190, 5, 114)     %The left side
    Draw.ThickLine (330, 220, 330, 190, 5, 114)     %The middle
    Draw.ThickLine (315, 205, 345, 205, 5, 114)     %The middle
    %The Chimney
    drawfillbox (435, 250, 410, 330, red)
    %Trees
    Draw.FillMapleLeaf (170, 100, 135, 240, green)
    %Border of Right Window
    Draw.ThickLine (400, 190, 400, 220, 5, 114)     %The right side
    Draw.ThickLine (400, 190, 430, 190, 5, 114)     %The low side
    Draw.ThickLine (400, 220, 430, 220, 5, 114)     %The high side
    Draw.ThickLine (430, 220, 430, 190, 5, 114)     %The left side
    Draw.ThickLine (415, 220, 415, 190, 5, 114)     %The middle
    Draw.ThickLine (400, 205, 430, 205, 5, 114)     %The middle
    %The Roof Window
    Draw.ThickLine (362, 280, 387, 280, 5, 114)     %The low side
    Draw.ThickLine (362, 280, 362, 305, 5, 114)     %The left side
    Draw.ThickLine (387, 280, 387, 305, 5, 114)     %The Right Side
    Draw.ThickLine (387, 305, 362, 305, 5, 114)     %The top side
    Draw.ThickLine (362, 293, 387, 293, 5, 114)     %The middle
    %Grass
    drawfillbox (1, 1, 1100, 100, brightgreen)
    %The driveway
    drawfillbox(450,100,555,1,88)
    %The Garage
    drawfillbox (450, 185, 555, 100, 23)
    drawfillbox (465, 170, 540, 100, 9)
    drawfillbox (a, b, 540, 100, black)
    a := a
    b := b + 5

    exit when b > 170
    View.Update



    delay (150)

    cls
    colourback (c)


    drawfilloval (x, y, 20, 20, yellow)


    x := x - countx
    y := y + county


    if b > 170
            then
        drawfillbox (475, 120, 480, 125, white)
        drawfillbox (520, 120, 525, 125, white)
    end if

end loop

loop
    View.Set ("offscreenonly")

    drawfillbox (300, 100, 450, 250, 65)    %The box of the house
    drawfillbox (315, 190, 345, 220, white)     %The left window
    drawfillbox (400, 190, 430, 220, white)     %The Right Window
    Draw.FillPolygon (x1, y1, 3, red)     %The roof of the house
    drawfillbox (362, 280, 387, 305, white)     % The window on the roof
    drawfillbox (355, 100, 390, 150, 114)     %The door
    %Border of Left window
    Draw.ThickLine (315, 190, 315, 220, 5, 114)     %The right side
    Draw.ThickLine (315, 190, 345, 190, 5, 114)     %The low side
    Draw.ThickLine (315, 220, 345, 220, 5, 114)     %The high side
    Draw.ThickLine (345, 220, 345, 190, 5, 114)     %The left side
    Draw.ThickLine (330, 220, 330, 190, 5, 114)     %The middle
    Draw.ThickLine (315, 205, 345, 205, 5, 114)     %The middle
    %The Chimney
    drawfillbox (435, 250, 410, 330, red)
    %Trees
    Draw.FillMapleLeaf (170, 100, 135, 240, green)
    %Border of Right Window
    Draw.ThickLine (400, 190, 400, 220, 5, 114)     %The right side
    Draw.ThickLine (400, 190, 430, 190, 5, 114)     %The low side
    Draw.ThickLine (400, 220, 430, 220, 5, 114)     %The high side
    Draw.ThickLine (430, 220, 430, 190, 5, 114)     %The left side
    Draw.ThickLine (415, 220, 415, 190, 5, 114)     %The middle
    Draw.ThickLine (400, 205, 430, 205, 5, 114)     %The middle
    %The Roof Window
    Draw.ThickLine (362, 280, 387, 280, 5, 114)     %The low side
    Draw.ThickLine (362, 280, 362, 305, 5, 114)     %The left side
    Draw.ThickLine (387, 280, 387, 305, 5, 114)     %The Right Side
    Draw.ThickLine (387, 305, 362, 305, 5, 114)     %The top side
    Draw.ThickLine (362, 293, 387, 293, 5, 114)     %The middle
    %Grass
    drawfillbox (1, 1, 1100, 100, brightgreen)
    %The Garage
    drawfillbox (450, 185, 555, 100, 23)
    drawfillbox (465, 170, 540, 100, 9)
    drawfillbox (a, b, 540, 100, black)
    drawfillbox (475, 120, 480, 125, white)
    drawfillbox (520, 120, 525, 125, white)
    View.Update
    delay (150)
    colourback (c)


    cls

    drawfilloval (x, y, 20, 20, yellow)

    exit when x = 0
    x := x - countx
    y := y + county
    if y > 500 then
        county := 0
        if x < 250 then
            county := -7

        end if

    end if

end loop

x := 2
y := 300
countx := 10
county := 7

loop
    View.Set ("offscreenonly")

    drawfillbox (300, 100, 450, 250, 65)    %The box of the house
    drawfillbox (315, 190, 345, 220, white)     %The left window
    drawfillbox (400, 190, 430, 220, white)     %The Right Window
    Draw.FillPolygon (x1, y1, 3, red)     %The roof of the house
    drawfillbox (362, 280, 387, 305, white)     % The window on the roof
    drawfillbox (355, 100, 390, 150, 114)     %The door
    %Border of Left window
    Draw.ThickLine (315, 190, 315, 220, 5, 114)     %The right side
    Draw.ThickLine (315, 190, 345, 190, 5, 114)     %The low side
    Draw.ThickLine (315, 220, 345, 220, 5, 114)     %The high side
    Draw.ThickLine (345, 220, 345, 190, 5, 114)     %The left side
    Draw.ThickLine (330, 220, 330, 190, 5, 114)     %The middle
    Draw.ThickLine (315, 205, 345, 205, 5, 114)     %The middle
    %The Chimney
    drawfillbox (435, 250, 410, 330, red)
    %Trees
    Draw.FillMapleLeaf (170, 100, 135, 240, green)
    %Border of Right Window
    Draw.ThickLine (400, 190, 400, 220, 5, 114)     %The right side
    Draw.ThickLine (400, 190, 430, 190, 5, 114)     %The low side
    Draw.ThickLine (400, 220, 430, 220, 5, 114)     %The high side
    Draw.ThickLine (430, 220, 430, 190, 5, 114)     %The left side
    Draw.ThickLine (415, 220, 415, 190, 5, 114)     %The middle
    Draw.ThickLine (400, 205, 430, 205, 5, 114)     %The middle
    %The Roof Window
    Draw.ThickLine (362, 280, 387, 280, 5, 114)     %The low side
    Draw.ThickLine (362, 280, 362, 305, 5, 114)     %The left side
    Draw.ThickLine (387, 280, 387, 305, 5, 114)     %The Right Side
    Draw.ThickLine (387, 305, 362, 305, 5, 114)     %The top side
    Draw.ThickLine (362, 293, 387, 293, 5, 114)     %The middle
    %Grass
    drawfillbox (1, 1, 1100, 100, brightgreen)

    %The Garage
    drawfillbox (450, 185, 555, 100, 23)
    drawfillbox (465, 170, 540, 100, 9)
    drawfillbox (a, b, 540, 100, black)
    a := a
    b := b - c
    if b = 100 then
        c := 0

    end if


    View.Update

    delay (150)



    colourback (black)
    cls
    drawfilloval (x, y, 20, 20, white)

    exit when x > 1000
    x := x + countx
    y := y + county
    if y > 500 then
        county := 0
        if x > 750 then
            county := -7

        end if
    end if



end loop


hey guys that is my code can you please help me where to put the stars.

the code for the stars id:

delay (1) 
            randint (row, 1, 15) 
            randint (column, 1, 158) 
            locate (row, column) 
            color (white) 
            put "*" 


-----------------------------------
alvini
Wed Dec 14, 2005 9:14 pm

help?
-----------------------------------
help?

-----------------------------------
Mr. T
Wed Dec 14, 2005 9:18 pm

Alex's Opinion
-----------------------------------
Make the sun and moon arcs as opposed to linearly.

-----------------------------------
alvini
Wed Dec 14, 2005 10:10 pm

heeeeeeeeelp?
-----------------------------------
can anybody help me how to make smoke.
plz
 :(

-----------------------------------
Paul
Wed Dec 14, 2005 10:16 pm


-----------------------------------
Well it depends on what kind of smoke you want.

There are many ways you can go about it and many different potential smoke. Do you want cartoony smoke? do you want it hard coded?

Because if you don't you can just draw a picture and put it on screen, reproduce it and move it about.

But by the looks of it you'll be using the draw commands.

Why not use a series of Draw.FillOval commands to make a smoke-shape, then just move it away from the chimney?

Say you have a variable: SmokeX, SmokeY
And you drew circles around the point (SmokeX, SmokeY) and as the animation goes on, you keep filling the previously drawn one, and drawing new variations of around the changing point. So that it will look like you have a smoke changing shapes and moving away from your chimney.

Sorry, I need to get back to my own homework now :(

-----------------------------------
codemage
Thu Dec 15, 2005 1:56 pm


-----------------------------------
Try not posting the same question in a bajillion threads.

Then...

Set fire to your room / computer / self, then turn on the webcam and stream its images to your turing program.

-----------------------------------
alvini
Thu Dec 15, 2005 8:41 pm

help
-----------------------------------
how could i modify this code to do the opposite?
for count : 1 .. 1
    var y := 0
    var Start, End : int
    Start := 0
    End := maxx
    for x : Start .. End
        View.Set ("offscreenonly")
        y := (-1 * ((x - maxx div 2) ** 2)) div 800 + 370
        house1
        drawfilloval (x, y, 22, 22, yellow)

        drawfilloval (x, y, 22, 22, yellow)
        exit when x = maxx
        View.Update
    end for
end for

-----------------------------------
iker
Thu Dec 15, 2005 9:06 pm


-----------------------------------
change your 

for x : Start .. End

to a decreasing for.
If you don't know what that is, check out in the help file under for for help, and if you don't understand that, just ask :D[/b]
