|
|||||||
| Forum Home | Register | Members List | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#32 | ||||||||
|
Member
Location: Tuckahoe, NY |
Well I was finally able to get paddles and balls on the screen!
I feel like I accomplished the simplest of things probably to you guys, but at least I am not a total failure. Although I feel that I probably will not finish this in time, I want to thank you guys ahead of time for your help and also kicking my butt into gear to start doing my own stuff. Thanks a bunch, your games look good so far, I just want to play! Can I be QA Lead on these? ![]() |
||||||||
|
|
|
|
#33 | ||||||||
|
Senior Member
Location: London |
QA lead? You want to sit at your pc, browsing your e-mails all day and telling your minions to "test it again"?
![]() If your balls and paddles are drawing the rest is quite simple, declare 2 float variables to store the balls speed (one is the X axis speed, the other is the Y axis speed), then every update add the speed values onto your balls position. Then if the ball hits the walls on the top or bottom reverse the Y speed ( ySpeed = -ySpeed; ) and the ball will bounce. Same for the X speed value if it hits a paddle. You really don't have far to go. Ps. What I've said there is a very basic way to get the ball bouncing. You may want to improve on it later, by increasing the ball speed slightly each time it bounces, or making it change direction depending on where it hits the paddle. Last edited by Claxon : 11-11-2008 at 04:52 AM. |
||||||||
|
|
|
|
#34 | ||||||||
|
Moderator
Location: Philadelphia, PA |
Yes it does, it is called architected code, if you plan out what you are going to code you should not need to have so many hacks. Really this just comes with time this is something they are still trying to teach me at work. Plan then code. I like to just jump in and code, but I am starting to realize if you plan it out it works so much better.
But if you are fixing bugs then no there is no non hack code ![]()
__________________
Grant Shonkwiler() "I would love to fix the world if someone would just give me the source code" Website Industry blog LinkedIn |
||||||||
|
|
|
|
#35 | |||||||||
|
Member
Location: Tuckahoe, NY |
Quote:
|
|||||||||
|
|
|
|
#36 | ||||||||
|
Super Moderator
Location: New York |
Hmmmm, *cough*
I really have to ask, because I really have no idea how this compares to others: I decided to look into Dark GDK today, as a possible framework to start writing games with (Just to clarify - I have been a programmer for 11 years, but never actually wrote a game). I started reading the tutorials at 21:00, and by around 23:40, using Dark GDK's 2D game template, I managed to have 2 puddles, a ball (both simple bitmaps), collision detection (with puddles and walls), player movement for the first puddle and a (very simple) AI movement for the second puddle. it's not perfect yet (The collision detection still doesn't work perfectly and there is no scoring system), and I'm not sure I'll manage to make something special out of it by the dead line, so I'm not sure I'll submit it. My question is, if anyone here knows Dark GDK, is this considered good time for this framework? (Again, I really really really don't know ).Another question - I'm having trouble with the 2nd puddle's AI, if I let it go towards the ball it always catches it, if I try to add some sort of penalty it never catches it, any advice? Oh, and once I make it all pretty and nice (as nice as a programmer with no art capabilities can make it), will this be a good portfolio starter peice? Last edited by TG1 : 11-11-2008 at 01:16 PM. |
||||||||
|
|
|
|
#37 | |||||||||||
|
Senior Member
Location: London |
Quote:
Quote:
Quote:
More than likely 'no'. If you make it into something like what my version is intended to be like (3d/cool graphics, particle systems, power-ups, perhaps multi-player, unique game mechanics) then yes it could go on your portfolio, but if it's a straight pong clone, it's not even worth mentioning (like I said above, anyone reading your portfolio could probably get the same result in an hours work). |
|||||||||||
|
|
|
|
#38 | |||||||||
|
Member
Location: Tuckahoe, NY |
Quote:
![]() |
|||||||||
|
|
|
|
#39 | ||||||||
|
Senior Member
Location: London |
Is your draw() function being called repeatedly? It sound like either draw is only being called once or your x & y positions are not being updated. For the second problem, this could be a pass by reference / pass by value issue depending on how you've done your code. So your update function may be updating a copy of your paddle's position rather than the actual one your draw method is using. If this is the case you could make sure your x / y coordinates are in a global variable, and have your functions edit that, instead of passing the x & y coordinates into other functions as parameters. (I hope I've made that understandable.
If you like you can post the code for your paint & processing functions, so we can help locate the problem. |
||||||||
|
|
|
|
#40 | ||||||||
|
Moderator
Location: Netherlands |
Man, I hope I'll finish my Pong in time and get some feedback... It's turning out pretty kooky and I'm digging it myself, although I can totally see how others might think it is a boring and buggy mess. :P
__________________
I'm a web developer by profession, but a game developer by heart. Uh oh! The princess is in another signature! |
||||||||
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 05:11 PM.





















I feel like I accomplished the simplest of things probably to you guys, but at least I am not a total failure. Although I feel that I probably will not finish this in time, I want to thank you guys ahead of time for your help and also kicking my butt into gear to start doing my own stuff. Thanks a bunch, your games look good so far, I just want to play! Can I be QA Lead on these? 



).
Linear Mode

