Discussion:
Using a different image for the tank chassis, gun and radar?
fnl
2016-05-29 21:07:53 UTC
Permalink
Hi Paul,

The images for the distributions files is located in the
robocode-ui-1,9.x.x.jar file which you can find under the libs folder of
the robocode installation dir.
You can open the .jar file with a zip tool like 7-zip or similar. The
images are located under /net/sf/robocode/ui/images/
You can replace those using 7-zip as well (drag'n'drop).

Note that all bluish colors are automatically replaced by Robocode with the
real tank color.
Also notice that Robocode can handle alpha colors as well.

Cheers,
- Flemming
Hi,
I've come across Robocode whilst looking for some sort of programming game
to use with my Year 9 pupils in their IT lessons and it looks perfect!
However, To make each pupils tank more unique I'd like to be able to
either change the default image for the chassis, gun and radar, or even
give them a choice of 2 or three designs/ give them the ability to draw
their own as an extension or homework task.
Would anyone be able to tell me where the image files are actually stored
in the robocode install directory? That way I can see if it even possible
to adjust the icons etc.
Many thanks,
- Paul
--
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.
p***@gmail.com
2016-06-08 19:58:00 UTC
Permalink
Thanks for the response!

Unfortunately, due to the limitations of the school network and my own lack
of JAVA Scripting knowledge I dont think I can do what I initially wanted.
Robocode would be installed to the local drive which the pupils have no
access to. And from what I can tell, the images are loaded within the
program itself, rather than the scripts for the user-made tanks. Unless I
can figure out a way of setting the images used from the tank scripts
themselves (overwriting the default appearance) and include several
different designs (Chassis_1, Chassis_2 etc.) in the ui.jar file before
installing the program to the pupil machines, then they wont be able to
select different appearances.

- Paul
--
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
2016-06-09 20:22:17 UTC
Permalink
Correct, the images are built into Robocode. There is currently no support
for custom images.
You might be able to create a script that can change the image in the .jar
file. But the image will change for all robots.
You could create a script that 1) unpacks the .jar file (as a .zip file),
2) replaces the image files, 3) Re-pack the files again to a .jar file.

Cheers,
- Flemming
Post by p***@gmail.com
Thanks for the response!
Unfortunately, due to the limitations of the school network and my own
lack of JAVA Scripting knowledge I dont think I can do what I initially
wanted.
Robocode would be installed to the local drive which the pupils have no
access to. And from what I can tell, the images are loaded within the
program itself, rather than the scripts for the user-made tanks. Unless I
can figure out a way of setting the images used from the tank scripts
themselves (overwriting the default appearance) and include several
different designs (Chassis_1, Chassis_2 etc.) in the ui.jar file before
installing the program to the pupil machines, then they wont be able to
select different appearances.
- Paul
--
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.
Loading...