Computer Science Canada Creation of a running game for turing |
Author: | solarsparten [ Thu Jan 19, 2012 1:39 pm ] | ||
Post subject: | Creation of a running game for turing | ||
What is it you are trying to achieve? <I am trying to get the program to randomly generate platforms/obstacles to jump over> What is the problem you are having? <The program will generate one of the two I have currently created, and then stop> Describe what you have tried to solve this problem <A numerous list too long to post here> 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 <Answer Here> |
Author: | copthesaint [ Thu Jan 19, 2012 3:30 pm ] |
Post subject: | RE:Creation of a running game for turing |
You will have to explain your problem better then this if you expect to get any help. I dont understand what you are having a problem with. |
Author: | solarsparten [ Thu Jan 19, 2012 3:43 pm ] |
Post subject: | RE:Creation of a running game for turing |
Im sorry, it glitched out when I posted it, basically I have been making a game ment to run, and get as far as you can on a conveyor belt, with out going off either edge of the screen. Right now im working on getting it to randomly generate platforms and obstacles, there are only two right now. The problem is it will generate an object, but then the object will go across the screen a bit, and dissapear, then another one of a different type will appear and start going across, when this happens it will then dissapear, and the other one continues from where it stopped, and it continues on like this, and after those two dissapear completely it wont generate any more. Can I have a bit of help? |
Author: | copthesaint [ Thu Jan 19, 2012 4:29 pm ] |
Post subject: | RE:Creation of a running game for turing |
Well the reason why your game is only drawing one of the boxes is because you choose to make it draw only one. after 50 loops from your timer you have set platform to be 1 or 2. then in your if condition you state if platform is equal to 1 then draw platform1 if platform is equal to 2 then draw platform2. You dont have and option to draw both. you have chosen to make it only one or the other. |
Author: | solarsparten [ Thu Jan 19, 2012 5:00 pm ] |
Post subject: | RE:Creation of a running game for turing |
Yeah, but I told it if it = platform 1 from the random thing, then to makethat platform move across the screen, but I need to figure out how to make it continously choose one, move it, then to do it again |
Author: | copthesaint [ Thu Jan 19, 2012 5:41 pm ] |
Post subject: | RE:Creation of a running game for turing |
look at where your code is to draw the box. then you should again look at my previous post. |