Yup, a working webstart version of my snake game

I have managed to wrestle with and produce a working version of my AnacondaNet game being hosted at the JavaGamesFactory.

http://javagamesfactory.org/views/view-game?name=AnacondaNet%20v0.1pa

or for those who are having issues with webstart here is an exectuable JAR:

http://javagamesfactory.org/attachments/game/AnacondaNet+v0.1pa/alpha/4/AnacondaWebstart.jar

note you will need to set a -Xms switch to at least 128M otherwise you may recieve a memory error when playing the executable JAR

The game comes to 6.2meg, i have only included one background world in this version to reduce the size.

Things that are working:

-fullscreen
-huge non-repeated-tile map (6400x4800 pixels)
-mp3 music
-crappy placeholder sound effects
-5 different levels of zoom
-multiplayer support (LAN only currently)
-no theoretical player limit… it will just degrade the game performance

Things not yet working:

  • advanced game menu settings
  • world boundaries

Things not yet implemented

  • death… you cannot die
  • power-ups
  • multiplayer support (Internet)
  • obstacles

I would like to hear peoples experience with this pre-alpha version. Is the graphics scrolling smooth? does the sound work ok? Does it even work when played in linux or on a Mac?

I am quite interested in the network aspect. If people can test this with 2 or more players i would be very appreciative.

It is possible to run more than one game instance on the same computer to simulate multiple players however the refresh rate degrades too much to provide useful network gameplay insight.

Let me know what you think :slight_smile:

Nicholas

For those who dont read the help :wink: (like me)

The keys are :

Left Arrow Key - rotate left
Right Arrow Key - rotate right
Space Bar - speed boost

Page Up - zoom in
Page Down - zoom out

Link seems dead to me. Not sure what it’s supposed to be either.

[quote]Link seems dead to me. Not sure what it’s supposed to be either.
[/quote]
hmm, it seems that BlahBlahBlah’s “The Java Games Factory” site is offline… perhaps he is upgrading the system again? I will leave a message for him.

[quote]Link seems dead to me. Not sure what it’s supposed to be either.
[/quote]
A memory leak with direct memory buffers that means I have to keep restarting the server every few days. I’m concentrating on it at the moment (now that libraries are working).

Anyway, all my fault, not moogie’s. Desperately trying to get it fixed, though :frowning:

Well now that it’s up, it at least looks pretty :slight_smile: However, the game doesn’t load:


An error occurred while launching/running the application.

Category: Invalid Argument Error

Could not load file/URL specified: C:\Documents and Settings\Malohkan\Local Settings\Temporary Internet Files\Content.IE5\4FG7CZ8B\alpha[1].jnlp

Wrapped Exception::
java.io.FileNotFoundException: C:\Documents and Settings\Malohkan\Local Settings\Temporary Internet Files\Content.IE5\4FG7CZ8B\alpha[1].jnlp (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.main(Unknown Source)

I seem to recall this happening before…

EDIT: Just tried loading a couple other games from JGF, no worky.

[quote]Just tried loading a couple other games from JGF, no worky.
[/quote]
Has anything ever worked on JGF? I tried different games a couple of times in the past and none worked. May it be because of SQL-errors, none-existent jnlps, libs etc.

In general, everything works on JGF. But no-one posts “hey, I just downloaded something and it’s working!” they only bother posting when something goes wrong or their JVM doesn’t do what is expected.

EDIT: at the moment, of course, authors are free to upload crap that isn’t even JAR files, let alone a working game. Which is why all the effort is going into trying to make a publishing system so that games only appear once tested, and AUTHORS CANNOT ALTER THEM once published (they’d have to make a new version, and get it re-evaluated and re-published).

But this is an awful large amount of work to do properly without makign life painful and difficult for people. I would really really welcome detailed designs for how to do it…

[quote]Well now that it’s up, it at least looks pretty :slight_smile: However, the game doesn’t load:


An error occurred while launching/running the application.

Category: Invalid Argument Error

Could not load file/URL specified: C:\Documents and Settings\Malohkan\Local Settings\Temporary Internet Files\Content.IE5\4FG7CZ8B\alpha[1].jnlp
[/quote]
Off the top of my head, this is a webstart bug in the windows JVM. What JVM version are you running? (vaguely, IIRC, applies to latest 1.4.2_07 but worth checking anyway).

If it's what I think it is, then it's something along the lines of sun's webstart client mangling URL's when it shouldn't because they aren't using sun's own URLdecoder ... or something like that.

Note that it works *fine* on a windows PC running java 5, no problems at all (just double-checked it).

EDIT: this bug is also somehting that only ever happens in windows. Hence my guesstimate it's a sun client bug.

PS game looks cool. Need some kind of radar (feels very empty otherwise) but loved the smooth turns + the little name tag

[quote]Well now that it’s up, it at least looks pretty :slight_smile: However, the game doesn’t load:


An error occurred while launching/running the application.

Category: Invalid Argument Error

Could not load file/URL specified: C:\Documents and Settings\Malohkan\Local Settings\Temporary Internet Files\Content.IE5\4FG7CZ8B\alpha[1].jnlp

Wrapped Exception::
java.io.FileNotFoundException: C:\Documents and Settings\Malohkan\Local Settings\Temporary Internet Files\Content.IE5\4FG7CZ8B\alpha[1].jnlp (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.main(Unknown Source)

[/quote]
just uploaded NanoBlaster to JGF and encountered the same problem.

Java Web Start 1.5.0_02
JRE-Version 1.4.2_04

blah3,

why don’t you look for a QA person to do extensive testing of your server?

yeah I’m running Java 5 as well

[quote]blah3,

why don’t you look for a QA person to do extensive testing of your server?
[/quote]
Well, professional QA obviously costs large amounts of money which would have to come from somewhere, and it’s well known for generating large numbers of extra bugs with little or no help in solving them :stuck_out_tongue: (stereotype).

So, I’m not sure how it would help :(.

However, rather than keep quiet about any ongoing issues, I’d appreciate it if you’d reply to this:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=tools;action=display;num=1115755876;start=0#0

…and give me some info to help try and narrow it down.

For instance, can YOU guess any reason why the same JNLP works on my windows PC with java 5 but not on yours? I’m stumped right now :(. But if you can give me detailed bug reports there’s a chance a pattern coudl emerge which would help solve it.

Webstart problems are often like this, because the debugging info from sun is usually either completely unrelated or deeply unhelpful. For instance, look at what it reports when the URL presented it with a certificate! Far from helpful :(.

ah, google:

“I have tracked this problem down to a problem with the HTTP cache headers
returned from the slimserver. Most content, including the jnlp file, is
returned with an Expires header on 1st Jan 1970. Some versions of IE
download the jnlp file, delete the file since the content has expired, and
then launches the Java Web Start helper application. That’s not particularly
useful and explains why JWS cannot find the jnlp file.”

And, lo and behold, I use Mozilla. And if I clear it from the cache and try MSIE, it crashes in teh same way.

Now, I’ve looked at the cache headers using Ethereal (packet sniffer), and they appear correct (ish). So, I guess it’s not exactly the same problem as the quote describes. But surely it’s the same base problem - that the vile internet explorer deletes the file just before passing it in to webstart.

Here’s the headers, in case you can spot something broken that I can’t see:


HTTP/1.1 200 OK
Date: Tue, 10 May 2005 23:32:30 +0200
Server: Grex CMS-Server (GrexEngine Expedition v3)
Last-Modified: Tue, 10 May 2005 04:03:36 +0200
Content-Type: application/x-java-jnlp-file
Accept-Ranges: bytes
Cache-control: no-cache="set-cookie"
Cache-control: no-cache="set-cookie2"
Cache-control: private
Content-Length: 1668

Note: this was requested at 21:30 on tuesday 10th may.

My best guess is that MSIE has a bug in it’s handling of “cache-control”? It should be ignoring it, IIRC, but I know that MSIE has many bugs in it’s header reading (for instance, it crashes if there’s no content-length, but completely ignores it).

[quote]PS game looks cool. Need some kind of radar (feels very empty otherwise) but loved the smooth turns + the little name tag
[/quote]
Yes, i am going to implement a radar… but yes, without any opponents it makes for a pretty boring game :wink:

what system did you test it on?

thanks for the compliment :slight_smile: i stand corrected about my previous remark :stuck_out_tongue:

Added a link to an executable JAR version to the top post for those who are having issues with the webstart

Updated the actual game menu. No longer using the temporary launch menu.

Followup: MSIE seems to completely ignore the HTTP specification and how it defines the “Cache-control” header - for instance, it appears that the presence of this header causes MSIE to “not cache this response”, which is the exact opposite of what the specification states.