RobotChase, Java edition

Discussion in 'Java' started by John B. Matthews, May 17, 2008.

  1. Hi!

    Students of Java may want to look at a new Java version of the
    classic RobotChase game:

    <http://sourceforge.net/projects/robotchase>

    As a game it appeals more to nostalgia, but the program's design
    illustrates several common patterns worth studying. Details may be found
    here:

    <http://robotchase.sourceforge.net/>

    John
    --
    John B. Matthews
    trashgod at gmail dot com
    home dot woh dot rr dot com slash jbmatthews
    John B. Matthews, May 17, 2008
    #1
    1. Advertising

  2. On May 18, 7:27 am, "John B. Matthews" <> wrote:
    ...
    > Students of Java may want to look at a new Java version of the
    > classic RobotChase game:
    >
    > <http://sourceforge.net/projects/robotchase>


    hmmm. OK - 'nice effort'. But when I go to check
    if there is a webstart launch, I only find a download.
    In those downloads, there is a Mac specific bundle, and
    a 'Platform Independent' tar.gz file.

    What program on Windows will deal with tar files?

    Since Java specialises in using ZIP style archives,
    and the SDK provides tools to work with them, why
    would people* distribute Java projects as a 'tar'?

    * You are not alone there, it is quite common.

    > As a game it appeals more to nostalgia, ..


    Yeh. The entire '16 color'** design leaves me somewhat cold.
    Isn't it about time that game porters offered both 'classic'
    and 'next millennium' modes of play? ;-)

    ** It probably uses more, but the screenshots of the
    gameplay area suggest it is very simple.

    >..but the program's design
    > illustrates several common patterns worth studying. Details may be found
    > here:
    >
    > <http://robotchase.sourceforge.net/>


    That is a very nice opening page you have in the
    JavaDocs, complete with screenshot. Good work.

    Would like to see..
    a) A ZIP download
    b) A (sandboxed) webstart launch.

    Gotta' love that open source. Thanks for your efforts
    this far.

    As an aside, I had never heard of 'RobotChase' before
    now, though I have seen variants on that theme.

    --
    Andrew T.
    PhySci.org
    Andrew Thompson, May 18, 2008
    #2
    1. Advertising

  3. John B. Matthews

    Tom Anderson Guest

    On Sat, 17 May 2008, Andrew Thompson wrote:

    > On May 18, 7:27 am, "John B. Matthews" <> wrote:
    > ...
    >> Students of Java may want to look at a new Java version of the
    >> classic RobotChase game:
    >>
    >> <http://sourceforge.net/projects/robotchase>

    >
    > hmmm. OK - 'nice effort'. But when I go to check if there is a
    > webstart launch, I only find a download. In those downloads, there is a
    > Mac specific bundle, and a 'Platform Independent' tar.gz file.
    >
    > What program on Windows will deal with tar files?


    Pretty much any archiving program. WinZip, for instance.

    > Since Java specialises in using ZIP style archives, and the SDK provides
    > tools to work with them, why would people* distribute Java projects as a
    > 'tar'?
    >
    > * You are not alone there, it is quite common.


    Is it because SourceForge does it automatically? Tarballs are the standard
    mode of distribution in the unix world, so i wouldn't be surprised if SF
    had built-in support for packaging files in this way.

    For non-SF projects, i think it just reflects a brain stuck in the
    orthodox open source mindset. Tarballs and makefiles all round!

    > As an aside, I had never heard of 'RobotChase' before now, though I have
    > seen variants on that theme.


    I've never come across that name before, although the suppplied listing
    does suggest that that's the original name. I've always known it as
    Daleks, after the version we had on the Mac when i was a kid. Those were
    the days - Daleks, Macinooga Choo Choo, Captain Magneto, Crystal Quest ...
    Ahem. Anyway, 'robots' seems to be the generic name:

    http://en.wikipedia.org/wiki/Robots_(computer_game)

    The GNOME version is very good (ie hard!), with all sorts of different
    types of robots.

    Anyway, i'm off to download Crystal Quest ...

    tom

    --
    1 p4WN 3v3Ry+h1n G!!!
    Tom Anderson, May 18, 2008
    #3
  4. On May 18, 10:14 pm, Tom Anderson <> wrote:
    > On Sat, 17 May 2008, Andrew Thompson wrote:


    > > What program on Windows will deal with tar files?

    >
    > Pretty much any archiving program. WinZip, for instance.


    Well, sh*t hey! Would you believe*, that after a
    recent system meltdown, including system drive loss,
    that I cannot find the old (old, old) version of WinZip
    that I love, and am instead saddled with WinXP's poor
    attempt at pretending that Zip's are standard
    Windoze** folders.

    Maybe I should download the tar and see if MS can
    deal with it.. (Though I'd really prefer to try
    a *sandboxed* version of the app. direct off the
    net.)

    * standard rubbish intro.

    ** If you don't like my 'tone' with the 'z' -
    feel free to *bite me*.

    --
    Andrew T.
    Andrew Thompson, May 18, 2008
    #4
  5. John B. Matthews

    Jeff Higgins Guest

    Andrew Thompson wrote:

    > Well, sh*t hey!

    Have you tried ZipGenius? I've been happy with it
    since abandoning WinZip a couple years ago.
    Jeff Higgins, May 18, 2008
    #5
  6. In article
    <>,
    Andrew Thompson <> wrote:

    > On May 18, 10:14 pm, Tom Anderson <> wrote:
    > > On Sat, 17 May 2008, Andrew Thompson wrote:

    >
    > > > What program on Windows will deal with tar files?

    > >
    > > Pretty much any archiving program. WinZip, for instance.

    >
    > Well, sh*t hey! Would you believe*, that after a
    > recent system meltdown, including system drive loss,
    > that I cannot find the old (old, old) version of WinZip
    > that I love, and am instead saddled with WinXP's poor
    > attempt at pretending that Zip's are standard
    > Windoze** folders.
    >
    > Maybe I should download the tar and see if MS can
    > deal with it..


    Thank you for looking; let me know. It's true, gzip'd tarballs are just
    a habit. I don't _want_ to proliferate release files, but what's one
    more ant target?

    > (Though I'd really prefer to try a *sandboxed* version of the
    > app. direct off the net.)


    The program reads & writes to the user node for the package, using
    java.util.prefs.Preferences. Wouldn't that violate the sandbox? The jar
    is signed, so at least you know it's only _me_ trying to get a
    foothold:)

    > ** If you don't like my 'tone' with the 'z' -
    > feel free to *bite me*.


    I think you are too gentle:)

    John
    --
    John B. Matthews
    trashgod at gmail dot com
    home dot woh dot rr dot com slash jbmatthews
    John B. Matthews, May 18, 2008
    #6
  7. John B. Matthews

    Arne Vajhøj Guest

    Andrew Thompson wrote:
    > In those downloads, there is a Mac specific bundle, and
    > a 'Platform Independent' tar.gz file.
    >
    > What program on Windows will deal with tar files?
    >
    > Since Java specialises in using ZIP style archives,
    > and the SDK provides tools to work with them, why
    > would people* distribute Java projects as a 'tar'?


    Possible explanations:
    * the authors are using *nix (.tar.gz is more common than .zip on *nix)
    * compression is better (because the entire archive gets compresses
    instead of the individual files)

    Anyway, get a GNU tar and gzip for Windows. Always better
    to use the real stuff that some 99.9% compatible code.

    You can get them from Cygwin port.

    Arne
    Arne Vajhøj, May 18, 2008
    #7
  8. On May 19, 3:50 am, "John B. Matthews" <> wrote:
    > In article
    > <>,
    >  Andrew Thompson <> wrote:

    ...
    > > (Though I'd really prefer to try a *sandboxed* version of the
    > > app. direct off the net.)

    >
    > The program reads & writes to the user node for the package, using
    > java.util.prefs.Preferences. Wouldn't that violate the sandbox?


    Yes. JWS offers the PersistenceService* as
    an alternative - it is mostly useful for
    sandboxed apps, since it would require some
    conversion from standard use of Preferences.

    I had a simple example of the PS, but my site
    is offline at the moment.

    * <http://java.sun.com/products/javawebstart/docs/javadoc/javax/jnlp/
    PersistenceService.html>
    "PersistenceService provides methods for
    storing data locally on the client system,
    even for applications that are running in
    the untrusted execution environment. "

    >.. The jar
    > is signed, so at least you know it's only _me_ trying to get a
    > foothold:)


    In that case, the simpler route for you
    as a developer would be to add the request for
    'all-permissions' into the JNLP file.

    OTOH - I would feel much *safer* running a
    sandboxed app. - you need to understand that
    ..I don't know you from Adam, and do not know
    if you are either trustworthy or competent.

    Of course, I could always download the code,
    have a look over it, build the project from
    the source, and run that. But obviously that
    will take me a lot more time and effort. It
    would be nice to have a version that can be
    run directly off the net - sandboxed, perhaps
    with a startup message
    'No High Scores Stored!
    Use Trusted Version For Hi Scores'

    Just a thought..

    (And yes - I realise the point of all this is
    more about the code than the game itself, but
    having the game available can act as a nice
    advertisement/enticement to continue with a
    download and build)

    --
    Andrew T.
    PhySci.org
    Andrew Thompson, May 19, 2008
    #8
  9. In article
    <>,
    Andrew Thompson <> wrote:
    > On May 19, 3:50 am, "John B. Matthews" <> wrote:
    > > In article
    > > <>,
    > >  Andrew Thompson <> wrote:

    [...]
    > In that case, the simpler route for you as a developer would be to
    > add the request for 'all-permissions' into the JNLP file.


    Ah, I see.

    > OTOH - I would feel much *safer* running a sandboxed app. - you need
    > to understand that ..I don't know you from Adam, and do not know if
    > you are either trustworthy or competent.


    Both, of course:) The signature only proves that the jar is unmodified
    since signing. Sadly, hijacking open source as a vector for malware is
    a growth industry.

    > It would be nice to have a version that can be run directly off the
    > net - sandboxed, perhaps with a startup message
    > 'No High Scores Stored!
    > Use Trusted Version For Hi Scores'
    >
    > Just a thought.


    Certainly something to consider.

    > (And yes - I realise the point of all this is more about the code
    > than the game itself, but having the game available can act as a nice
    > advertisement/enticement to continue with a download and build)


    Yes, I wanted to gently suggest an alternative to sprinkling the model
    with calls to paintImmediate().

    You won't miss anything not playing the game, but do look at the other
    screen shots: each is more dreadful than the last;-)

    <http://sourceforge.net/project/screenshots.php?group_id=226326>

    John
    --
    John B. Matthews
    trashgod at gmail dot com
    home dot woh dot rr dot com slash jbmatthews
    John B. Matthews, May 19, 2008
    #9
  10. On May 19, 7:08 am, Arne Vajhøj <> wrote:

    (tar v. zip)
    > Possible explanations:
    > * the authors are using *nix (.tar.gz is more common than .zip on *nix)
    > * compression is better (because the entire archive gets compresses
    >    instead of the individual files)


    Huhh. I had always thought that zip
    compression *did* do compression on the
    entire file set. Not that I am any sort
    of expert on compression.

    --
    Andrew T.
    PhySci.org
    Andrew Thompson, May 20, 2008
    #10
  11. John B. Matthews

    Arne Vajhøj Guest

    Andrew Thompson wrote:
    > On May 19, 7:08 am, Arne Vajhøj <> wrote:
    > (tar v. zip)
    >> Possible explanations:
    >> * the authors are using *nix (.tar.gz is more common than .zip on *nix)
    >> * compression is better (because the entire archive gets compresses
    >> instead of the individual files)

    >
    > Huhh. I had always thought that zip
    > compression *did* do compression on the
    > entire file set. Not that I am any sort
    > of expert on compression.


    It does not.

    It would be rather problematic to extract a single file
    if it did.

    Arne
    Arne Vajhøj, May 20, 2008
    #11
  12. Andrew Thompson <> writes:

    > On May 19, 7:08 am, Arne Vajhøj <> wrote:
    >
    > (tar v. zip)
    >> Possible explanations:
    >> * the authors are using *nix (.tar.gz is more common than .zip on *nix)
    >> * compression is better (because the entire archive gets compresses
    >>    instead of the individual files)

    >
    > Huhh. I had always thought that zip
    > compression *did* do compression on the
    > entire file set. Not that I am any sort
    > of expert on compression.


    Zip archives compress each file for itself, and then adds it to the
    archive together with an entry specifying name, path and some other
    properties.

    Tar.gz creates an archive of entries and contents, and then compresses
    the entire file at once. That means that the file entries are also
    compressed, and any similarity between files may improve the compression
    ratio.

    I've had zip files (containing lots of small files) where zipping the
    zip file reduced the size measurably because of the many, similar,
    file entries being compressed.

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, May 20, 2008
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. C.W.M. Avontuur
    Replies:
    2
    Views:
    539
    Thomas Kellerer
    Dec 3, 2003
  2. Joan Maceachern
    Replies:
    0
    Views:
    734
    Joan Maceachern
    Apr 16, 2004
  3. Kenta
    Replies:
    1
    Views:
    557
    Kenta
    Jul 2, 2004
  4. JamesY
    Replies:
    4
    Views:
    373
    JamesY
    Nov 9, 2004
  5. barcaroller

    3rd Edition vs Special Edition

    barcaroller, Sep 7, 2005, in forum: C++
    Replies:
    10
    Views:
    599
    John Carson
    Sep 14, 2005
Loading...

Share This Page