Been a long while since I posted here, thought I'd swing by again
I've been following Kev's blog on 2D lighting, and and have implemented my own class for lighting. Its looking good, once I've debugged it a little I'll share.
While I was implementing lighting, I decided to tinker with flocking, so I also implemented a flocking system using something I wrote a while back in C# using the XNA library. Combining lighting and flocking gave me some eye candy of which I am very proud.
Check it out:
The sprites must pursue my cursor (which you cannot see.) Sprites also must avoid the red circles when within 100 pixels, while trying to keep an average of 50 pixels between one another. Lastly, each sprite isn't allowed to change its heading from time step to time step by more than 1 degree (this forces nice smooth turns.) There are 100 sprites and I don't know how many circles. Lets call it 75. The FPS is an easy 60.
I know many people know this, but for those who don't...
Flocking allows entities to move in relation to one another. When combined with A* pathfinding and obstacle avoidance, flocking can be used to create groups of enemies moving in swarm-like behaviors. The results are impressive. Its something 2D engines could really use imo. Flocking systems rival particle systems in their "awe" factor. (Flocking systems are close cousins to particle systems.)
My code runs on my "engine." Its a hybrid between Slick and GTGE (ie there's a Java2D fallback, more background management etc.) Its in its infancy, and buggier than either I'm sure. Because of this I want to review it before I post my code, maybe rewrite it just for Slick.
I also plan to implement an abstracted adversarial search system for Slick users interested in puzzle games. Flocking and adversarial search are the only things I've noticed 2D game engines never seem to have.
But anyway, Hi Slick community. Hopefully I'll be haunting your forums often.