Artificial Intelligence?

JenguinieJenguinie Member Posts: 4
edited November -1 in Working with GS (Mac)
I'm trying to make a turn based two player game that would have a few different modes of play. One mode would enable you to play against the computer. How would I make this possible? Also, another thing I need for my game is to be able to connect dots by touching a dot other than the one that your player happens to be on. This would make the player move. Anyone know? Thanks.

Comments

  • Asobu_GamesAsobu_Games PRO Posts: 261
    What type of game is it? Turn based RPG? You could always use random attributes to simulate thought/intelligence. For example: If the player selects 'attack', the computer player could have a 40% chance of defending, 20% chance of counter attacking, and 40% chance of getting hit.

    To do this basically you could have an attribute (integer) called 'response' (or whatever you wish to call it). When the computer player is attacked, change attribute game.response to a random number between 1 and 5. Then have rules on the computer player actor like: if game.response = 1 or 2, take the hit (lose life, play hit animation). If game.response = 3 or 4, defend (no loss of life, play defend animation). If game.response = 5, counter (no loss of life, inflict damage, play counter animation)

    Does this make sense?
  • Asobu_GamesAsobu_Games PRO Posts: 261
    Also you could make the computer player get smarter/tougher over time or as levels progress by changing the percentages. On stage 1 the computer could have a 10% chance of defending, but this could change to 90% by the final stage for example. Just a thought.
  • TeamLava8TeamLava8 Member, BASIC Posts: 294
    To move a character to another dot that is pressed is pretty simple.

    Give each dot a seperate x and y coordinate game attribute, for instance
    1x and 1y and a seperate attribute for move that would be a boolean called dot1
    Inside the dot actor change/constrain attribute game.1x to self.position.X and game.1y to self.position.Y

    When you press on the dot create a rule that says when pressed change attribute dot1 to true.
    then inside your character actor create a rule that says: when attribute dot 1 is true
    move character to game.1x and game.1y

    I hope this helps!

    Jason

    Making the world better one pixel at a time!


    My Website
    Over 70 AWESOME Gamesalad Templates by me!
    HIRE ME!

Sign In or Register to comment.