Jump to content

PONG!


Wolfwood

Recommended Posts

If your Houdini session is idle and you are bored why not play some Pong with the guy down the hall. :D

pongIcon.jpg

pongGame.jpg

pongOptions.jpg

And here is the Pong OTL. :ph34r:

If the first time you play the paddles act a little iffy just play through it, it should go away. If it doesn't just stop the game (animation), go back to frame 1 and try again. If that doesn't work try to hit reset a few times. :P

I'm going to sleep now..... -_-

jim.

Link to comment
Share on other sites

Before I pass out I just want to note that there are some examples of "opdef:" in conjunction with parameter callbacks in the OTL.

OTLS are SOOOOO cool. There are two tiny little scripts bundled in and using "source opdef:/Object/pong10?xxxx" I can call the little monkeys.

I need to go into Side Effects and start buying these people lunch. :P

jim.

Link to comment
Share on other sites

"b"? oops.... I'm fired.

To be honest I had a score keeping function and also if the ball went out of bounds it would flash game over and reset the game. But with this extra stuff the game slowed down a lot. Then again it might just be my computer. :P

I'll tweak it tonight. And release the OTL again. = )

jim.

Link to comment
Share on other sites

One of the main reasons I do these silly things is to test Houdini. The end result is good, but if Houdini gets improved because of it than thats great. Basically Pong is just another attempt at dredging up user and Houdini bugs. :P

jim.

Link to comment
Share on other sites

Ugh... I love OTLs but without being able to use custom expressions its making things tough. :(

Regardless I got it mostly working with scoring and automatically ending the game. At which point you need to hit "r" to reset.

Issues:

The paddles when first used are still acting strange. Some setting I must be overlooking.

Sometimes a CHOP network won't cook. Which means my little logic scripts don't get run. I tried to force the CHOP network to cook by exporting it to a null. (Just so you know why its there.)

There are probably half a dozen other things too. :P

I attached the working hip file istead of an OTL.

jim.

Pong.zip

Link to comment
Share on other sites

that is simply smooth!

mucho mucho fun!

did i say yet that it was really cool?

how about adding in single player where the computer paddle follows the ball?

ball is the leader, paddle is the follower constrained to the Y axis with a speedlimit on Y-axis movement. now, if only we could hook up those old-school paddles instead of using the keyboard... :)

will

Link to comment
Share on other sites

I could set it up to use take a mouse input instead of keyboard.

Not a paddle....but it beats a keyboard.

I'm gonna try Jason's idea and network it. :D

I'll work on it later this weekend.

I wanna get back to my SSS shader for a bit. <_<

jim.

Link to comment
Share on other sites

so, in order to make single player a bit more challenging than the wave function ;), i added a tiny bit to phong pong... however, it isn't working as i would expect and as the manual states...at least, the way i am understanding it heh.

in the attached hip, i added a point sop in the ball object with a ty that references the centriod of the ball. using this, the idea was to fetch it into chops and add a small delay so that the computer paddle would follow the Y position of the ball with a little "human-like" delay :)

hit play and you can see that the centroid expression is correctly extracting the Y position of the movement of the ball; however, the fetch chop doesnt seem to be picking up anything. anyone have any idea why this is happening?

cheers to the ultimate pong game!

will

a few more ideas for the mix

Pong02.zip

Link to comment
Share on other sites

hit play and you can see that the centroid expression is correctly extracting the Y position of the movement of the ball; however, the fetch chop doesnt seem to be picking up anything. anyone have any idea why this is happening?

I had tried a variation of this. I also tried a geo. chop to fetch the point position etc. I think the problem is a infinite recursion error. Either nothing happens or the CHOP spits out and error.

My guess is this...

To do a proper collision with the right paddle the collision POP needs to know where the paddle is. However the CHOP controlling the paddle is asking the POP what position it should have indirectly through the SOPs.

_POPs -> SOPs -> CHOPs -> POPs _

|_____<_____<____<_____<_____|

What came first? The POP or the CHOP?

:rolleyes:

jim.

Link to comment
Share on other sites

Ok, I just watched a Godzilla movie so I got all motivated and proceeded to kick around CHOPs till I got it to work. :ph34r:

I used a geometry CHOP to fetch the ball's position.

Then I used a record chop so I could keep the animation data.

Then appended a feedback chop so the chain would be using the previous frame's data to prevent the infinite recursion error.

Next I slapped down a lag CHOP. (My favorite CHOP of the week).

Then exported.

I added an additional parameter to the Pong OP called Computer Skillz. It controls how strong the lag is. I added a couple of other export CHOPs to the record and feedback chops in order to force them to cook.

So now single player mode should acutal be half interesting.

On to networking so Jason can school Marc. ;)

jim.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...