-4
\$\begingroup\$

I am new to Android, I am developing a fighting game in Android with AndEngine. Now I want my enemies to mimic my player behavior and on base of score they should come up with different tactics.

I need to write an AI script. Please help me in that. I want to make my enemies intelligent that they can destroy my player and also engage him in game too.

\$\endgroup\$
9
  • 4
    \$\begingroup\$ This is too vague. -1. \$\endgroup\$ Jul 12, 2011 at 11:34
  • \$\begingroup\$ What do you want to randomize? Behavior? Look? Time of appearance? You have to be way more specific. \$\endgroup\$
    – bummzack
    Jul 12, 2011 at 11:34
  • 1
    \$\begingroup\$ To answer the question in the title: sprite.x += rand()%100 - 50; sprite.y += rand()%100 - 50 \$\endgroup\$
    – thedaian
    Jul 12, 2011 at 12:05
  • 1
    \$\begingroup\$ Your new (see: edited) question has an entire field of related study, I suggest you show us what you've tried first. \$\endgroup\$ Jul 12, 2011 at 12:31
  • 1
    \$\begingroup\$ @Aizaz, people are downvoting your question because writing an AI script is a huge chunk of work, and isn't something that can be answered on a site like this. \$\endgroup\$
    – thedaian
    Jul 12, 2011 at 13:16

1 Answer 1

1
\$\begingroup\$

Given the amount of information in your question.

Run a random number generator. Input that value as a parameter to a function that generates parameters for your characters based on the input value.

Then use those generated values as construction information for your enemy character factory.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .