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

Username:   Password: 
 RegisterRegister   
 Stay Alive - Game Help - Disregard the other topic
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
altdas




PostPosted: Mon Jan 21, 2008 11:47 pm   Post subject: Stay Alive - Game Help - Disregard the other topic

Alright, I'm trying to have my character be able to walk around, while the shots shoot down as they are.
It seems to be only working one way or the other.

I'm also trying to find way of detecting that the character has touched the bullet, so I can have the lose penalty. Razz
All help is very much appreciated. Laughing



Stay Alive beta_4.zip
 Description:
All needed files are in the zip.

Download
 Filename:  Stay Alive beta_4.zip
 Filesize:  180.27 KB
 Downloaded:  89 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
isaiahk9




PostPosted: Tue May 06, 2008 5:12 pm   Post subject: Re: Stay Alive - Game Help - Disregard the other topic

For the problem of shots being fired down and a character moving not both working at the same time, I believe you could put the code for the shots in one process, and then the inputting of keys for the avatar moving in another process. You could then fork both the processes. A lot of people have spread the word of how processes are evil, but I haven't run into any issues with them. And, if the processes are truly evil then you can go to Turing Help, and on page one click on the sticky for "Why to avoid processes" and that should tell you how to change your processes into something superior-ally efficient.
As for collision detection, I came up with something just last week on that. Set an x and y variable for the coordinates of the bullet. Instead of changing the area where the picture of the bullet is displayed, just change the coordinates and make the program draw the bullet on those coordinates. Then, you could just say that if the bullet's coordinates are equal to the avatar's coordinates, then the score will decrease.
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: