Jump to content

AI Logic ?


rtlehr
 Share

Recommended Posts

Hey All,

 

     So, I'm creating a simple "Defender" like game as my "Learn Phaser and game development" project.  I'm going to have a hero ship, humans, and UFO's.  The basic premise is the hero needs to shoot all the UFO's before they can abduct all the humans (and do all kinds of nasty things to them). 

 

I have a "world" class that creates the Hero, Humans and UFO's.  The world class is intended to keep track of the game and allow all the entities to be connected to each other.  The logic for the ufo's is simple.  If there is a human that does not have a UFO trying to abduct it, go after that human, but if all Humans are taken by a UFO, then go after the hero ship.  My question is, Should the AI for the UFO live in the world class, or the UFO class?  In other words, should the world class look at what is going on and then tell the UFO's what to do, or should the UFO look at the world (are the humans all taken) and then decide for itself what to do and let the world know?

 

If there is a site that gives info about AI I'd love to have a link.  Also, I know this is not really a "Phaser" question, so if this is the wrong spot for this post, I'll happily move it.

 

Thanks!

Ross

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...