Hi there!
I discovered the game a few days ago and liked the
way it works. So I decided to build a robot which is still
quite crappy at the moment because of my lack of Java
skills.
I decided to let the robot drive in a random direction
and after 3 seconds drive in another. I do it like this:
--- snip ---
void driveAround()
{
time1 = time();
if ((time1 - time2) > 3.0)
{
driveAngle = driveAngle + rand(360);
drive(driveAngle, 50);
time2 = time();
}
}
-- snip ---
If I play OFFLINE, it works like the way I want it to
work - which means that the robot starts to move after
the first three seconds and then changes its direction
every other three seconds.
However, if I play ONLINE, the robot works this way
only in the very first game I play. If this first game is
finished and I start another match, the robot just
stands still and doesn't move anymore.
After I closed my browser and went back to your page
again, the applet loaded, I played the first match and -
the same results. The robot just stand still.
Here is some information about my system:
* jrobots 4.0
* java blackdown-jdk-1.4.1
* Konqueror 3.1.5
Logged In: NO
I recommend you to post the message in the mailing list of
the group.
Is your variable time2 well defined and initialized?