Help, velocity and direction

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: Help, velocity and direction

Post by RyanPridgeon »

Avishaiozeri wrote:I'm working on a pong game, because i'm a total noob... I'm good with math, but i'm learning all the stuff you're talking about this year, so i'm still not totally comfortable with some concepts...
Well just stick with it. Ability in maths is an awesomely useful skill, and it only gets better later on :)
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
Avishaiozeri
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 85
Joined: Wed Mar 17, 2010 4:32 pm

Re: Help, velocity and direction

Post by Avishaiozeri »

RyanPridgeon wrote:
Avishaiozeri wrote:I'm working on a pong game, because i'm a total noob... I'm good with math, but i'm learning all the stuff you're talking about this year, so i'm still not totally comfortable with some concepts...
Well just stick with it. Ability in maths is an awesomely useful skill, and it only gets better later on :)
Thanks man, i'm totally grateful for your help, i owe you! :)
Edit: Sorry if it sounded arrogant when i said i'm good with math..
Avishaiozeri
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 85
Joined: Wed Mar 17, 2010 4:32 pm

Re: Help, velocity and direction

Post by Avishaiozeri »

Hey guys, sorry for the double post. I have an idea, will it work if i'll make that the direction of the ball will be decided by the place it hits the player paddle? like if it'll hits the left, the ball will be thrown to the left or if on the right, to the right etc. ?
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Help, velocity and direction

Post by eatcomics »

yep, and that should be easy to do :D
Image
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

Re: Help, velocity and direction

Post by short »

Avishaiozeri wrote:Hey guys, sorry for the double post. I have an idea, will it work if i'll make that the direction of the ball will be decided by the place it hits the player paddle? like if it'll hits the left, the ball will be thrown to the left or if on the right, to the right etc. ?
It all depends on what you want your game mechanics to do. If that's what you want it to do, then go for it. If you want it to speed up or slow down based on the angle of impact from the center of the paddle you could do that. It's entirely up to you, and the math isn't going to be terribly difficult for anything you can come up for a pong game.
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
Avishaiozeri
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 85
Joined: Wed Mar 17, 2010 4:32 pm

Re: Help, velocity and direction

Post by Avishaiozeri »

I tried it, and it works nicely. thank you all for the help!
Post Reply