Jump to content


Photo

Smooth Pathfinding Function V2


  • This topic is locked This topic is locked
31 replies to this topic

#1 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 09 November 2007 - 02:39 PM

Smooth Pathfinding Function V2

Download the GEX together with an example

A small function a made i while ago now.
It allows some object to move around smoothly while still pathfinding.
It uses mp_potential_step(), which means it can be customized with mp_potential_settings().
This also means that it SHOULD ONLY be placed in a Step Event, since it only PERFORMS a step towards the goal once per step :lol:
More information available in the help file.
Try it and remember: COMMENT AND RATE!

GIVE CREDIT: AI movement system by Fede-lasse

Edited by KC LC, 02 February 2009 - 09:16 PM.

  • 0

#2 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 10 November 2007 - 06:27 AM

Wow Sounds Just like wat I was looking for :P
Hmm.. I tried abit of tweaking cud do the trick :P hmm if you could make it less sensative then 0 would be cool but ive goto test in my game first it could be alright!

Edited by Krisando, 10 November 2007 - 07:21 AM.

  • 0

#3 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 10 November 2007 - 10:23 AM

I you've noticed the text in the upper corner, it says: Press Up and Down to change the smooth factor.
The smoothfactor is a number witch means the higher, more sliding up walls, but the smaller, the more precise moving around and garanteed found.
  • 0

#4 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 11 November 2007 - 02:12 AM

I saw that :GM063: yea that works hmm it may work better with nt so many boxes xD and very good for precise collisions! :)
  • 0

#5 Lord Alfred

Lord Alfred

    GMC Member

  • New Member
  • 322 posts

Posted 16 November 2007 - 06:37 AM

Pretty nice, well explained tutorial 9/10.
  • 0

#6 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 16 November 2007 - 07:38 AM

That's because i originally wanted to post it in Tutorials And Examples, but i quickly found that it didn't belong there.
And when posting Examples there, you normally have to explain everything to the last bit, and so i did here.

Edited by Fede-lasse, 24 November 2007 - 09:33 AM.

  • 0

#7 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 27 November 2007 - 07:50 PM

3 bumps.
  • 0

#8 blue123

blue123

    GMC Member

  • New Member
  • 365 posts

Posted 30 November 2007 - 08:46 PM

This is quite nice really. But will it work in an environment where everything's different shapes and sizes and not just squares?
  • 0

#9 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 30 November 2007 - 10:30 PM

Sure.
It uses mp_potential_step() ;)
  • 0

#10 Nuclear

Nuclear

    GMC Member

  • New Member
  • 134 posts

Posted 07 December 2007 - 08:04 PM

witch = a female sorcerer or magician
which is the word you ae looking for.
  • 0

#11 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 07 December 2007 - 09:06 PM

Okay, thanks.
I'm from Denmark, so uh :GM7:
  • 0

#12 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 23 December 2007 - 07:26 AM

Bump, i see that this begins to fade in the shadows :blink:
  • 0

#13 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 24 December 2007 - 08:51 PM

I honestly don't see why this isen't getting many replies, it's great! Next time I start a serious game project (probably some time after Christmas) I'll have to use this for the AI pathfinding!

Tim
  • 0

#14 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 24 December 2007 - 10:28 PM

I honestly don't see why this isen't getting many replies, it's great!  Next time I start a serious game project (probably some time after Christmas) I'll have to use this for the AI pathfinding!

Tim

<{POST_SNAPBACK}>

Well, thank you for doing that :), i mean, if this appeared on page 12-15, people would never had the chance of trying this :D, not that i'm selfish, but you get what i mean.
Also, i'm using this a lot myself, even in a game i'm currently making! -_-

Edited by Fede-lasse, 24 December 2007 - 10:29 PM.

  • 0

#15 Splayer

Splayer

    GMC Member

  • New Member
  • 130 posts

Posted 03 January 2008 - 06:25 AM

bump. Seems interesting. I'll edit this once i try it out.
  • 0

#16 Splayer

Splayer

    GMC Member

  • New Member
  • 130 posts

Posted 03 January 2008 - 06:38 AM

too bad the game i'm working on isn't ai intensive. This would work wonders for and RTS. I noticed the occasional glitch where one of the units would move in the opposite direction for a second or so, but overall, it worked very well. 9/10
  • 0

#17 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 03 January 2008 - 02:00 PM

too bad the game i'm working on isn't ai intensive. This would work wonders for and RTS. I noticed the occasional glitch where one of the units would move in the opposite direction for a second or so, but overall, it worked very well. 9/10

<{POST_SNAPBACK}>

This is caused by mp_potential_step() which makes an object do these kind of things, because in truth, the object is blind, then the function comes in and makes the object check for a random chosen direction between right or left to check if the way around is there.
EDIT: Oh, well, it's because the walls are placed so thight :lol:

Edited by Fede-lasse, 12 February 2008 - 09:32 AM.

  • 0

#18 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 14 February 2008 - 09:57 PM

Yay! Just finished V2! Check first post!

- Fede-lasse
  • 0

#19 >Leroy222<

>Leroy222<

    GMC Member

  • New Member
  • 473 posts

Posted 22 February 2008 - 12:02 AM

I'm a little confused... Is this a rewrite of potential_step? an a* potential_step merge, what??
  • 0

#20 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 22 February 2008 - 01:10 PM

Yeah, you can say that.

It's mp_potential_step() with some motion planning functions in it, so you should consider it as a faster alternative for mp_potential_path(), which crashes if you don't use it right (mp_potential_path())

If you're still confused, try it out and experiment with it... :D

- Fede-lasse
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users