Help with artificial intelligence

SantivinSantivin Member Posts: 25
edited February 2014 in Working with GS (Mac)
I have a multiplayer platform game, and I want to make the second actor (computer opponent) try to score me goals.
I know this is called Artificial Intelligence and is not an easy trick to use, haha hope you can help me :P

PS: Sorry for bad english

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's what we need from you:

    1. A sketch or screenshot of what the game looks like.
    2. A description of how you score goals.
    3. A description of how you want the computer to act (always shoot in a straight line, etc.).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SantivinSantivin Member Posts: 25
    edited February 2014
    Here's what we need from you:

    1. A sketch or screenshot of what the game looks like.
    2. A description of how you score goals.
    3. A description of how you want the computer to act (always shoot in a straight line, etc.).



    This is what i want to imitate:
    http://www.minijuegos.com/juego/1-on-1-soccer

    When you choose your teams make sure to check COMPUTER, to see how the Artificial Intelligence in the game works
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So from what I saw, the computer just chases down the ball, moving along the x-axis, and then "kicks" it to the left. Shouldn't be too hard to do with GameSalad. You could use a collide/bounce behavior or fake it and make the ball move to the left (180°) when the computer player collides with it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SantivinSantivin Member Posts: 25
    So from what I saw, the computer just chases down the ball, moving along the x-axis, and then "kicks" it to the left. Shouldn't be too hard to do with GameSalad. You could use a collide/bounce behavior or fake it and make the ball move to the left (180°) when the computer player collides with it.
    Yes, the opposite character just has to chase the ball. But also jump on it, to make it go to the opposite direction.
    I know it shouldn't be hard but the thing is I'm just a noob so I don't have any idea of how to make actors move themselves. Could you explain me how to do that, or do you know any tutorial or something to learn about Artificial Intelligence?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Even though you're not building exactly this type of game, I would recommend starting with this tutorial to learn some of the basics of GameSalad. Some of the methods will apply to your game.

    http://www.jamie-cross.net/?portfolio=gamesalad-recipe-001-basic-platformer-movement

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SantivinSantivin Member Posts: 25
    Even though you're not building exactly this type of game, I would recommend starting with this tutorial to learn some of the basics of GameSalad. Some of the methods will apply to your game.

    http://www.jamie-cross.net/?portfolio=gamesalad-recipe-001-basic-platformer-movement
    Thank you, but what i meant with "noob" was that I'm a noob with Artificial Intelligence stuff. I've already made the basic movements of the game (even put some graffics and more), but I'm stuck with making a character that is not controlled by keys (a character with Artificial Intelligence)
    So I was asking for tutorials or some help with AI similar to the game I showed you

    PS: I'm sorry my english is not too good :P
  • SantivinSantivin Member Posts: 25
    So I think the real question would be. How to make a platform actor to chase a ball and try to score a goal with it?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    AI is difficult to do. As I see you just joined recently you might try spending more time learning the software and how to fluently code in it before you attempt AI. I've been programming with GS for four years and it took me two months to develop a proper AI for our game Puck It. You're question is more complex than you think.
  • SantivinSantivin Member Posts: 25
    AI is difficult to do. As I see you just joined recently you might try spending more time learning the software and how to fluently code in it before you attempt AI. I've been programming with GS for four years and it took me two months to develop a proper AI for our game Puck It. You're question is more complex than you think.
    Thanks for your reply. I know it is really hard, but I've got almost everything in my game and the only thing missing is the AI :P
    So, is there any videotutorial that I can watch or something I could read to learn?
    Or maybe if someone could explain me a few things to make a similar game to that one, thanks again :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Every AI is different and it's really just a mixture of coding techniques. I have a video on my site of some really basic AI. Click the link in my signature to go to my youtube site.
  • SantivinSantivin Member Posts: 25
    Every AI is different and it's really just a mixture of coding techniques. I have a video on my site of some really basic AI. Click the link in my signature to go to my youtube site.
    Thanks a lot, I'm gonna check your videos first.
    Do you think I'll be able to make a game like this in a few weeks or is it way too hard for a beginner?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    My first game with GameSalad took me 60 hours. I have a programming background from college but hadn't used those skills in 15 years so I was a bit rusty. Still, I understood concepts and just needed to figure out how to apply them in this "language." I also have a strong math background, good communication skills, and I'm a teacher and use GameSalad with my students. I'm not bragging... I'm just letting you know what I came to the table with. And it took me 60 hours. For a pretty lame app. But I was proud! And along the way I learned how to use GameSalad quite well. It then took another 12-18 months before I felt rock solid and could start building just about anything. That's not to say I don't struggle... coding is always a struggle but it gets easier and easier.

    Anyway, I don't know if you can make a game like that in a few weeks because it depends on so much. A few weeks could be a few hours or it could be your full-time job and you'll pass the 60 hours I spent in the first week or two. Maybe you're coming from a different game engine and you just need to learn the syntax around here. Or maybe this is your first foray into game design and development. So like I said, it all depends. Have fun!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SantivinSantivin Member Posts: 25
    My first game with GameSalad took me 60 hours. I have a programming background from college but hadn't used those skills in 15 years so I was a bit rusty. Still, I understood concepts and just needed to figure out how to apply them in this "language." I also have a strong math background, good communication skills, and I'm a teacher and use GameSalad with my students. I'm not bragging... I'm just letting you know what I came to the table with. And it took me 60 hours. For a pretty lame app. But I was proud! And along the way I learned how to use GameSalad quite well. It then took another 12-18 months before I felt rock solid and could start building just about anything. That's not to say I don't struggle... coding is always a struggle but it gets easier and easier.

    Anyway, I don't know if you can make a game like that in a few weeks because it depends on so much. A few weeks could be a few hours or it could be your full-time job and you'll pass the 60 hours I spent in the first week or two. Maybe you're coming from a different game engine and you just need to learn the syntax around here. Or maybe this is your first foray into game design and development. So like I said, it all depends. Have fun!
    Thanks a lot for your words. For sure I'll try and see what happens haha. Good luck :D
  • SantivinSantivin Member Posts: 25
    First I'll explain you a few facts about my game:

    I'm working on a platform soccer game with only two players, so the objective of course is to make goals. I've already set all the movements of the game and even some graphics.
    I decided to start working with the artificial intelligence of my enemy.

    So I need to play against the computer, and I have to work with artificial intelligence for this. These are the movements I need to make:

    -The enemy has to chase the ball. I think it's made by constraining his X position as well as the ball's X position.

    I've already made this but now I need the enemy to face the direction where he is going.

    These are the other things I need to make and I would be very pleased if you could help me

    -Make the enemy jump if the ball is in the air and near to him (to the left or right)
    -Make the enemy take the ball to his side
    -And finally make him to score.


    PS: Sorry if my english is not good
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Please don't start new threads for the same issue.

    [merged]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SantivinSantivin Member Posts: 25
    Please don't start new threads for the same issue.

    [merged]
    Sorry, still getting used to the forum.
Sign In or Register to comment.