Jump to content


Photo

GMCircularField


  • Please log in to reply
3 replies to this topic

#1 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 11 October 2011 - 03:22 AM

  • Title: GMCircularField
  • Description: A simplified flow field for AI avoidance
  • GM Version: :GM81: :GM8: :GM7:
  • Registered: yes
  • File Type: .zip (.gmk :GM7: .gmres :GM8: .dll and source)
  • File Size: 100kB
  • File Link: http://www.host-a.ne...rcularField.zip
Summary
Having trouble making your AIs avoid each other? Designed with the idea I got from this video

http://www.youtube.com/watch?v=jA2epda-RkM

GMCircularField is a dll you can use to avoid all the dynamic characters in the game and even use for walls avoidance, though combining with proper A* path finding (on walls) would yield better overall system.


How it works:
A play field is used to draw regions onto. These regions are like hills on a map. virtual hills. Your AI, while moving to it's target, can simply glide down those virtual hills generated by all characters and the result is a very simple effective AI avoidance system.

Now, this particular dll does not actually draw regions on a field but uses circular regions to define the areas that need to be avoided. The result is very close to an actual flow field.

If you want to see a grid based/surface like based method, version1 can be found here
http://www.gmlscript...?pid=3090#p3090
  • 2

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#2 Prodigga

Prodigga

    GMC Member

  • New Member
  • 2 posts

Posted 14 October 2011 - 12:41 PM

dont know why you dont have any replies yet, its very clever mate. good on ya.
  • 1

#3 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 14 October 2011 - 04:46 PM

This is great. I was wanting something like this and now it is finally here. Awesome !!

Edited by freko, 14 October 2011 - 04:59 PM.

  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 14 October 2011 - 07:49 PM

Playing with the demo, I found out you can ramp the value of the mouse field (say 10) and actually make walls by dropping regions nears each other. You can drop a field, then another right at the border of the first one and so on... So the radius of one touches the center of the other (not really a requirement but that is optimal for smoothness, you can space them out more though; enough to have proper wall avoidance for optimal performance)

Have fun!
  • 2

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button