Computer Science Canada Bullet in turing game is being weird. No idea how to fix, help needed badly. |
Author: | chimerix [ Wed Nov 25, 2009 5:22 pm ] | ||
Post subject: | Bullet in turing game is being weird. No idea how to fix, help needed badly. | ||
What is it you are trying to achieve? Im trying to make a space invaders type game, however i cant get my bullet to work properly. What is the problem you are having? The bullet will not go in a straight line, and will not be refreshed. The red box is you, and the black box is the enemy (ignore). Movement are the arrow keys, and space is shoot. Describe what you have tried to solve this problem The program is (horribly) written by me already, but i just need the bullet to work. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using 4.1.1 |
Author: | B-Man 31 [ Wed Nov 25, 2009 8:15 pm ] |
Post subject: | RE:Bullet in turing game is being weird. No idea how to fix, help needed badly. |
ok, first of all, your wondering why it doesn't refresh after the the space bar is let go, this is because, in your program, the bullet only draws as long as the space bar is pressed. try moving the drawing f the bullet in the main loop. As for getting it to go in a straight line, you need to have another variable that isnt the x value of your ship. |