Menu

Newbie Problems

Help
2014-08-28
2014-09-05
  • Eduardo Mendes

    Eduardo Mendes - 2014-08-28

    Hi guys,

    I started to use Robocode at last week and some problems emerged. So, forgive my bad (really bad) english...
    I need to implement a scenario with the following settings:

    1 - In the scenary has two robots: Target (it will remain standing during the all game) e the Follower (It will search for Target);
    2 - Is it possible to limit the range of my radar? How I do that? Do you have examples?
    3 - I would like that my robot search for the target, moving randomly until find him. After that the Follower will stop to move (). Other doubts: there is a function that makes the robot move randomly?

    If was possible give me examples...

    Thanks a lot! =)

     

    Last edit: Eduardo Mendes 2014-08-28
  • Flemming N. Larsen

    First of all, you should have a look at the RoboWiki, which contains lots of useful articles for how to program robots for Robocode. :-)

    1. Two robots fighting each other is called 1-vs-1 battles in Robocode and the RoboRumble.
    2. You cannot change the range of the radar. It will always scan 1200 units, when the radar is turned. However, you can limit the angle of the radar arc (radar sweep) by the amount of angle you turn the radar. So if your only turn your radar 1 degree per turn, the radar will only see robot within the scan arc defined by the 1 degree and 1200 units in length.
    3. Random Movement is described here at the RoboWiki. ;-)
     
  • Eduardo Mendes

    Eduardo Mendes - 2014-09-05

    Thanks a lot! I'm Using robowiki, always! =)

    So, now I'm trying to implement a entrapment system using TeamRobot.
    The entrapment consists in three robots performing a circle surrounding a target (you can see the system here: http://postimg.org/image/cnta2pvzj/ )... I've used the CirclingBot to do this movement. Some doubts (again haha):

    1: Is it possible avoid the collision using sendMessage method? For example: The robot Follower1 send the message to Follower2 in order to maintain the distance fixed of 120° between the robots (with a fixed radius);

    2: Using CirclingBot, how can orient the circular movement of the three robots in one direction (anticlockwise, for example);

    The Target is stationary and does nothing in the enviromment.

     

Log in to post a comment.