Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as not a real question by bummzack, The Communist Duck, Noctrine Jul 12 '11 at 15:26

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This is too vague. -1. – The Communist Duck Jul 12 '11 at 11:34
What do you want to randomize? Behavior? Look? Time of appearance? You have to be way more specific. – bummzack Jul 12 '11 at 11:34
To answer the question in the title: sprite.x += rand()%100 - 50; sprite.y += rand()%100 - 50 – thedaian Jul 12 '11 at 12:05
Your new (see: edited) question has an entire field of related study, I suggest you show us what you've tried first. – dcousens Jul 12 '11 at 12:31
@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. – thedaian Jul 12 '11 at 13:16

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.