yeah, Hart was a genius and Jon kida held it together. Come back people.
» Forum
> Your Projects
4 paddels, one on each side of the screen, and one ball to bounce around. As the game progress, the paddels get closer together, eventually forming a box, and then a winner. Besides that, just regular old pong.
- hart
- Advanced Newbie (Posts: 52)
- 31 Jul 2005 11:27:30 pm
- Last edited by hart on 22 Sep 2005 10:01:26 pm; edited 2 times in total
Quote:
- hart
- Advanced Newbie (Posts: 52)
- 31 Jul 2005 11:43:59 pm
- Last edited by hart on 22 Sep 2005 10:01:54 pm; edited 1 time in total
Quote:
hart wrote:
I also had a couple questions about your code. You initialize the variable E by getting a random number between -37 and -37. If this is actually what you want to do, why don't you just store -37 as E because they mean the same thing? I also was wondering why you erase the paddle and ball first? Wouldn't it make sense to first display the paddle and ball and then erase them after you have gotten a keypress from the user?
I'm guessing that's a typo and he meant
Code:
RandInt(-37,37)
ok, regards to the rand int. I put that in orginally when the paddels started a few pixels off the screen, and made a rectangle. During the coding, I figured a square was easier, so I went with that. The E varible is one of the varibles for ball location. I wanted the ball to appear in a random spot, add a dimension to game play, but when I went square, A decided against the one direction of randomness. So Kerm, it is a typo, but yeah Hart, in should be -37->E. Tell me why would it be -37 - 37, then the ball would start off the screen.
As to the erasing before drawing, as too the erasing at the beginning, that is for when the paddles move in after a bounce I need it to wait, else then I get a loop of problems, otherwise, then they are erased after a keypress, then redrawn at their new location. The ball is ereased befor the new one is drwan to prevent having 2 on the sreen at once. If you have anymore questions, contact me.
As to the erasing before drawing, as too the erasing at the beginning, that is for when the paddles move in after a bounce I need it to wait, else then I get a loop of problems, otherwise, then they are erased after a keypress, then redrawn at their new location. The ball is ereased befor the new one is drwan to prevent having 2 on the sreen at once. If you have anymore questions, contact me.
I have a semi-working prototype of Ultimate Pong, at present I'm working on hit detection and optimizing.
yeah, what, we have Kerm's, mine, Kuro's, and Kllrnohj's Ultimate Pong. are there any other submissions?
Jon's was abandonded, but he may have finished it, and I don't think TI-Freak8x made one, but I may be mistaken
Fear not! I'm back (sort of). See my thread. [ontopic]When are we going to give rivereye full membership and all of the magical wonders that come with it?[/ontopic]
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2, 3 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 3
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement