Post news RSS Apparatus - AI scripting test

AI scripting test - robots go patrolling, each goes to its area.

Posted by on

This time I want to show how easily we can programe robot (see how to programme robots here). Below is the video showing behaviours of robots using AI algorith. All robots has the same simple AI algorithm (of course numbers 5900 and 7400 are different in each robot):

//Numbers 5900 and 7400 are limits of patrol area and are different for each robot
if (robot.getX() < 5900) {
     robot.turnRight().walkIf('robot.getX() < 5900');
     if (robot.getX() < 5900) {
         robot.turnLeft().walk(1).turnRight().jump();
     }
} else if (robot.getX() > 7400) {
     robot.turnLeft().walkIf('robot.getX() > 7400');
     if (robot.getX() > 7400) {
         robot.turnRight().walk(1).turnLeft().jump();
     }
} else {
     //now robot is in patrol area and walks 15 steps (it can be different, depends on patrol area's size
     robot.walk(15).wait(3000).turnback();
}

The algorithm is executing repeatly none-stop by each robot. This is the effect:

Comments
Vedang
Vedang

Hey! Nice work! Great learning for me!!!

Reply Good karma Bad karma+1 vote
app2d Author
app2d

Thanks. It's great motivation to work for me. :)

Reply Good karma+1 vote
Vedang
Vedang

I am actually new to this community! So it would be really nice of you if you can help me....currently I'm working on Maya(learning modelling,texturing and animation)......So according to you what should be the next step.....

Thanks in advance!

Reply Good karma Bad karma+1 vote
app2d Author
app2d

Hard to say... I don't know what is your goal. If you want to be as good 3d graphic as posible, then always the next step is practicing. I haven't use Maya I'm using Blender, but I think you can try phisical simulation and constrains if you don't and if Maya has them (probably has).

Reply Good karma+1 vote
Vedang
Vedang

I'm more interested in the programming part but I personally feel that I should know the basics. So once I get finished with modelling and all those things I will start with unity. I would like to know which engine do you use.

Reply Good karma Bad karma+1 vote
app2d Author
app2d

I'm a programmer, so I wrote my engine from scratch in Java, but I think You should start with unity, becouse is easier and faster way. I wrote my game from zero, becouse in the same time I learn Java language, but now I've already finished my engine and I can use it to make Apparatus.

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.