Jump to content

  • Log In with Google      Sign In   
  • Create Account


How a to abstract character movement....


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 AverageJoeSSU   Members   -  Reputation: 516

Like
0Likes
Like

Posted 18 September 2012 - 10:56 AM

I have a 2D grid with A*... but how to i go about abstracting movement?

I can tell a character to goto(spot) at the most basic level, but i'm not sure what context to give the abstraction. my game at its most basic sense could be described as a dungeon crawler like torchlight/diablo.

Do the monsters "see hero (hero enters sight radius, etc)" and then "Move Toward Hero(finds a path to the hero and takes it)" then "attacks hero (when in range)" .

Is there a better way to abstract monster movement? for example... wandering, exploring, grouping!....

i guess i could replace "hero" with "point of interest" and the AI figures out if the point of interest is a hero and attacks it.

I want this to be simple but not preclude me from doing more advanced stuff later.

-J

------------------------------

redwoodpixel.com


Sponsor:

#2 IADaveMark   Moderators   -  Reputation: 2314

Like
0Likes
Like

Posted 18 September 2012 - 11:20 AM

"Move to" should always be a parameterized function that takes a location. When you pass in the location, you can certainly get that from an object. (e.g. MoveTo(Object.Location);)
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#3 AverageJoeSSU   Members   -  Reputation: 516

Like
0Likes
Like

Posted 18 September 2012 - 12:09 PM

I see, do you think i should be enforcing that my characters strictly adhere to my AStar grid when moving around?

Like moveTo(object.location) would be turned into the nearest grid spot location? or should i just have them "occupy" the gridspot that they are located in.

------------------------------

redwoodpixel.com


#4 IADaveMark   Moderators   -  Reputation: 2314

Like
0Likes
Like

Posted 18 September 2012 - 06:04 PM

If you aren't having them occupy a grid space, then A* is probably not your best choice. Have you looked into a navmesh with local steering?
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#5 AverageJoeSSU   Members   -  Reputation: 516

Like
0Likes
Like

Posted 19 September 2012 - 02:24 PM

I definitely do have them occupying a space right now ie.......

https://pbs.twimg.com/media/A2214V6CUAAZ-D8.png:large

at the end of that path the character "occupies" that grid space. What i was saying is that if I do end up using MoveTo(location) i will have to convert that to a grid space so it an "occupy" it.

I have not looked into that yet...

Right now my system allows an AI to aquire a path to a target and it is notified when it reaches the end of that path. This may break down once the target moves.

I do like the local steering idea (just from some intial searches)... can you recommend any tutorials? Not sure ill do navmesh generation just because that is more complicated than i really need i think. (I dont see myself having a problem with just using a grid of squares.

-J

------------------------------

redwoodpixel.com





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS