
-----------------------------------
crash0414
Tue Nov 02, 2004 9:43 am

transportation help
-----------------------------------
need to make a form of transportation using turing,ex car or plane. it has to move across the page..im not asking for someone to give me the answer im just asking if you can help 

here is what i have so far 

var x,y : int 
x:=100 
y:=100 
var chars : array char of boolean 

loop 
Input.KeyDown (chars) 
if chars (KEY_UP_ARROW) then 
y:=y+5 
end if 

if chars (KEY_RIGHT_ARROW) then 
x:=x+5 
end if 

if chars (KEY_LEFT_ARROW) then 
x:=x-5 
end if 

if chars (KEY_DOWN_ARROW) then 
y:=y-5 
end if 

drawoval(x,y,4,4,red) 
delay(10) 
cls 
end loop


-----------------------------------
Mazer
Tue Nov 02, 2004 9:46 am


-----------------------------------
You need to tell us what it is that you need help with.

-----------------------------------
crash0414
Tue Nov 02, 2004 9:49 am


-----------------------------------
i dont know how to put a car into this to make it move

-----------------------------------
Tony
Tue Nov 02, 2004 1:33 pm


-----------------------------------
so just draw the car instead of that circle... you have the proper X/Y coordinates

-----------------------------------
crash0414
Tue Nov 02, 2004 5:51 pm


-----------------------------------
i tried that but it didnt work right

-----------------------------------
SuperGenius
Tue Nov 02, 2004 6:09 pm


-----------------------------------
supposing that you had a picture called car.jpg stored in the same folder as your program:

var picID: int
picID := Pic.FileNew("car.jpg")
Pic.Draw(picID,0,0,picCopy)

this draws the picture with the bottom left corner at (0,0)

-----------------------------------
crash0414
Wed Nov 03, 2004 8:14 am


-----------------------------------
i dont want to have a picture of a car, i need to draw a car, but everytime a draw a car in this it always messes up

-----------------------------------
McKenzie
Wed Nov 03, 2004 8:37 am


-----------------------------------
Hmmm ...
Crash == Dying to live ???
http://www.compsci.ca/v2/viewtopic.php?t=6281&highlight=transportation

-----------------------------------
crash0414
Wed Nov 03, 2004 8:55 am


-----------------------------------
no dying to live is a friend of mine..were in the same class

-----------------------------------
SuperGenius
Wed Nov 03, 2004 5:42 pm


-----------------------------------
well if you don't want a picture of a car what I suggest you do is to draw it in turing and then use Pic.New to convert your image into a picture, which makes it a lot simpler to move around the screen.

-----------------------------------
crash0414
Thu Nov 04, 2004 8:16 pm


-----------------------------------
i have a car made now and it will move around but now i am just having troubles getting a background..i dont know how, everytime i try the screen just flashes :?

-----------------------------------
crash0414
Sat Nov 06, 2004 8:10 pm


-----------------------------------
does any1 know how to do this?

-----------------------------------
HyperFlexed
Sun Nov 07, 2004 2:43 am


-----------------------------------
for flashing, put the following at the beginning of your code (after your vars I guess)


View.Set ("offscreenonly")


when you draw an object with turing, it won't go right to the screen now, it stores everything you draw in a buffer. You can load the buffer onto the screen by calling

View.Update

that helps with flickering


As well, when drawing the car with shapes, the trick is to know where all the shapes are in relativity to your x and y variables. It helps me sometimes to draw out stuff like this (make a dot for x and y, and then see where the other objects are relative to the x,y position)

-----------------------------------
crash0414
Mon Nov 08, 2004 10:01 am


-----------------------------------
i dont care about the flashing..i need help making a background into this

-----------------------------------
myob
Mon Nov 08, 2004 9:39 pm


-----------------------------------
u gonna be more specific, what do you mean by saying "making a background into this"? do you want to put a background in ur program or what?

-----------------------------------
crash0414
Mon Nov 08, 2004 10:06 pm


-----------------------------------
yes i do want to put a background into this

-----------------------------------
myob
Mon Nov 08, 2004 10:16 pm


-----------------------------------
as i recall there is no background picture commands, just draw a picture that is at the back of the screen and draw everything else on top of it

-----------------------------------
crash0414
Mon Nov 08, 2004 10:18 pm


-----------------------------------
ok..so where would i put it??? :?:  :?:

-----------------------------------
myob
Mon Nov 08, 2004 10:28 pm


-----------------------------------
var picID: int        
        picID := Pic.FileNew ("mypic.bmp")
            Pic.Draw (picID, 0, 0, picUnderMerge)
        

so lets say ur picture is called "mypic.bmp", u declare it like that and put it at (0,0) so its at bottom left corner. you should setup the screen and/or the picture so they match each other.

-----------------------------------
crash0414
Tue Nov 09, 2004 8:50 am


-----------------------------------
ok..i did that and it didnt work..it said it was an "illeagal picture id"

-----------------------------------
HyperFlexed
Tue Nov 09, 2004 6:12 pm


-----------------------------------
why don't you use rectangles and stuff to draw your image? That's be more pro. Write a procedure to draw a road with a width and number of lanes that you declacre in the procedure.

-----------------------------------
myob
Tue Nov 09, 2004 7:40 pm


-----------------------------------
ok..i did that and it didnt work..it said it was an "illeagal picture id"

then we gonna need ur code to help us

-----------------------------------
cool dude
Tue Nov 09, 2004 8:39 pm


-----------------------------------
i'm not sure if i completely understand but as i understand u just want to make a background on your whole screen. you could use the command colourback and the colour in brackets.


colourback (7)


then if u want to make it look like a road you could draw a huge grey rectangle and draw little yellow rectangles in the big grey rectangle to make it look like a road. good luck

-----------------------------------
crash0414
Wed Nov 10, 2004 10:31 pm


-----------------------------------
i have changed my whole thing and i am now doing a ufo, i have the ufo made with a black background and stars, but all i need help doing now is making a moon or somthing move arcoss the screen, i dont have the program here on this computer but i will post it when i can
