mbesney
2012-06-05 22:23:57 UTC
Hello All,
I doubt if there is a solution to my problem but I thought I might as well ask so here goes. I am running the Robocode engine from an Eclipse based external Java application.
The security manager is disabled so that my robot can send robot events (e.g. ScannedRobot)through the clipboard to the Java application. There is no problem there, the events do get through. The problem is that when the Java application puts command in the clipboard for the robot to execute in response to the ScannedRobot event the robot is too busy to get them.
It boils down to a sychronization problem. The ScannedRobot event fires so rapidly that it keeps my robot stuck in its onScannedRobot event handler where it sends the event to the Java application. The robot never gets back to the main loop in order to check the clipboard until the event has passed by which time it is too late.
I hope I have made the problem clear, any suggestions would be more than welcome...
Regards,
Mike
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Robocode/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/Robocode/join
(Yahoo! ID required)
<*> To change settings via email:
Robocode-***@yahoogroups.com
Robocode-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
Robocode-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
I doubt if there is a solution to my problem but I thought I might as well ask so here goes. I am running the Robocode engine from an Eclipse based external Java application.
The security manager is disabled so that my robot can send robot events (e.g. ScannedRobot)through the clipboard to the Java application. There is no problem there, the events do get through. The problem is that when the Java application puts command in the clipboard for the robot to execute in response to the ScannedRobot event the robot is too busy to get them.
It boils down to a sychronization problem. The ScannedRobot event fires so rapidly that it keeps my robot stuck in its onScannedRobot event handler where it sends the event to the Java application. The robot never gets back to the main loop in order to check the clipboard until the event has passed by which time it is too late.
I hope I have made the problem clear, any suggestions would be more than welcome...
Regards,
Mike
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Robocode/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/Robocode/join
(Yahoo! ID required)
<*> To change settings via email:
Robocode-***@yahoogroups.com
Robocode-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
Robocode-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/