
-----------------------------------
Hotaru
Sun Feb 08, 2004 7:32 pm

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~

-----------------------------------
Andy
Sun Feb 08, 2004 7:39 pm


-----------------------------------
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


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


-----------------------------------
Andy
Sun Feb 08, 2004 7:40 pm


-----------------------------------
if u want smoother animation, you'll have to read up on View.Update... add me to msn if u want help

-----------------------------------
sport
Sun Feb 08, 2004 7:42 pm


-----------------------------------
Make a picture in paint than import it using Pic.FileNew if you and if you need you can rotate it using Pic.Rotate.

-----------------------------------
Andy
Sun Feb 08, 2004 7:43 pm


-----------------------------------
i believe the question was how to make a picture move, not how to make a picture

-----------------------------------
Paul
Sun Feb 08, 2004 7:49 pm


-----------------------------------
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 :P
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

-----------------------------------
Delta
Mon Feb 09, 2004 6:58 pm


-----------------------------------
hey whatdotcolour dude.... he did ask how to move a picture.... but you told him how to move an oval :? ... lol

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)

-----------------------------------
Andy
Mon Feb 09, 2004 9:10 pm


-----------------------------------
ya u did have it wrong...

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"

-----------------------------------
Delta
Mon Feb 09, 2004 11:50 pm


-----------------------------------
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 :)

-----------------------------------
naoki
Tue Feb 10, 2004 4:46 pm


-----------------------------------
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

-----------------------------------
Psyberius
Sat Apr 09, 2016 4:34 pm

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?
