codevinsky Posted April 24, 2014 Share Posted April 24, 2014 I just created a little experiment that I'm considering rolling into a plugin that would allow you to give flocking/swarming/seeking behavior to your groups: http://phaser-swarm.herokuapp.com/ Any interest? jpdev, kass and drhayes 3 Link to comment Share on other sites More sharing options...
turnA Posted April 24, 2014 Share Posted April 24, 2014 Hmm, I think it depend on what it actually do.Will the plugin make group to swarm something automatically? I think it will be cool for effect/particle, but not flexible for game usage.If it can also control/provide information based on velocity/direction based on seeker, target, and various parameter, I think that will be really useful (and I will use it on my games ) Link to comment Share on other sites More sharing options...
codevinsky Posted April 24, 2014 Author Share Posted April 24, 2014 The plugin will basically convert any group to a flock and you can set either a single seek gameobject as a seek target, or a group of items as seek targets. I updated the code on the demo to show the group seeking functionality. You'll also be able to set the alignment, cohesion, and separation values, as well as speeds and seeking weight. Link to comment Share on other sites More sharing options...
4ucai Posted April 24, 2014 Share Posted April 24, 2014 that's cool bro Link to comment Share on other sites More sharing options...
OpherV Posted April 24, 2014 Share Posted April 24, 2014 That's a cool idea.Although to be useful for games it needs to take into account parameters for each item in the group such as velocity, acceleration, max speed, turn rate etc Link to comment Share on other sites More sharing options...
codevinsky Posted April 24, 2014 Author Share Posted April 24, 2014 That's a cool idea.Although to be useful for games it needs to take into account parameters for each item in the group such as velocity, acceleration, max speed, turn rate etc How exactly do you mean? Link to comment Share on other sites More sharing options...
OpherV Posted April 24, 2014 Share Posted April 24, 2014 Well usually game characters have parameters to control their steering behaviour. So enemy of type a might not have the same properties as enemy type b. Different speed, turn rate etc.An optimal flocking algorithm would take these into account Link to comment Share on other sites More sharing options...
codevinsky Posted April 24, 2014 Author Share Posted April 24, 2014 Of course. The swarm plugin would allow you to set the parameters for a given swarm.Right now, all of the parameters are hard coded for development's sake. It's not even a plugin right now, just a tech demo. Link to comment Share on other sites More sharing options...
jpdev Posted April 24, 2014 Share Posted April 24, 2014 It's hypnotizing to watch and figure out what's happening.Nice how the swarms divide when ever two targets spawn.. and how they merge again later.So absolutely a great demo - but I personally do not need it as a plugin. Link to comment Share on other sites More sharing options...
codevinsky Posted April 24, 2014 Author Share Posted April 24, 2014 I updated it so you can click to add food for the fishes. jpdev 1 Link to comment Share on other sites More sharing options...
Recommended Posts