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

Username:   Password: 
 RegisterRegister   
 Moving .bmp files in a game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
drewst18




PostPosted: Mon Apr 19, 2004 10:17 pm   Post subject: Moving .bmp files in a game

I am making an asteroids game(I am somewhat new to turing)...

my bullets are not Draw.Oval , but Pic.New how can I get them to move through the y axis when i hit the key

eg.

code:
loop
if Key_HOME(chars) then
var bullet : int := Pic.FileNew('bullets.bmp")
% Bullets from gun # 1
Pic.New (bullet,x,y,picMerge)
% Bullets from gun #2
Pic.New (buller,x1,y1,picMerge)
end if
end loop



So using that can someone help me move my bullets towards the incoming aliens
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Apr 19, 2004 10:24 pm   Post subject: (No subject)

i don't understand why you would keep on creating new pictures Confused I mean you already loaded the image from a file Rolling Eyes

but you'd move them the same way you would move if you were drawing it using Draw.Oval, since x/y values are the same Razz

Each time though the loop, if there're any active bullets on the screen, they move tawards their path 1 unit.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: