Discussion:
Is it possible to load a battle file in Java?
m***@gmail.com
2014-04-10 19:23:15 UTC
Permalink
I'm trying to use robocode through Java and having a number of issues
primarily related to the limitations of the API. Specifically, in this case
I want to be able to provide the initial positions of the robots for any
given round. I see that I can use a whatever.battle file to set that, but
the BattleSpecifications class (nor the RobotSpecification class) provide
me with the equivalent functionality in code. I figured I would just load
the battle files in via XML or something, one for each round, but I don't
even have the ability to provide the file as an argument to the engine. I'm
quickly running out of both proper and "hack"-y possible solutions, so any
advice would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fnl
2014-04-11 18:52:38 UTC
Permalink
Sound like a nice feature request. :-)

The BattleSpecification for the Control API needs to be extended in order
to provide this functionality. I will try to get include it in the next
version of Robocode. :-)

Cheers,
- Flemming
Post by m***@gmail.com
I'm trying to use robocode through Java and having a number of issues
primarily related to the limitations of the API. Specifically, in this case
I want to be able to provide the initial positions of the robots for any
given round. I see that I can use a whatever.battle file to set that, but
the BattleSpecifications class (nor the RobotSpecification class) provide
me with the equivalent functionality in code. I figured I would just load
the battle files in via XML or something, one for each round, but I don't
even have the ability to provide the file as an argument to the engine. I'm
quickly running out of both proper and "hack"-y possible solutions, so any
advice would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fnl
2014-04-17 20:10:11 UTC
Permalink
Hi again,

I have now implemented the missing functionality with setting the initial
position and heading of each robot participating in a battle using the
RobocodeEngine. :-)

I have an Alpha 1 version here
<http://robocode.sourceforge.net/files/robocode-1.9.2.0-Alpha-1-setup.jar>that
I should like you to try out. Please tell me if it works as expected? Then
we get fix issues before the release of version 1.9.2.0
(http://robocode.sourceforge.net/files/robocode-1.9.2.0-Alpha-1-setup.jar)

Thanks and regards,
- Flemming
Post by m***@gmail.com
I'm trying to use robocode through Java and having a number of issues
primarily related to the limitations of the API. Specifically, in this case
I want to be able to provide the initial positions of the robots for any
given round. I see that I can use a whatever.battle file to set that, but
the BattleSpecifications class (nor the RobotSpecification class) provide
me with the equivalent functionality in code. I figured I would just load
the battle files in via XML or something, one for each round, but I don't
even have the ability to provide the file as an argument to the engine. I'm
quickly running out of both proper and "hack"-y possible solutions, so any
advice would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...