Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / BLAST Pong(sorta)

Author
Message
Blastwave man
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location: ...don\'t look behind you.
Posted: 19th Jun 2007 05:09 Edited at: 19th Jun 2007 05:10
So I spent the last month trying to work on my last project, Atomic Satellite from Venus, but I just can't get stuff to work, maybe I'm not understanding the way things should be programed, who knows.

Anyway, I kept asking my brother for help, but he told me, "Make pong, then I'll help"

So I am, lol. I started on a simple pong game, with some flashy stuff. Nothing much. It' started out alright, but I think i screwed up my trig, or maybe I'm just not implementing it correctly in code. Try it out, and you will see what I mean
heres code: (screenshot attached)


Blastwave Man


"I wish I was a wizard, becuase then I could wave my wand and perfect code would just appear."

Attachments

Login to view attachments
Shadow heart
17
Years of Service
User Offline
Joined: 2nd Dec 2006
Location: US
Posted: 19th Jun 2007 06:16
ahh cool. a 3d pong game.
good luck

to the ones thats trapped inside of you, this is it!!
Blastwave man
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location: ...don\'t look behind you.
Posted: 19th Jun 2007 08:46
any help on fixing the weird bug would be appreciated

BWM


"I wish I was a wizard, becuase then I could wave my wand and perfect code would just appear."
H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 19th Jun 2007 15:15
Yeah, the trig is definitely not quite right . However, there is an easier way that involves a lot less trig. When the ball is reset, calculate a move_x and move_y values based on the angle and speed you want the ball to have. Use these values that you calculated to move the ball instead of the angle and speed. Then, when the ball hits a paddle, for instance, simply reverse the x speed, or if the ball hits the wall, the y speed (just multiply the value by -1). Also, to increase the ball's speed, you could try something like this:

move_x# = move_x#+((move_x#/abs(move_x#)*.2)

That way, it adds to the speed whether it is positive or negative (I think, I haven't tested it)

Hope this helped!
-H4ck1d

Blastwave man
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location: ...don\'t look behind you.
Posted: 20th Jun 2007 14:10
thnxs for the input...i'm working on the revision, then i'll release and be happy then on to my next small project, Blast Tanks

BWM


"I wish I was a wizard, becuase then I could wave my wand and perfect code would just appear."

Login to post a reply

Server time is: 2024-09-29 20:33:55
Your offset time is: 2024-09-29 20:33:55