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

Username:   Password: 
 RegisterRegister   
 making pictures move like race cars~
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Hotaru




PostPosted: 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~
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Sun Feb 08, 2004 7:39 pm   Post subject: (No 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
Andy




PostPosted: Sun Feb 08, 2004 7:40 pm   Post subject: (No subject)

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




PostPosted: Sun Feb 08, 2004 7:42 pm   Post subject: (No 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.
Andy




PostPosted: Sun Feb 08, 2004 7:43 pm   Post subject: (No subject)

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




PostPosted: Sun Feb 08, 2004 7:49 pm   Post subject: (No 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
Delta




PostPosted: Mon Feb 09, 2004 6:58 pm   Post subject: (No 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)
Andy




PostPosted: Mon Feb 09, 2004 9:10 pm   Post subject: (No 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"
Sponsor
Sponsor
Sponsor
sponsor
Delta




PostPosted: Mon Feb 09, 2004 11:50 pm   Post subject: (No 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
naoki




PostPosted: Tue Feb 10, 2004 4:46 pm   Post subject: (No 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
Psyberius




PostPosted: 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?
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 1  [ 11 Posts ]
Jump to:   


Style:  
Search: