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

0 Members and 1 Guest are viewing this topic.

Offline gumby

Play community-created games in a browser
« on: May 13, 2011, 06:59:38 PM »
I think I've found a simple solution on how this can be accomplished.  Today I discovered the JPC project over at SourceForge.  It is capable of launching a pre-configured VM (FreeDos) and then one of our games - delivered through a java applet to a browser.  The only prerequisite is the client machine needs to have a JRE installed.  If I can grab some time I'll see if I can get this tested out this weekend.

Here is the project page if anyone is interested taking a look.  They've got a version of Doom you can play in your browser - exactly the configuration that I've described above.  Doom was laggy for me, but the requirements for our games are much lower.

http://jpc.sourceforge.net/home_home.html


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 #1 on: May 13, 2011, 08:20:55 PM »
RGB Classic Games was using JPC, but it was too slow and had other issues. They have since replaced it with a Java port of DOSBox "to make DOS games playable in your browser! Speed and compatibility are almost perfect in every game." No lag in Doom. You still need the Java runtime installed, but who does not already have it installed, these days?
KQII Remake Pic

Offline gumby

Re: Play community-created games in a browser
« Reply #2 on: May 13, 2011, 08:50:46 PM »
I just tried out jDosBox.  Works much better.  Thanks - you just saved me a few hours of tinkering, no doubt.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Raf

Re: Play community-created games in a browser
« Reply #3 on: May 14, 2011, 07:47:24 AM »
Some fanmade AGI games have memory issues with the original interpreter, and got to be run through Nagi. Nagi doesn't run in Dosbox, though. So... will this allow us AGI folks to play those games?

Also, how do savegames work with that setup?

Offline gumby

Re: Play community-created games in a browser
« Reply #4 on: May 14, 2011, 08:29:49 AM »
Some fanmade AGI games have memory issues with the original interpreter, and got to be run through Nagi. Nagi doesn't run in Dosbox, though. So... will this allow us AGI folks to play those games?
I don't have any experience with Nagi.  What are it's requirements to run?   I looks like it runs in a windowed environment - probably requires the MFC classes or something.  I guess we'd have to dream up another solution for the games that won't run under the original interpreter.

Also, how do savegames work with that setup?
Right off the top of my head, this may or may not be an issue.  I was thinking in terms of 'immediate accessibility' or the 'try-then-buy' sort of approach, like what you had posed in the 'agigames.com' thread.  If they like playing the game, they'll download it?

That said, we could attempt to create a complete packaged solution where the games could be played online (hosted in a browser) & offline (downloaded jar and run in console).  I'm sure there are some security issues to address when it comes to writing to local disk from a browser and I'm not sure if an applet can do that or not (perhaps if it's signed?).  For that matter, we'd be saving games to a VM, which would have to be saved to the local disk.  Lot's of questions here.

I've got some research to do.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Raf

Re: Play community-created games in a browser
« Reply #5 on: May 14, 2011, 09:04:42 AM »
Nagi does run under Windows, but uses SDL. I don't even know if it's usable in Java (although Dosbox does use it as well). In the worst-case scenario, we'd have to ask Nick to port it.

The question 'bout the savegames is exactly for that reason: Can we use it for try-before-you-download idea, or would it fit the in the cloud idea? Either one's useful, but it'd be good to know which one's possible.

Offline Collector

Re: Play community-created games in a browser
« Reply #6 on: May 14, 2011, 10:16:08 PM »
There is a Java AGI interpreter project, but it seems to be abandoned. http://sourceforge.net/projects/agi/ Whether these flawed games would run in it or not is another matter.

Save games can be written with the Java DOSBox, but are not stored locally, so are not available when you reload the page. I don't know if there is someway to alter this behavior or not. The Java DOSBox project can be found here: https://sourceforge.net/projects/jdosbox/ and the development thread on VOGONS is here: http://vogons.zetafleet.com/viewtopic.php?t=27467

You could also contact RGB Classic Games to ask about their browser implementation.
KQII Remake Pic

Offline gumby

Re: Play community-created games in a browser
« Reply #7 on: May 14, 2011, 11:03:40 PM »
I spent a good amount of today playing with jDosBox.  I've got it working within a website in both ways that we have been discussing.  The on-line play simply launches the JVM & mounts the disk image from the hosting site in-memory.  The off-line play downloads the disk image to the client computer, extracts it & launches it locally.  The major distinction between these two methods is that the offline play allows for save games & you can restore (even after blowing out all of your cookies, etc) because the disk image is stored within the user's profile.  I'd propose that this is the way to go.  The only downside (and it's pretty small) is that the jDosBox jar file needs to be signed - not a big deal at all.

I've figured out how to create disk images for each game (that was fun - haven't played with VM's or emulation in a while).  Setting up an applet for a webpage was really easy.  I'm ready to go to town & convert all the fan games into disk images. 

Raf - do you know of a couple of games that don't work with the original interpreter so we can test them against other implementations?
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 #8 on: May 14, 2011, 11:05:45 PM »
This is all very fascinating, you mean theoretically all we need is an applet that loads   jdosbox, and our games and we're good to go online as is minus saved games, at least as far as sci goes
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Play community-created games in a browser
« Reply #9 on: May 14, 2011, 11:08:13 PM »
Yeah, it's super-easy.  The applet consists of nothing but a couple of lines of html.

I should clarify.  Save games are a go.  Our implementation of the applet just needs to use the code that sends the game image file down to the client.  It's all 'online' from the point of view of the user.

EDIT:  I shouldn't have used the 'on-line' and 'off-line' phrases in any of this.  It's confusing, and a subtle distinction.  Everything is run through the browser, it's all a matter of where the resources are when you run the game.
« Last Edit: May 14, 2011, 11:11:32 PM 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 #10 on: May 15, 2011, 03:12:47 AM »
Probably need more bandwidth than what this site often has. RGB Classic Games usually has fairly decent bandwidth and there can still be a bit of a lag loading.

I linked to the Java AGI interpreter project above, but I have not explored it. It may not be in a usable state. If Lance could take a look at it, he could determine how close it is to be usable. NAGI seems to be about the best of the AGI interpreters. I don't know how much work it would be to port it to Java.

Just found out that Sarien.net is open source. It could be one solution for the AGI games. http://sarien.net/source
KQII Remake Pic

Offline Raf

Re: Play community-created games in a browser
« Reply #11 on: May 15, 2011, 04:49:15 AM »
Raf - do you know of a couple of games that don't work with the original interpreter so we can test them against other implementations?
Enclosure (if I'm not mistaken), Klownstein's Hobbits (100% sure) and Ninja Forever (100%, but it's not released yet)

Offline lance.ewing

Re: Play community-created games in a browser
« Reply #12 on: May 15, 2011, 05:26:30 AM »
Probably need more bandwidth than what this site often has. RGB Classic Games usually has fairly decent bandwidth and there can still be a bit of a lag loading.

I linked to the Java AGI interpreter project above, but I have not explored it. It may not be in a usable state. If Lance could take a look at it, he could determine how close it is to be usable. NAGI seems to be about the best of the AGI interpreters. I don't know how much work it would be to port it to Java.

Just found out that Sarien.net is open source. It could be one solution for the AGI games. http://sarien.net/source

If you recall from a few months ago, we were discussing what the best fan made AGI games were in case Martin Kool was unable to continue sarien.net with Sierra's games. But then he sorted things out with Activision and was able to continue with some of the originals. So I think that it would be left to us now to attempt to convert the games into the sarien.net format.

A Java DOSBOX applet would obviously work with the original formats and would in theory require less work. On the other hand, sarien.net does not require a Java plugin. It works with what a browser has by default. So sarien.net does seem nice from that point of view, but I've got no idea how much work it would take to convert the games. I'm guessing it might not be straight forward. I would be keen to hear back on anyone who has tried converting a fanmade game and what issues they encountered. I recall that Martin didn't just launch all the games at once. I seem to recall that he kept advertising games that were in the pipeline, which suggests to me that there was a conversion process that wasn't 100%. I can ask him and see what he says about that.

The Java DOSBOX approach sounds very interesting though.

Anyone keen to write a Flash AGI interpreter?

Offline gumby

Re: Play community-created games in a browser
« Reply #13 on: May 15, 2011, 12:46:22 PM »
Enclosure (if I'm not mistaken), Klownstein's Hobbits (100% sure) and Ninja Forever (100%, but it's not released yet)
Yep, Hobbits bombs nicely with the original interpreter - memory problem immediately.

If you recall from a few months ago, we were discussing what the best fan made AGI games were in case Martin Kool was unable to continue sarien.net with Sierra's games. But then he sorted things out with Activision and was able to continue with some of the originals. So I think that it would be left to us now to attempt to convert the games into the sarien.net format.

A Java DOSBOX applet would obviously work with the original formats and would in theory require less work. On the other hand, sarien.net does not require a Java plugin. It works with what a browser has by default. So sarien.net does seem nice from that point of view, but I've got no idea how much work it would take to convert the games. I'm guessing it might not be straight forward. I would be keen to hear back on anyone who has tried converting a fanmade game and what issues they encountered. I recall that Martin didn't just launch all the games at once. I seem to recall that he kept advertising games that were in the pipeline, which suggests to me that there was a conversion process that wasn't 100%. I can ask him and see what he says about that.
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. 
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 #14 on: May 15, 2011, 04:06:28 PM »
Anyone keen to write a Flash AGI interpreter?
Could this be done to use existing unmodified game logic?
KQII Remake Pic


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.122 seconds with 23 queries.