Author Topic: Play community-created games in a browser  (Read 112603 times)

0 Members and 7 Guests are viewing this topic.

Offline gumby

Re: Play community-created games in a browser
« Reply #30 on: May 16, 2011, 05:35:46 PM »
I agree with you Lance - further investigation of the sarien.net code is needed & hopefully it's a more complete solution than the jDosBox solution from the AGI standpoint.  I doubt that the process is trivial to convert the games, but maybe it was the multi-player aspect that required additional work.

Unless anyone has any objections, I think I'll plow ahead with the jDosBox approach, create disk images of all the games (shouldn't take too long), figure out which AGI games don't work & then dive into the sarien.net solution. 

You are probably right about the multi-player bit being the extra work. I think Martin also put his own interface on top of it for making it easier to do things, which I imagine would change a bit for each game. It would actually be quite cool to see some of these AGI fan made games supporting multi-player though wouldn't it?


Looking at the readme included in the source, the process doesn't look terribly difficult, just time consuming.  All resources for the game need to exported using WinAGI.  A few files typically fail to export & agistudio is needed to extract the rest.  Then the files are run through AgiConvert. 

Not too bad - I think from running through the AGI games last night there were only a small handful that use NAGI (maybe 8-10).  I'd be willing to at least attempt it for a smaller game.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: Play community-created games in a browser
« Reply #31 on: May 16, 2011, 09:29:02 PM »
Ah, I overlooked that when using the jar file in our proposed configuration we do get to download a dosbox conf file from the server (or maybe it should be included within the zip file with the image).  That & the autolock switch should take care of it.

You guys are right - my expectations of what should happen with 'exit' were all wrong.  It does exit, it just can no longer update the display, so you get what appears to be a stalled dosbox.
Yep, that was it.  I included a dosbox config file with the autolock=false, and it works just fine.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Play community-created games in a browser
« Reply #32 on: May 17, 2011, 02:15:44 AM »
autolock=false seems to be the default. You do not need to add it. According to the jDOSBox author the parameter to use a conf file is
Code: [Select]
<param name="param1" value="-conf jar://dosbox.conf">
This assumes that the dosbox.conf is in the jdos folder in the jdosbox.jar file. Keep in mind that if you use the dosbox.conf for more than global settings, you will need a different jdosbox.jar file for each game. I did not try to add it to the game's jar to see if you could get a game specific conf. Some commands can simply be added to the autorun.bat file in the game's image file, but not all of the DOSBox commands will work with jDOSBox. Many seem to cause it to crash. If included in the dosbox.conf it will accept aspect=true, but if done from the command line, jDOSBox will crash. BTW, if you kill java.exe with the task manager you do not need to restart the browser to get it to run again.
KQII Remake Pic

Offline Collector

Re: Play community-created games in a browser
« Reply #33 on: May 17, 2011, 02:32:55 AM »
OK, I just tried adding the dosbox.conf to the game's jar and used 

<param name="param1" value="-conf jar://dosbox.conf">

and jDOSBox used it. The aspect correction is a little wonky in jDOSBox. It blurs the graphics, unlike DOSBox and seems to make the graphics unstable. It does not use SDL, so some things might not ever be added and other things will not work as well as with DOSBox. Still it does work surprisingly well. It will take a little experimenting to see what supported command don't work that well.
KQII Remake Pic

Offline gumby

Re: Play community-created games in a browser
« Reply #34 on: May 17, 2011, 08:12:14 AM »
Are you using a self-signed jar, or are you using one of the other methods?  I've had no problem with any of the games & mouse focus with the changes to the dosbox config.

Here's my configuration:

-  I'm using the self-signed jar approach where the image file is downloaded to the client
-  The game zip file consists of the game image file & a dosbox.conf file.  This gives us the flexibility to have different config settings for each game.  Currently, it only consists of:
Code: [Select]
[sdl]
autolock=false

-  The applet code looks very similar to this (from the 3rd example in the jDosBox applet howto) - my disk image size is different though
Code: [Select]
<APPLET CODE="jdos.gui.MainApplet" archive='jdosbox.jar' WIDTH=640 HEIGHT=400>
  <param name="download1" value="http://191.168.0.13/ap2.zip">
  <param name="param1" value="imgmount e ~/.jdosbox/ap2/ap2.img -size 512,16,2,512">
  <param name="param2" value="e:">
  <param name="param3" value="sciv">
  <param name="param4" value="-conf ~/.jdosbox/ap2/dosbox.conf">
 </APPLET>

This works just fine (in my opinion).  The only thing I was thinking about modifying was to have the applet launch in it's own frame, so navigating away wouldn't be an option, and the frame size would be the same size and the game screen resolution.

I've updated all the SCI games to use the dosbox config file, and I'm still working through the AGI games.
      
« Last Edit: May 17, 2011, 08:14:35 AM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Play community-created games in a browser
« Reply #35 on: May 17, 2011, 01:24:30 PM »
If there is no dosbox.conf it defaults to autolock=false. I was just using something similar to RGB Classics's code

Code: [Select]
<applet code="jdos.gui.MainApplet" archive="jdosbox.jar,freddy.jar" width="640" height="480" style="z-index: -100;">
  <param name="param2" value="imgmount c jar://freddy.img -size 512,16,2,512">
  <param name="param3" value="c:">
  <param name="param4" value="autorun">
</applet>

with autorun.bat in the base of the game's image file, giving whatever additional commands needed. This has worked well for me unless I try to use "codebase=", so the jars have to be in the same folder as the page.

Just curious, why are mounting the image as e:? It probably won't matter with the SCI games, but some DOS games don't like not being on C: (with D: for the CD-ROM dive for CD games).

By opening jDOSBox in a frame, do you mean a true frame or an iframe? I'm not sure how possible a true frame would be to do on this site. Would a popup window work, too? An iframe would be a nice touch, but a popup would allow you to navigate away without losing the game, but might encounter problems with popup blockers.
KQII Remake Pic

Offline gumby

Re: Play community-created games in a browser
« Reply #36 on: May 17, 2011, 01:58:19 PM »
That's interesting, because I never got the behavior of 'autolock=false' until I set it explicitly.  That's why I asked about which implementation method you were using - perhaps it makes a difference, dunno.

I just used E: because it was the default (and it happened to work).

Sorry, I was envisioning a popup window containing the applet, sized to it contents - frame is the wrong term.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline lance.ewing

Re: Play community-created games in a browser
« Reply #37 on: May 17, 2011, 03:55:56 PM »
Looking at the readme included in the source, the process doesn't look terribly difficult, just time consuming.  All resources for the game need to exported using WinAGI.  A few files typically fail to export & agistudio is needed to extract the rest.  Then the files are run through AgiConvert. 

Not too bad - I think from running through the AGI games last night there were only a small handful that use NAGI (maybe 8-10).  I'd be willing to at least attempt it for a smaller game.

I asked the question of Martin this morning and he told me it was fairly straight forward, so I think it might be easier than I was expecting.

A small game? Hmmm... I might be biased but you could try The Ruby Cast. It is around 15 rooms I think.

Offline gumby

Re: Play community-created games in a browser
« Reply #38 on: May 17, 2011, 07:51:16 PM »
Looking at the readme included in the source, the process doesn't look terribly difficult, just time consuming.  All resources for the game need to exported using WinAGI.  A few files typically fail to export & agistudio is needed to extract the rest.  Then the files are run through AgiConvert. 

Not too bad - I think from running through the AGI games last night there were only a small handful that use NAGI (maybe 8-10).  I'd be willing to at least attempt it for a smaller game.

I asked the question of Martin this morning and he told me it was fairly straight forward, so I think it might be easier than I was expecting.

A small game? Hmmm... I might be biased but you could try The Ruby Cast. It is around 15 rooms I think.

Hey, that sounds fine to me - for sure I'd like to use someone's who still active so we can get feedback whether it's correct or not (from a playability standpoint).
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Cloudee1

Re: Play community-created games in a browser
« Reply #39 on: May 17, 2011, 10:59:57 PM »
So I obviously missed something, where are those how tos you mentioned gumby. got my iso, where did you get the size settings, maybe that's my issue. dosbox loads in the applet, but my image fails to mount. 
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Collector

Re: Play community-created games in a browser
« Reply #40 on: May 18, 2011, 01:05:31 AM »
So I obviously missed something, where are those how tos you mentioned gumby. got my iso, where did you get the size settings, maybe that's my issue. dosbox loads in the applet, but my image fails to mount. 

DOSBox can be a little fussy with mounting HDD images. Bochs bximage is the HDD image creation tool that the DOSBox devs has usually recommended. I believe there is also one of the unsupported, and by now outdated, 3rd party SVN builds of DOSBox that has some kind image creation tool build in. You have to first create the image, mount it in DOSBox and then format it. I forget if you have to fdisk it before formatting it or if bximage does that for you. After you have done that you can use a tool such as WinImage to inject files and folders. You can find more on this on the DOSBox Wiki if you want, but I find it easier and faster just to modify an existing image.

This is a ZIP with the jar that contains an image that includes your Black Cauldron game. I had to upload it to my site because the board keeps flaking out when I try to attach it.

http://sierrahelp.com/download.php?file=Temp/black.zip

You can use WinRAR to open the jar and inside the jdos folder is the image file. You can modify it for other games by using a tool like WinImage to delete and inject folders and files as needed. I have also included a simple page with the basic HTML needed to add the applet. If you drop the jdosbox.jar file in the same folder, it will work as is.
KQII Remake Pic

Offline gumby

Re: Play community-created games in a browser
« Reply #41 on: May 18, 2011, 08:11:24 AM »
Yeah, there's a learning curve there for sure.  Here's what I did, hopefully I can get this right:

1.  Download Bochs & use the Disk Image Creation Tool - I created 10 meg images, don't worry - they compress to zilch later.
2.  Crank up the image in Bochs and fdisk then format it
3.  I then used DiskExplorer found referenced in the IMGMOUNT page in the DosBox pages http://www.dosbox.com/wiki/TOOLS:Disk_Explorer - use the 'Manual HD image' option & then the 'ATFormat' to open the image.   Drag'n'drop your files into your image & you are done.

I could just zip up the SCI ones & my sample HTML pages that I've done so far, upload them here, and you can take over from there (at least that was my original intent).  I'm pretty much done with them at this point.

DOSBox can be a little fussy with mounting HDD images. Bochs bximage is the HDD image creation tool that the DOSBox devs has usually recommended. I believe there is also one of the unsupported, and by now outdated, 3rd party SVN builds of DOSBox that has some kind image creation tool build in. You have to first create the image, mount it in DOSBox and then format it. I forget if you have to fdisk it before formatting it or if bximage does that for you. After you have done that you can use a tool such as WinImage to inject files and folders. You can find more on this on the DOSBox Wiki if you want, but I find it easier and faster just to modify an existing image.
Agreed.  For sure it's easier to keep a 'pristine' empty disk image so you don't have to mess around with creating a new one each time for each game.  Oh, and that DiskExplorer tool is fussy, it doesn't allow you to delete files or it corrupts the image (at least for DosBox usability).

« Last Edit: May 18, 2011, 08:15:39 AM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Play community-created games in a browser
« Reply #42 on: May 18, 2011, 02:34:55 PM »
WinImage is not fussy, but it is not free, either. It does work as shareware until it is registered, but I don't remember what limitations it has in shareware mode.
KQII Remake Pic

Offline Collector

Re: Play community-created games in a browser
« Reply #43 on: May 18, 2011, 06:07:57 PM »
I looked up which SVN build of DOSBox has image making abilities.

H-A-L-9000's Megabuild

I have not tried it myself.
KQII Remake Pic

Offline Cloudee1

Re: Play community-created games in a browser
« Reply #44 on: May 18, 2011, 08:49:20 PM »
I really hate not having the internet at home. Thought I had everything I needed but I didn't grab a boot disk, freedos. Made an img but now I can't do nothing to it. I did play some black cauldron over my local server, that was cool. It's definately slow but I'm assuming I can play with all the usual numbers and adjust some of that. Pretty cool though. As soon as I can make a couple of my own images, there's gonna be a new link button up there. anybody know of real good hosting, lol
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.027 seconds with 16 queries.