Custom battle background

63 views
Skip to first unread message

JOSE LUIS VAZQUEZ POLETTI

unread,
Aug 16, 2021, 7:00:32 AM8/16/21
to Robocode

Hi there!

First of all, thank you very much for keeping Robocode alive. This is a great way to bring AI and programming to youngsters. In fact, we plan starting a national league at my country. We had great experiences with CoreWar (https://corewar.ucm.es/) and now we wanted to jump to Robocode as well :-).

In fact, my question is somehow related: is it possible to customize the battle background? I have found the blue_metal_X.png files inside the robocode.ui-1.9.4.2.jar. An initial idea could be to change them and then re-create the jar file.

However, I'm sure somebody already has thought of this and managed to perform it in a more simple way.

Thank you very much in advance!!!

fnl

unread,
Aug 16, 2021, 4:04:21 PM8/16/21
to Robocode
Hi Jose,

I am happy to learn that you are about to start a national league in Spain. :)
And I agree that programming games like CoreWar and Robocode are a great and fun way for young people to learn about both AI and programming.

Regarding the background. Currently, the tiles can be turned off as a setting in Robocode (to black).
But the code for the blue_metal tiles is hardcoded. But this is something that could be changed in the code of course. It could be done using some property file to point at the image files and tell the size of the images etc.

... and used by the BattleView in the createGroundImage() method:

Currently, the easier way to change it is to unzip (and re-zip) the robocode-setup-1.9.x.x.jar file and replace the blue_metal_X.png with 5 other images of your choice. This would do the job. The tiles could be the same image or up to five different.

Cheers,
- Flemming N. Larsen

JOSE LUIS VAZQUEZ POLETTI

unread,
Aug 17, 2021, 4:20:59 PM8/17/21
to Robocode
Thank you very much for your prompt reply!

We'll try this solution, which should be perfect for our needs :-D.

Right now we have submitted a proposal to include a Robocode workshop at Madrid's Science Week (https://www.semanacienciamadrid.org/). Our idea is to see how much public and competitors we can gather, so we decide whether to move to the next step or not.

And, if you don't mind the spam, I'll be very happy to share any updates with the group. Maybe here there are potential participants as well!
Reply all
Reply to author
Forward
0 new messages