Jump to content



0

pong physics


6 replies to this topic

#1 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sat Jul 16, 2011 2:28 PM

im bored so i want to make a pong game. how would i make a player0 just a human and player1 a cpu? and how would i make the ball move when it hit the paddles?


please get back

Cheers!
- Forrest Hodges

#2 ScumSoft OFFLINE  

ScumSoft

    Moonsweeper

  • 331 posts
  • Location:Polysorbate 60

Posted Sat Jul 16, 2011 4:16 PM

Like this?

#3 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sun Jul 17, 2011 10:09 AM

is there a simpler way to do it?

#4 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Jul 17, 2011 10:25 AM

View Postesplonky, on Sun Jul 17, 2011 10:09 AM, said:

is there a simpler way to do it?
You can waste whole variables instead of using bits. That's one way to make it simpler.

#5 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sun Jul 17, 2011 11:12 AM

english please?

#6 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Jul 17, 2011 11:21 AM

View Postesplonky, on Sun Jul 17, 2011 11:12 AM, said:

english please?
Variable:

http://www.randomter....html#variables


Bit:

http://www.randomter...mmands.html#bit


I used bits in my example program instead of wasting variables. For example, instead of using a = 1 or a = 255, I used little itty bitty bits to do the same thing. Using a bit instead of a variable whenever you can saves precious variables.

The problem with using bits is that it can be harder for a new user to understand.

Edited by Random Terrain, Sun Jul 17, 2011 11:27 AM.


#7 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sun Jul 17, 2011 11:33 AM

and also i had the ball flashing on different parts of the screen, and i made it to where the other paddle follows the ball, but everytime i move the player0 paddle it makes everything else stop. how do i fix that




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users