1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Release Robocode - a programming tank combat game

Discussion in 'Software Releases' started by dimag0g, Mar 2, 2015.

?

Would you participate in robocode competition?

  1. Yes, definitely

    13.3%
  2. Maybe

    60.0%
  3. No

    26.7%
  1. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    Hi there,

    I have packaged robocode game this weekend. The idea is to program a battle tank in Java using this API, and make it fight against other robots. There is a limited amount of time and power your robot can spend on actions like moving, firing or scanning the battlefield with the radar, and the challenge is to find the right balance.

    There are several sample robots included in the game, which you can use as a base for your own robots, and as adversaries. At first, you would place a couple of targets of class SittingDuck on the battlefield to check that your robot is able to find targets and shoot at them. Then, you'd make your bot fight against some simple robots from the sample package. Plenty of advanced robocode resources are available at robocode home page.

    I really wish we could hold an OpenPandora robocode competition sometime this year, if enough people are interested. For now, feel free to play with the game and vote. In a few weeks, if there are enough votes in favor of the competition, we will discuss the rules and define the timeline.
     
    Last edited by a moderator: Mar 2, 2015
    Tags:
    Trip and flowen8 like this.
  2. elwing

    elwing Rabbit Addict

    Joined:
    Feb 23, 2009
    Messages:
    2,943
    how would a comptetion work? we just send source code and someone runs all the tank together in a twitch like server for all to see?
     
    edgex004 likes this.
  3. milkshake

    milkshake Advanced Member

    Joined:
    May 18, 2009
    Messages:
    3,720
    Location:
    Rotherham, UK
    The description says c# works too is this correct?
     
  4. ZXDunny

    ZXDunny Advanced Member

    Joined:
    Oct 12, 2010
    Messages:
    2,330
    Yeah, this is a remake of the old Omega games from the late 80s, but they used a really nice custom (BASIC-like) language instead of this... Java crap. Using that's just a cop-out because you can't be bothered to write your own interpreter.

    D.
     
  5. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    Technically, a .class file should be sufficient, which kind of keeps your source secret. Depending on the number of tanks, we could organize some sort of tournament, with a duel between the two strongest tanks fighting for the first place. If we get bored with plain old tournament, we might decide that some of the rules are fixed randomly after all submissions are made, to see which bot adapts the best.

    I doubt it. I'd expect an effort from my side to be required for C# to work, and I didn't make any.

    I believe even less people would be interested in this if they had to learn a custom language.
     
  6. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,477
    Location:
    France, near Lyon
    You can try with the MonoRT pnd, it's not much more complicated than with Java (ok, a little bit more, but nothing to heavy, just automount monort and launch it's runscript to setup path and ld_library_path).
     
  7. ZXDunny

    ZXDunny Advanced Member

    Joined:
    Oct 12, 2010
    Messages:
    2,330
    ...Or even a custom API...

    D.
     
  8. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,252
    We had a competition at work once with this. Tempted to try and boot it back up, but means putting Java somewhere, and I'm really against that. I created a VM for my Android development so it didn't have to be on my PC
     
  9. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    Why, is it the size? AFAIK, java doesn't require a complicated setup process, JRE and JDK can be installed anywhere, and all you have to do is to set JAVA_HOME and add JAVA_HOME/bin to your path.
     
  10. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,584
    C# is even worse than Java...

    Imho java is a good choice for such a toy project. :)
     
  11. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,252
    Nope, it's the fact of having Java installed. Java is a horrid piece of kit, and it used to be exploited vastly on the internet, not sure if this is still the case, but I have no great desire to find out.
    It's a shame in some ways, I used to use a TV guide system (can't remember it's name anymore though) that was Java, TuxGuitar is Java, but it was compiled as a native application for the desktop, and the only other Java thing I would like to run is Supercars 3. The price to pay I guess...
     
  12. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    It's not java which is exploited, but rather browsers with java plugins. If there was an option to install a browser plugin which executes bash statements on click (rm -fr / and the like), would that make bash unsafe?

    So, if you put java in a corner of your hard disk and only set JAVA_HOME and PATH in a shell you use to run java games, I see no way such installation could be exploited.
     
  13. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,584
    I don't get the problem... You should trust every application you run at your Desktop. If you don't, put it in a sandbox. If you don't trust the sandbox, put the sandbox in another sandbox.

    I don't care, whether a C/C++ written program, a C# program, a Java app or a Bash script draws penise of all my family pictures in my home folder...

    Disclaimer: I don't count Javascript scripts as desktop application. I am very afraid of unsafe js implementation, because I can't trust every website I visit.
     
  14. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    I've tried this approach, but without much success. The .NET plugin complains it cannot load a library (jni4net.n.132.m26-0.8.7.0.dll) which doesn't even exist. Symlinking similarly named dlls (like jni4net.n.w32.v20-0.8.7.0.dll) to that name didn't help. Is there a reason why .NET libraries have such wierd names? maybe the OS type is encoded in there somehow, and I have to rename them all to something OS-dependent?

    EDIT:

    Ok, so it was l32, not 132 in that name (but it still feels wierd to have to remane files in a released software). Now the error is: "ELF file version does not match the current one (Possible cause: endiannes mismatch)".

    Do you have any idea  what the root cause might be? The dll file seems to be PE, not ELF.
     
    Last edited by a moderator: Mar 4, 2015
  15. elwing

    elwing Rabbit Addict

    Joined:
    Feb 23, 2009
    Messages:
    2,943
    with strange names like that, isn't that dll something that should be loaded into the GAC and simply refered to as jni4net?
     
  16. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    When I try "gacutil /i libs/jni4net.n.l32.m26-0.8.7.0.dll" I get an error:

    Failure adding assembly to the cache: gac directories could not be created, possibly permission issues.

    Am I trying the wrong command?
     
  17. elwing

    elwing Rabbit Addict

    Joined:
    Feb 23, 2009
    Messages:
    2,943
    never toyed with C# on the console, but I guess it lack permission to add new assembly to the GAC... is that supported by our c# pnd?
     
  18. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,477
    Location:
    France, near Lyon
    I haven't setup anything about the GAC, so probably some permission issues here.

    But for this case, a MONO_PATH environnement variable should be enough?
     
  19. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    599
    Location:
    Strasbourg, France
    I'm past permission issues now (they might have been related to the fact that I ran the PND on a remote X server via SSH), but the main issue is still there:

    "ELF file version does not match the current one (Possible cause: endiannes mismatch)"
     
  20. hitbyambulance

    hitbyambulance Active Member

    Joined:
    Nov 26, 2005
    Messages:
    609
    Location:
    Seattle, WA
    i have an interest in participating, if i can learn this API well enough. i don't have a Pandora, so i'll do this from my desktop.
     

Share This Page

Loading...