|
appel
|
 |
«
Reply #1 - Posted
2013-12-02 22:29:23 » |
|
Pretty cool.
We could maybe even allow people to download a java4k installer to run on their machine. I think that could be get these games distributed widely! I can provide whatever json services you wish.
|
|
|
|
pjt33
|
 |
«
Reply #2 - Posted
2013-12-02 23:43:54 » |
|
appel, could you fix the JNLP file for 3DTunnel (gid 60)? It has an unescaped ampersand in the description, so the launcher throws a parse error when it tries to handle it.
Edit: as a workaround, for other people with the same problem, edit the downloaded file in work/bundle/downloads. I found it with grep, but it's probably possible to find it with the index.json if you don't have grep.
Edit 2: wow, it takes quite a lot of workarounds!
|
|
|
|
Games published by our own members! Check 'em out!
|
|
appel
|
 |
«
Reply #3 - Posted
2013-12-03 00:23:13 » |
|
appel, could you fix the JNLP file for 3DTunnel (gid 60)? It has an unescaped ampersand in the description, so the launcher throws a parse error when it tries to handle it.
Edit: as a workaround, for other people with the same problem, edit the downloaded file in work/bundle/downloads. I found it with grep, but it's probably possible to find it with the index.json if you don't have grep.
Edit 2: wow, it takes quite a lot of workarounds!
ampersand in gid 60 fixed. just writing this text because riven forbids me posting anything that is uninterestingly short 
|
|
|
|
Groboclown
|
 |
«
Reply #4 - Posted
2013-12-03 09:11:21 » |
|
I was able to get the WebStart games to sort of work. However, it seems that many of the JNLP files redirect to other sites, and many of those are no longer available. There could be some hacks to redirect those using the caching mechanisms, but would it instead be possible to host those files directly on the java4k site?
I know that this is lower priority, because we want people playing the new games for this year's contest, but I would like to be able to look at some of those old games for historical preservation purposes.
|
|
|
|
Damocles
|
 |
«
Reply #5 - Posted
2013-12-03 11:01:47 » |
|
I think this would be a legal problem, when they where never uploaded to Java4k but hosted elsewhere you would have to get the approval from each author to move/host them on another server.
|
|
|
|
pjt33
|
 |
«
Reply #6 - Posted
2013-12-03 12:08:26 » |
|
Appel, how are the JNLP files stored? There are a few others with unescaped ampersands, but there are also a considerable number which don't parse because of encoding errors. They claim to be UTF-8, but aren't.
|
|
|
|
appel
|
 |
«
Reply #7 - Posted
2013-12-03 20:08:52 » |
|
Appel, how are the JNLP files stored? There are a few others with unescaped ampersands, but there are also a considerable number which don't parse because of encoding errors. They claim to be UTF-8, but aren't.
Contests from 2005,2006,2007 were migrated over from javaunlimited when woogley was hosting the contest. So, all should be there and working. During 2008,2009 the developers hosted their own webstarts. Since then a lot of these webstart games have disappeared, an obvious consequence of time. However, and fortunately, ctomni231 managed to archive most of them and send it to me, so I have majority of those webstarts in a zip file. I've yet to add it to the site though. All applets starting from 2010 are working. Is java so narcissistic about text encoding that it's not possible to read the xml's? I made a JSON service in order to browse the catalog, with this as starting point: http://java4k.com/contests.phpI recommend some json extension in your browser to see it structured and so you can browse it.
|
|
|
|
Groboclown
|
 |
«
Reply #8 - Posted
2013-12-03 21:14:54 » |
|
A new version of the launcher is available that's compatible with the updated java4k.com data. If you have an existing version, you'll need to wipe out the cache directory.
|
|
|
|
pjt33
|
 |
«
Reply #9 - Posted
2013-12-03 22:18:12 » |
|
Is java so narcissistic about text encoding that it's not possible to read the xml's?
Yes. E.g. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Downloading file ./downloads/28b from http: Exception in thread "main" com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 4-byte UTF-8 sequence. at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687) at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:473) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1719) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1393) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2769) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:288) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at net.javagaming.java4k.launcher.webstart.JnlpDescription.loadXml(JnlpDescription.java:253) at net.javagaming.java4k.launcher.webstart.JnlpDescription.load(JnlpDescription.java:83) at net.javagaming.java4k.launcher.java4kcom.Java4kGameDescription.loadJnlpSettings(Java4kGameDescription.java:115) at net.javagaming.java4k.launcher.java4kcom.Java4kGameDescription.load(Java4kGameDescription.java:88) at net.javagaming.java4k.launcher.cache.CachePopulator.main(CachePopulator.java:61) |
I'll see how the new launcher handles things.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
appel
|
 |
«
Reply #10 - Posted
2013-12-04 00:47:53 » |
|
I converted the ANSI encoded files to UTF-8.
|
|
|
|
appel
|
 |
«
Reply #11 - Posted
2013-12-06 00:13:22 » |
|
The launcher is a tad slow at loading stuff. Any reason for that? 
|
|
|
|
pjt33
|
 |
«
Reply #12 - Posted
2013-12-06 00:32:10 » |
|
Those of you who have actually managed to run this: how did you handle the problem with http://voidstar.brinkster.net/mazegame4k/ not being a JNLP file? I'm not sure what to change to allow load-cache to finish.
|
|
|
|
Groboclown
|
 |
«
Reply #13 - Posted
2013-12-06 04:28:49 » |
|
Those of you who have actually managed to run this: how did you handle the problem with http://voidstar.brinkster.net/mazegame4k/ not being a JNLP file? I'm not sure what to change to allow load-cache to finish. The file under resources/net/javagaming/java4k/launcher/fixed-urls.json was made with this purpose in mind. You'll need to add an entry in that file to note the changed URL. In this case, I recommend creating a local jnlp file that's essentially a no-op replacement. One of the tasks I have is to make the cache loading tool skip bad files like this, so soon it shouldn't be an issue. The current code can keep going now.
|
|
|
|
SHC
|
 |
«
Reply #14 - Posted
2013-12-06 04:54:02 » |
|
I'm having a problem downloading it.  The size shown in the page is 4.9 MB but chrome says it's 7.4 MB! I've downloaded it though and when I try to extract, it says (Error 21 - Is a Directory)
|
|
|
|
Damocles
|
 |
«
Reply #15 - Posted
2013-12-06 08:04:29 » |
|
The tar.gz version works. You can extract it with 7zip etc.
|
|
|
|
Groboclown
|
 |
«
Reply #16 - Posted
2013-12-06 08:09:43 » |
|
I posted a new version, and the bundled zip download should be working now.
|
|
|
|
princec
|
 |
«
Reply #17 - Posted
2013-12-06 09:33:10 » |
|
Can't somebody make a launcher in 4k?  Cas 
|
|
|
|
Phased
|
 |
«
Reply #18 - Posted
2013-12-06 09:34:09 » |
|
|
|
|
|
|
princec
|
 |
«
Reply #20 - Posted
2013-12-06 11:35:55 » |
|
Heh, brilliant  Cas 
|
|
|
|
pjt33
|
 |
«
Reply #21 - Posted
2013-12-07 11:23:20 » |
|
The current code can keep going now.
Yep, I managed to get load-cache to run to completion. I also managed to fix bin/java4k and get it to run: 1 2 3 4 5 6 7 8 9 10
| #!/bin/sh
if [ -d "$JAVA_HOME" ]; then JAVAEXE="$JAVA_HOME/bin/java" else JAVAEXE="java" fi
cd `dirname "$0"`/../work/bundle "$JAVAEXE" -Dlauncher.dir="$PWD" -jar java4klauncher.jar $* || exit 1 |
saved with Unix line endings, not Windows ones. Does the program actually use the cache? It seems to reload everything on-demand, even though I've primed the cache. (Since it just took 5 minutes to launch Snakes on a Plane, allowing me to fill the cache overnight would make it a lot more usable). I'm going to open a ticket or two on Pikacode when my registration confirmation comes through.
|
|
|
|
Groboclown
|
 |
«
Reply #22 - Posted
2013-12-07 15:10:12 » |
|
I also managed to fix bin/java4k and get it to run:
The bundle ant task should automatically fix the line endings for both java4k and java4k.bat. That way, you can edit the file in your own line ending OS, and the distribution will be in the correct one. Does the program actually use the cache? It seems to reload everything on-demand, even though I've primed the cache. (Since it just took 5 minutes to launch Snakes on a Plane, allowing me to fill the cache overnight would make it a lot more usable).
I'm going to open a ticket or two on Pikacode when my registration confirmation comes through.
Yes, it does use the cache, but I have been working through the security manager settings - apparently it was too restrictive, and the code was silently not allowing URLs to be created for local files. When I open up the permissions for the shipped jar, the thing runs much faster.
|
|
|
|
Groboclown
|
 |
«
Reply #23 - Posted
2013-12-08 04:17:03 » |
|
New version, with performance improvements, better webstart compatibility, and better messages.
The next big feature I'm planning on adding is showing and submitting comments.
|
|
|
|
Groboclown
|
 |
«
Reply #24 - Posted
2013-12-11 03:10:56 » |
|
RC1 is available. Please send me your bugs or improvement requests soon, so we can get this published out on the site.
It's only available as a jar + startup scripts, so no EXE bundle available. If you have suggestions on how to bundle this with a JRE, or want to volunteer to do this yourself, please feel free to pitch in.
|
|
|
|
Groboclown
|
 |
«
Reply #25 - Posted
2013-12-11 15:31:20 » |
|
RC1 is available.
Apo found a bug with Class.getResource() not finding the file in the jar. RC2 fixed this. EDIT: but there were still permission issues around loading the resource and temp file writing by ImageIO. RC3 fixes that.
|
|
|
|
Groboclown
|
 |
«
Reply #26 - Posted
2013-12-12 01:02:24 » |
|
RC4 - improved the applet experience by centering the applet frame when it appears, and gave it focus so keyboard applets don't require the initial click. Edit:Added a version of the launcher that includes a windows executable (created using launch4j), and a version that has that executable + a bundled JRE 1.7 for Windows. A Windows-based installer could be made to go with these. I'll look into NSIS later. If someone wants to volunteer to make a Mac bundle, please stand up. Or, I guess I coulld invest some time looking into this article ( http://www.intransitione.com/blog/take-java-to-app-store/), but I don't have any way to test it.
|
|
|
|
ra4king
|
 |
«
Reply #27 - Posted
2014-01-11 23:43:53 » |
|
Java4K.exe doesn't work and neither does the JAR. Running the BAT file works. The error with the JAR is a NullPointerException in File's constructor when you call it at line 80 of your Security class. Also you should add judge comments 
|
|
|
|
moogie
|
 |
«
Reply #28 - Posted
2014-01-12 02:14:14 » |
|
java4k works for me, however the following 2014 games do not seem to work via the launcher:
-Supway4k -In the dark 4k
(win7 64bit, using bundled jre)
|
Java4k RIP 2014
|
|
|
SHC
|
 |
«
Reply #29 - Posted
2014-01-12 02:54:33 » |
|
I could make that for you. I'm having holidays till this friday.
|
|
|
|
|