irmen / Tale

Interactive fiction (text adventure) and Mud framework
http://tale.readthedocs.io/
GNU Lesser General Public License v3.0
145 stars 35 forks source link

Prompt Web tab in client browser from server hosted game #31

Closed jarodieg closed 6 years ago

jarodieg commented 6 years ago

Hello!

First of all, thank you for your hard work in Tale, I'm very interested in the project and actually developing a little game/test with it.

I have a doubt about the web browser interface. Is there a way already integrated in the project to host the game(IF in this case) in my server and launch it via web interface in the client browser?

Otherwise I could integrate it and create a pull request.

Greetings!

irmen commented 6 years ago

I am not quite sure what it is that you're asking.

Yes, Tale can run in a web browser (see https://www.razorvine.net/tale/ ) You launch tale in a web server mode by using the correct config parameters in your story.py (mud_host, mud_port)

In my example, I run it as a web app behind NGinx that works as a reverse proxy here.

irmen commented 6 years ago

Also, in case this is what you're asking, you can automatically launch your web browser to show the game

import webbrowser
webbrowser.open("http://url.to.your.tale.server/tale")
jarodieg commented 6 years ago

Hi Irmen, sorry for the delay.

Your first answer made me realize the usage of the mud mode, that i thought works in a different way. With It i got the setup i wanted to build, :D Thank you!!!

irmen commented 6 years ago

alright!

Maybe it helps to consider that running Tale in mud mode, the only way to do that sensibly is by using the web server interface. The text and Tkinter GUI interfaces are strictly single user and don't make much sense for MUD mode. The web interface therefore requires those 2 config items anyway