playMaker

Author Topic: sphere of influence  (Read 2836 times)

TonkRogerio

  • Playmaker Newbie
  • *
  • Posts: 24
sphere of influence
« on: December 08, 2013, 08:40:14 AM »
How would I go about creating a sphere of influence much like the ones in endless space. They need to be able to push each other as well like if city A becomes more influential than city B and they are touching borders, then city A's borders will start pushing city B's borders.

Like this- http://techgage.com/reviews/gaming/endless_space/endless_space_16.jpg

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: sphere of influence
« Reply #1 on: December 09, 2013, 01:14:45 PM »
Hi,

 It would require a quite involcing algorythm if you want to do that mathematically.

 If you want to use physics, each node, would have a spring joint set to be very slow and loose, and you would let the colliders do the job. Each node would have a sphere collider. I would play around changing the size of the sphere colliders so that creating a new node has a collider of size 0 and then gradually increase the size so that the physics doesn't "explode".

 I would also test this using the new 2d physics, I would tend to hope it would be more performant then using the full 3d physics.

If you find an open source of such distribution algorythm, I will be quite happy to add this to my list of things to port, it's been something I tried to create properly for years...


Bye,

Jean