Better Waves in java
<p>I'm making a game where the player fires waves(like tidal waves not harmonics) and I have a system in pace where I achieve it moving for a distance and it dies off. It also bounces off of entities (not very well I might add). I want to know if there is a way to make this more realistic and seperable rather than it complete changes.
Here is the curve( I'm using slick2d).</p>

<pre><code>one = new Vector2f((float)referenceX, (float) referenceY);
two = new Vector2f((float) (referenceX + ((width * amplitude) / Math.PI)), (float)(referenceY - (height * amplitude)));
three = new Vector2f((float) ((referenceX + width) - ((width * amplitude) / Math.PI)), (float)(referenceY - (height * amplitude)));
four = new Vector2f((float)(referenceX + width),(float)(referenceY));`
new Curve(one, two, three, four);
</code></pre>

<p>It moves by moving the reference points and extending the width. </p>

<p>here is the collision code</p>

<pre><code>if ((s.player.getBounds().getWidth() / 2) + s.player.getBounds().getX() &gt; 
                (e.getBounds().getX() + e.getBounds().getWidth()) )
{
    this.referenceX = e.getBounds().getX() + (e.getBounds().getWidth() / 4);
    this.referenceY = e.getBounds().getY();
}
else if ((s.player.getBounds().getWidth() / 2) + s.player.getBounds().getX() &lt;
                e.getBounds().getX())
{
    this.referenceX = e.getBounds().getX();
    this.referenceY = e.getBounds().getY();
}
else
{
    this.referenceX = s.player.getBounds().getX() + 4;
    this.referenceY = e.getBounds().getY();
}
</code></pre>

<p>What and how should I fix this to make the waves seem more realistic?</p>
