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

Username:   Password: 
 RegisterRegister   
 space invaders
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
diablo




PostPosted: Wed Nov 03, 2004 2:22 pm   Post subject: space invaders

I am making a space invaders game and i have the code right....
except that when the enemies spawn on the screen, my ship dissapears and after it stops(i moved it 5 times), then my ship reappeared and functioned normally.
can you help me with any code that will help me in keeping my ship on the screen and my enemies at the same time?
i am using version 4 btw
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Nov 03, 2004 4:06 pm   Post subject: (No subject)

eh... a wild guess would be that you're spawning spaceships in a loop and you forgot to include player's ship inside of it.. Thinking
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
diablo




PostPosted: Thu Nov 04, 2004 8:15 am   Post subject: (No subject)

im not using a loop here is my code for the spawn of the enemies:

var enemy1:int:=Pic.FileNew("picture1.jpg")
delay(200)
Pic.Draw (enemy1, 600,300, picXor)
delay(1000)
cls

....and that repeats itself 5 times and then my ship appears.
Quote:
how do we know we exist?
maybe we dont exist...
Tony




PostPosted: Thu Nov 04, 2004 8:31 am   Post subject: (No subject)

diablo wrote:

delay(200)

delay(1000)

oh, I donno... You think those two might have _anything_ to do with the fact that your spaceship disappears?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
diablo




PostPosted: Thu Nov 04, 2004 11:31 am   Post subject: (No subject)

good advice.........
but when i got rid of them nothing happened at all
could it be that they arent in a loop together?
diablo




PostPosted: Thu Nov 04, 2004 11:34 am   Post subject: (No subject)

the delay(#) only delays the tme that the sprite comes back on the scrreen so they dont all move at the speed of light or only appear once.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: