Computer Science Canada

making pictures move like race cars~

Author:  Hotaru [ Sun Feb 08, 2004 7:32 pm ]
Post subject:  making pictures move like race cars~

~my question is~how to make a specific picture move~so that it can be similar to a race car~

Author:  Andy [ Sun Feb 08, 2004 7:39 pm ]
Post subject: 

ok here is the basic idea, you draw the image, wipe it, and then draw it again but increase the x cordinate to demonstrate using a ball

code:

var x : int := 0
loop
    drawfilloval (x, maxy div 2, 10, 10, brightblue)
    delay (10)
    drawfilloval (x, maxy div 2, 10, 10, white)
    x += 1
end loop

Author:  Andy [ Sun Feb 08, 2004 7:40 pm ]
Post subject: 

if u want smoother animation, you'll have to read up on View.Update... add me to msn if u want help

Author:  sport [ Sun Feb 08, 2004 7:42 pm ]
Post subject: 

Make a picture in paint than import it using Pic.FileNew if you and if you need you can rotate it using Pic.Rotate.

Author:  Andy [ Sun Feb 08, 2004 7:43 pm ]
Post subject: 

i believe the question was how to make a picture move, not how to make a picture

Author:  Paul [ Sun Feb 08, 2004 7:49 pm ]
Post subject: 

Ah, we might not be getting the question clear here, is the question:
a. making a drawn picture move
b. making an imported picture move
c. making something move with control, "race car", like recneps race car
If its b. then you might want to see my horseracing game Razz
http://www.compsci.ca/v2/viewtopic.php?t=3338
If its c. you might want to check out Asian Sensation's tutorial at:
http://www.compsci.ca/v2/viewtopic.php?t=3542

Author:  Delta [ Mon Feb 09, 2004 6:58 pm ]
Post subject: 

hey whatdotcolour dude.... he did ask how to move a picture.... but you told him how to move an oval Confused ... lol

code:
var x : int := 0
var pic :int := Pic.FileNew ("locationoffile")
loop
    Pic.Draw (pic, x, 100, 2)
    x += 1
cls
View.Update
end loop


Note : I never use view.update (not sure how... so look it up... I might have it wrong)

Author:  Andy [ Mon Feb 09, 2004 9:10 pm ]
Post subject: 

ya u did have it wrong...
code:

View.Set("offscreenonly")
var x : int := 0
var pic :int := Pic.FileNew ("locationoffile")
loop
    cls
    Pic.Draw (pic, x, 100, 2)
    x += 1
    View.Update
end loop


o and read my post again, this time carefully especially the part of "to demonstrate using a ball"

Author:  Delta [ Mon Feb 09, 2004 11:50 pm ]
Post subject: 

thnx for fixing that dodge... but I did notice the to demonstrate using a ball.... and I just brought it up because he asked for a pic example... and maybe he didn't know how to work with pics... but its no biggy... eitherway he should beable to learn Smile

Author:  naoki [ Tue Feb 10, 2004 4:46 pm ]
Post subject: 

Well if you have a series of pictures that you want to animate then for each increment in the forward direction change the picture using a loop or a counter which you mod

You should also read up on using Input.KeyDown in order to use your keyboard to move the racecar

Author:  Psyberius [ Sat Apr 09, 2016 4:34 pm ]
Post subject:  Re: making pictures move like race cars~

I am trying to make a code that allows a car to move down a highway but every time i try to even LOAD the picture i get a llegal picture ID number '0'. (probable cause: picture was not successfully created.) but i know that i have put the picture where i said the picture and i have tried with .jpg and .bmp and neither work any help?


: