I thought maybe I should start this as a new topic, as my question has changed considerably.
So I downloaded it, because it looks like exactly what I need, but I can’t find an .exe file. So I searched and found a bunch of scala files in a folder labeled ZMPP2 for glulx…
WHEW! Thank you so much Zarf! That is exactly what my problem was! It works very well as a stand-alone. In order to use it as an applet, I know I have to put it in the same file as my story file… but do I have to alter the code in the play.html file? in order for it to use the ZMPP instead of the Quixe player? (obviously I should get rid of that anyway)
There must be some sort of instruction or manual or tutorial on getting this to run as an applet… if anyone can help I would greatly appreciate it. I have the story files and the .jar file loaded to the server (in the same file)… but now what???
You need to look up how to embed an applet into a web page. In the embed you’ll set the parameters of the applet, which are (according to the usage file from the zmpp download)
**************************
Running as an applet
**************************
applet parameters:
1. story-file:
--------------
the URL of the story file, must be on the same server as the jar file
2. blorb-file (optional):
------------------------
the URL of the blorb file, must be on the same server as the jar file
3. save-to (optional):
---------------------
if set to "file", the applet will try to save a game state to the
user's file system, the default value is "memory" which saves a game
within the Java VM's memory
4. fixed-font-name/std-font-name (optional):
--------------------------------------------
the name of the standard and fixed fonts, the fixed font should be
a font with a fixed width like Courier or Monospaced
5. fixed-font-size/std-font-size (optional):
--------------------------------------------
the point size of the fixed font and the standard font. Can be set to any
integer number, however, it is recommended to set them to reasonable values
(e.g. 10-20)
6. default-background/default-foreground (optional):
----------------------------------------------------
specify default background and foreground colors for the applet.
possible values are:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
6. antialias (optional):
------------------------
turns the antialias for text rendering on/off.
possible values: "on", "off", "true", "false"
The parameters are used in the object tag, something like so
<html>
<head>
<title>My Applet</title>
</head>
<body>
My Applet<br><br>
<object type="application/x-java-applet">
<param name="code" value="zmpp-1.5-preview1.jar">
<param name="blorb-file" value="my-game.gblorb">
<p>You do not have Java available, or it is disabled.</p>
</object>
</body>
</html>
Note that there is an tag, which may work too, but it’s not recommended.
I don’t know if this is the problem or not, but that is for zmpp and I am using zmpp2 for glulx. I did try that code (thank you for trying to work this out with me, btw!), but it didn’t work… just a blank white page with the title on in.
I looked at the html for the zork game running on zmpp… (but again it’s not zmpp2) it had this (I altered with my file names and my preferences):
[/code]
it does use the applet tag you advised against though. I did manage to get the java loading icon - and then error saying it couldn't find "zmpp-glulx.jar". Although it is in the same server in the same file. I do have a question about that am I supposed to be putting just the file name or the file path? I am not sure what else to do.
When you say ‘same file’ do you mean the same directory? If everything is in the same directory you shouldn’t need to put the file path. If they’re in different directories, you’ll need to specify paths, or at least relative paths.
If the above doesn’t help you’re probably best off contacting Wei-ju, he reads the forums sometimes but maybe not very often.