Re: Custom battle background
fnl <[email protected]> Mon, 16 Aug 2021 13:04:21 -0700 (PDT)
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_142_1540369820.1629144261333 Content-Type: multipart/alternative; boundary="----=_Part_143_625326279.1629144261333" ------=_Part_143_625326279.1629144261333 Content-Type: text/plain; charset="UTF-8" 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. The image is read from the ImageManager here: https://github.com/robo-code/robocode/blob/4255d1a4b59906a4630e0345aef7b0ca10456049/robocode.ui/src/main/java/net/sf/robocode/ui/ImageManager.java ... and used by the BattleView in the createGroundImage() method: https://github.com/robo-code/robocode/blob/4255d1a4b59906a4630e0345aef7b0ca10456049/robocode.ui/src/main/java/net/sf/robocode/ui/battleview/BattleView.java 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 mandag den 16. august 2021 kl. 13.00.32 UTC+2 skrev JOSE LUIS VAZQUEZ POLETTI: > > 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!!! > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/robocode/43938f56-2d25-4a00-98aa-d9b14757c78bn%40googlegroups.com. ------=_Part_143_625326279.1629144261333 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jose,<div><br></div><div>I am happy to learn that you are about to start= a national league in Spain. :)</div><div>And I agree that programming game= s like CoreWar and Robocode are a great and fun way for young people to lea= rn about both AI and programming.</div><div><br></div><div>Regarding the ba= ckground. Currently, the tiles can be turned off as a setting in Robocode (= to black).</div><div>But the code for the blue_metal tiles is hardcoded. Bu= t this is something that could be changed in the code of course. It could b= e done using some property file to point at the image files and tell the si= ze of the images etc.</div><div><br></div><div>The image is read from the I= mageManager here:<br>https://github.com/robo-code/robocode/blob/4255d1a4b59= 906a4630e0345aef7b0ca10456049/robocode.ui/src/main/java/net/sf/robocode/ui/= ImageManager.java<br><br></div><div>... and used by the BattleView in the c= reateGroundImage() method:</div><div>https://github.com/robo-code/robocode/= blob/4255d1a4b59906a4630e0345aef7b0ca10456049/robocode.ui/src/main/java/net= /sf/robocode/ui/battleview/BattleView.java<br></div><div><br>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 you= r choice. This would do the job. The tiles could be the same image or up to= five different.<br><br>Cheers,</div><div>- Flemming N. Larsen</div><div><b= r></div><div><br></div><div class=3D"gmail_quote"><div dir=3D"auto" class= =3D"gmail_attr">mandag den 16. august 2021 kl. 13.00.32 UTC+2 skrev JOSE LU= IS VAZQUEZ POLETTI:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: = 1ex;"><br><div>Hi there!</div><div><br></div><div>First of all, thank you v= ery much for keeping Robocode alive. This is a great way to bring AI and pr= ogramming to youngsters. In fact, we plan starting a national league at my = country. We had great experiences with CoreWar (<a href=3D"https://corewar.= ucm.es/" target=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https:/= /www.google.com/url?hl=3Dda&q=3Dhttps://corewar.ucm.es/&source=3Dgm= ail&ust=3D1629229439738000&usg=3DAFQjCNHwqE4KbOxJPNqpymxn-BDvTzC0yQ= ">https://corewar.ucm.es/</a>) and now we wanted to jump to Robocode as wel= l :-).<br></div><div><br></div><div>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.</div><div><br></div><di= v>However, I'm sure somebody already has thought of this and managed to per= form it in a more simple way.</div><div><br></div><div>Thank you very much = in advance!!!<br></div></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;Robocode" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">robocode+u= [email protected]</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/robocode/43938f56-2d25-4a00-98aa-d9b14757c78bn%40googlegroups.co= m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid= /robocode/43938f56-2d25-4a00-98aa-d9b14757c78bn%40googlegroups.com</a>.<br = /> ------=_Part_143_625326279.1629144261333-- ------=_Part_142_1540369820.1629144261333--