views:

165

answers:

2

I need to implement a feature in my application where these words are going to "swim" around in the background, basically I need to pick a point in front of the leading letter of the word, and swim to it using a "wavey" style.

I also need to avoid the walls, so it turns in time, among other 'fish like' behaviors it needs to implement.

I'm sure I need to do something with a sin calculation, but I really want it to be efficient, I'm using C#, but any language implementation will be insightful.

What resources are out there for implementing this in C#?

+3  A: 

one classic flocking simulation you could take a look at would be Boids

Jimmy
that is cool, although I would only be using 1 fish...
Mark
oh, I misunderstood. I thought the letters would move semi-independently.
Jimmy
ha, that would actually be cool though! A swarm of letters...
Mark
A: 

I've done something vaguely similar, where a series of letters animates based on the movement of the leading letter. It is mouse trailing, and not so much fish swimming, but the approach could be made to work as the positional offset decays as a function of the distance from the leading character.

It's MFC/C++ and is located on codeproject.

dkackman
cool, thanks Ill take a look at it!
Mark