Author Topic: Can someone explain how the default save Pong works?  (Read 849 times)

I want to understand how the default save Pong game moves the paddles. I'm very confused. Could someone explain it to me?

i'm pretty sure it uses printcounts to go up/down and toggles to save the state

No, it uses some sort of toggle events/relay thing

No idea, but i think it's just a lot of 1x1 plates stacked on top of each other, and when you hit the down/up button the event adds glow to a specific brick,while the previous one turn invincible/un checks collision.

Guess i explained horribly.

How it works, well I suppose that it uses alot of "onProjectilehit" since the pong is sort of a projectile. Then it uses the AddVelocity. It's my theory. Honestly i'm impressed that they made the game pong without using variables.

Okay, I understand it now. It has to do with four lines of bricks; two for each pong paddle, and each one either to make the paddle go up or down. They do this by enabling/disabling events on the next two ways it could go, either the next up or the next down. When you click for a paddle to go up, it fires relays to all the up bricks for that paddle, and then it disables the other direction it could have gone, down. The paddles are the easy part; if has either not paddle events toggled, or paddle events toggled. When it has the paddle part enabled, it reflects pongs, otherwise it explodes them and does incrementPrintCount by 1 for the other player's score. When it overflows, it makes that player win and turns the pong projectile spawner off. It might sound a bit confusing, but just look at the events for a while.

Anyways, using events like this for my game, (which has a 12x1 plate on which you can move your 'paddle') I can't figure out why it keeps making two extra paddles on the side. If anyone thinks they can help me, I'll give you the save.

Forget that! It works, after two days straight of sitting at my computer learning how Pong works!

ok, if you need any more help, I can make a demonstration of how i'd go about it

using print counts to go up/down is a pretty easy way to do it