2
\$\begingroup\$

I have Googled for it but there are no ready scripts - as opposed to the same effect on Flash. I have checked the algorithm on The Water Effect Explained and also tested an implementation of the Perlin Noise, which provides a good simulation of the end of waves on a flat surface. I am looking for the same implementation found on several Flash Effects, based on mouseover/hover actions. This is targetting an interactive floor library, and I would enjoy moving away from Flash for this matter, particularly to avoid such easy reverse-engineering of the code - and yes, I know it could just use some ready-made flash code, but I would only use that as a last resort.

In time: Flash effect sample: flash-effects.com/tutorial-create-a-water-ripple-mouse-follow and a valid similar Java effect: Water Simulation using Java applet.

Has anyone seen a suitable implementation of this effect for Pygame (using OpenGL or not)?

The culprit here is the (code) interface to pass a list of values that will be sent from an external interpreter (tracker - not TUIO though) via Python. I have tried for some straight days but Pygame is not able to generate anything as fast as sheer C/C++ code (as used for the shaders in OpenGL), and my knowledge of C/C++ is null. So the target is to at least have that coming from Python code.

\$\endgroup\$
1
\$\begingroup\$

Check this answer (on stackoverflow). It is the same question, asked before posting it here.

Basically, the very core of it is that (1) Pygame isn't suited for the job, (2) OpenGL can do it easily, and (3) that Ogre3D has already provided that with the water demo and also (4) provides Python bindings via Python-Ogre.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.