Java Game Programming for Beginners - #17 - Smart, Path-Finding AI

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,550
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 20, 2011

Source code: http://www.thejavahub.net/forums/index.php?topic=9.msg367#msg367 Please ask any questions you may have in the comments or leave them on the forums http://www.thejavahub.net/forums

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (TheJavaHub)

  • I recently stumbled upon your tutorials and i love them but there is one thing that would make me love them even more... if you would make the tutorial on AI that will find a path around objects and such. I've been thinking of ways to do this for a while now and I just can't seem to find a way to do it.

  • @Enigma7995 Maybe soon I will make an AI tutorial like that but if you want more information visit the forums and ask :)

  • Will Colisions Stop The ''Enemy'' to Follow me ? I'm creating an 2D RPG a bit like Zelda.

  • @raoskidoo15 How do you mean? Collisions with your player?

  • Sorry I feel like I'm spamming this video with comments but is this the latest one because I can't find num 18 if there is one?

  • @JackoLlamaGaming This is the latest one so far. Subscribe to make sure you see the latest ones :)

see all

All Comments (19)

Sign In or Sign Up now to post a comment!
  • Im trying to make a game too, in my game its pretty much like this, but the player and the enemies can only move on the black (just made a picture in paint with black paths and spaces) can you tell me which methods to use or something? Or will there be a tutorial on that soon?

  • @raoskidoo15 If he hadn't answered yet: No, the enemys will not be stopped by collision. They still try to reach you (They would run into walls, if you stand behind the wall for example)! But you could make a boolean hunting; when true they try to reach the player and if they collide with something its false, they will stop hunting you. !for example! ;D

  • @TheJavaHub I'm pretty new to Programming , but I understand almost everything in your tutorial. I did the same code as you ( the minecraft game ) But I will change the graphics to a 2D game like Zelda. There will be houses and trees. I want to know if Colisions will stop my Player from passing through the Houses and the samething for Mobs

  • @AngelDouche66

    Think about the logic a little bit :)

    While(Destination)

    Do this

    if (player and enemy == the same location)

    Destination = false

    does that help?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more