Patch needs help-bouncing ball

HumanNature's icon

Hey Everyone,

So I finally found out how to upload text-patches on here.

I was hoping someone could take a look at my patch and help me figure out a way to make the ball bounce off the walls and off the paddles when they hit/collide!

Thanks in advance.
Cheers.

[MOD - removed uncompressed patch]

lewis lepton's icon

alright man, word of warning for future posts of text from a patch.

the best way to post text is to select all the patch in the window, and go to edit, copy compressed. it will be a hell of a lot smaller to post and take less space...

HumanNature's icon

for some reason it stays deselected-not allowing me to compress my text.

'm really sorry though.

Rob Ramirez's icon

not to mention, your patch was truncated so we can't even take a look.

0 - make sure your max version is updated, at least to 5.1.0
1 - unlock your patch
2 - select all objects in your patch (Edit - Select All)
3 - Edit -> Copy Compressed

if you are still having problems copying your patch with Copy Compressed, then you need to contact support@cycling74.com

HumanNature's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here it is! I got it:

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

this might get you started...

HumanNature's icon

wow! thanks MIB.
its still pretty confusing, but I'm studying it :)

HumanNature's icon

Hey how do i get the ball to change values vertically? it won't change in terms of "y-axis" at all.

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

not sure what you mean but this works for me:

HumanNature's icon

Hi MIB,
Thanks again for all your help. Unfortunately, that is not what I meant.
I want the ball to change its y value when in motion. Because this is going to be a game between two people, if the ball stays at the same height there will be no challenge. I need it to randomly change *during* the game.

Thank again :)

MIB's icon

well, I can't do your whole project for you :)
I gave you some pointers, showed you how to do some simple collision detection (as did some other people as I saw in your cross posting!!) and how to move your ball up and down. From here you should be able to work out how to do most things you need. If you have a specific problem I will be happy to help. Post the patch with your attempt and I will gladly take a look.

Until then...

HumanNature's icon

haha - you're right.
i'm just nervous, because its due this weekend! I'm trying, its just all new to me.
Until then-thanks again friend!