User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: AI - Basic Principles

  1. #21
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Yeah, that's what I do, using fastloop to make the bullet instant. I also use an enemy-sized one and fire that at the same time. If the tiny one hits the player, he can shoot. If the bigger one hits the player, then there's space for the enemy to run to his location.

    This way, you can give the AI more options (e.g. run at player guns blazing if the path is clear, or just stand still and shoot if there's just a small gap)



  2. #22
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2006
    Location
    Oregon, United States of America
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    What is everyone's opinion when it comes to using a random number generator based on a clock when the computer is making a decision, if the variables determining the action are in a certain range of being to close? Would this not add a layer of humanity to the equation? Because after all humans do make an occasional wrong decision only because they had to make a split second decision. Couldn't you take it even a step further by building behavior that records previous actions, and prevents the the random number generator from creating a same number ever so ofter? Just an idea.

  3. #23
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    It could do possibly, you'd need to test.

    I find it preferable to add personality types which are selected at random at the start. So you may have three main types, say:

    Gung-Ho
    Normal
    Cowardly

    Gung-Ho will run out even if it's dangerous; Normal will act the most wisely; Cowardly will favour self preservation and attack from behind cover, won't take risks.

    I find this looks a little better, cos otherwise randomising the results could make it do some REALLY stupid stuff otherwise, lol.

  4. #24
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    If you have to choose between multiple options, filter for the ones most likely to suceed (eliminate stupid / pointless options) and pick a random one from the top candidates. This leaves room for the element of surprise / makes the character less predictable, while still being somewhat reliable / unstupid.

    Leave it to the player to rationalize why the enemy/NPC did what it did.

  5. #25
    No Products Registered

    Join Date
    Dec 2008
    Location
    U.S.
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Quote Originally Posted by Sam
    What is everyone's opinion when it comes to using a random number generator based on a clock when the computer is making a decision, if the variables determining the action are in a certain range of being to close? Would this not add a layer of humanity to the equation? Because after all humans do make an occasional wrong decision only because they had to make a split second decision. Couldn't you take it even a step further by building behavior that records previous actions, and prevents the the random number generator from creating a same number ever so ofter? Just an idea.
    Good idea

  6. #26
    No Products Registered

    Join Date
    Feb 2009
    Location
    Texas
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    yep.

    the fun in most games is randoness
    espically in board games.

    with out randoness, all games would require is skill.
    that would be completely boring because you would know what is coming and when it is coming

  7. #27
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Quote Originally Posted by Dines
    Yeah, that would be the 'rotating and rescaling' option.

    Blah...

    The stretch-rotate alternative would be too slow to be taken seriously at the moment, although HWA may well change that.
    Did you notice the Detect Object on a Line Condidition in the Create Object Object?
    Working as fast as I can on Fusion 3

  8. #28
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Yeah, but it only has a limited use since it still doesn't check if there's an obstacle between the selected objects or not.

    The quickest method I found was to create one detector per bad guy and fire them simultaneously, using a percentage as their step (so after, say, 100 loops, they've all hit their target).

    So you get about 100 fast loops and the rest is done with object selection. I did a LOS test using various techniques and got the following results on my PC:

    Code:
    Fastloop + Object Looping:  217 - 240fps
    Fastloop + VectorialShape:   15 -  70fps
    Fastloop + MoveSafely 2:     47 -  86fps
    You can try it out yourself (see attached).
    Attached files Attached files

  9. #29
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Nice example, Dines.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  10. #30
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: AI - Basic Principles

    Thanks a bunch Dines.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. basic iso and pathfinding example
    By Bigfoot in forum File Archive
    Replies: 0
    Last Post: 22nd April 2011, 02:36 PM
  2. Some basic components
    By Ham in forum dotNet Scripting
    Replies: 2
    Last Post: 3rd December 2010, 09:17 PM
  3. Basic Oscillator Example
    By Atom in forum File Archive
    Replies: 0
    Last Post: 15th October 2008, 02:54 PM
  4. Basic Tutorials?
    By Verd0uX in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 18th March 2008, 06:40 AM
  5. Very Basic i know.
    By kayli051203 in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 18th January 2007, 10:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •