RobotChase, Java edition

A

Andrew Thompson

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.
 
T

Tom Anderson

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
 
A

Andrew Thompson

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*.
 
J

John B. Matthews

Andrew Thompson said:
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
 
A

Arne Vajhøj

Andrew said:
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
 
A

Andrew Thompson

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)
 
J

John B. Matthews

 Andrew Thompson <[email protected]> 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
 
A

Andrew Thompson

(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.
 
A

Arne Vajhøj

Andrew said:
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
 
L

Lasse Reichstein Nielsen

Andrew Thompson said:
(tar v. zip)

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top