The hunt for the ULTIMATE PLATFORMER AI!

0 favourites
From the Asset Store
With this template you can create your next super cool Tower Defense game!
  • What you look for is a Recursion allgoritme. (with min/max)

    Here is a good start for you: http://www.devshed.com/c/a/Practices/So ... Recursion/

    Now i have to say that i tried recursion in construct in de form of a 4connect AI. I found myself to dumb to complete it. And i abandonded it.

    I found one thing though, in my attemped. The way you can add variables to the function object, loop trough them, clear them easy, call them easy is a BIG help in recursion solutions. If i only had the right background in programming, i woulda finished it.

    Ashley, you have the right background and the backbone. I would love to see a recursion tech demo. Maybe i would be able to understand an use it.

    j0h

  • Edit: Holy crap, it only just occured to me how OLD this thread was. However, I believe gravedigging topics is fine as long as the poster brings in something meaningful.

    The way I see it, you could use two possible techniques for achieving a proper path-finding result:

    1) A*. A*/A-Star is a very, very effective algorithm. The RTS plugin uses A*, so it MIGHT be possible to use said plugin to determine path-finding and how the AI will respond to the environment around them. I'd imagine it could take a bit of work, however.

    2) Cheat. I've Google-searched platformer AI, and I noticed this particular thread, and a few of the guys there are encouraging techniques that make the AI look smarter than it really is, eg, using additional objects that the AI uses as information about the environment around them.

    Basically, it depends on how you want to go about it. However, an A* path-finding behaviour for platformers certainly would come very much in handy, might wanna keep it separate from the platform behaviour, though, in case someone (like me) is using the Custom Movement Behaviour instead.

  • I've learned some things from this thread so I won't fault you.

  • fake it, going for some A* system would work well for sure, but its definitely way more complicated than it needs to be. keep it simple.

  • ^this

    I was talking in chat about this, and suggested Python as a possibility.

    There's tons of stuff existing for sorting, and there's probably a lot for A* as well.

    But the thing is that wont take into account your movement.

    Yes it could find this node to that easy as pie, but how would it know when to jump, and at what speed?

  • fake it, going for some A* system would work well for sure, but its definitely way more complicated than it needs to be. keep it simple.

    It depends on the game. If you had an enemy in Castlevania that would chase you throughout the entire castle (or a pretty large area), you'd probably need A*. Other than situations like that, there might be simpler methods.

    Also, I'd like to mention, a "one size fits all" plugin would probably have issues with "fitting all." The A* would work for everyone, but everything else could vary quite a lot in how it needs set up for each game. I'm not sure how it'd work with the non-A* side of things.

    ^this

    I was talking in chat about this, and suggested Python as a possibility.

    There's tons of stuff existing for sorting, and there's probably a lot for A* as well.

    But the thing is that wont take into account your movement.

    Yes it could find this node to that easy as pie, but how would it know when to jump, and at what speed?

    There are ways to solve that, but with terrain in certain configurations, it gets tougher and requires a lot more work to set up the nodes in such areas. It's quite dependent on the layout of the level. I'm thinking A* might be the simplest part of the actual pathfinding.

    Back to "one size fits all," since everything varies so much per game (e.g. platformer behavior vs custom movement), I'm not sure how well anything but A* itself could be turned into a plugin. There'd have to be a ton of planning on what EXACTLY it would and would not do. It wouldn't be a magic bullet. Even if a plugin was made, some things are so closely tied to individual games that an A* plus doing all the other events separately would be needed in plenty of cases. It is similar to how custom movement is still used in some platformers instead of the platformer behavior, except it would be an even bigger difference.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • well definitely A* will work for giant levels, but when is it realistic for something on the ground+ to chase that which it cant see. this is a search and chase algorithm, so basically whenever it loses track of what its following it will search, randomly or educatedly.

  • I have used Dijkstra's algorithm for shortest path which enables bots to find their way across a 2D platform game setup. It doesnt use any 3rd party plugins and is all native C2 events.

    At the beginning of the level, the algorithm executes and starts calculating paths between all connected nodes. A static tree is created in a 3D array object.

    The bot then uses this to reach a destination platform given its current platform.

    Play the game here to see it in action: http://www.newgrounds.com/portal/view/694088

    Please help by sharing your comments and feedback at Newgrounds!

    Read more here: viewtopic.php?t=186038

    Sorry, bumping up an old thread, but I see a lot of interest in this...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)