Porting a Zork clone to HTML and Javascript

I made a Zork-style adventure game in Python for a class. Was hoping to port it to HTML and Javascript with a pseudo-terminal running in the browser. Thing is, I don’t know where to begin. I suppose this isn’t very helpful, but any pointers on where to start or how to start building?

I figure most of the objects and functions can be ported from Python with the trick being to create functions to mimic the terminal window.

I’m not familiar with Zork, but there is a python web framework called “bottlepy” you may want to check that out.


You can pass python data structures to it, and use an html template to format the page.

def hello(name='World'):
    return template('hello_template', {name=name})

hello_template is your .tpl template file, and you can pass to your template file python data structures, variables, objects, etc. which can then be displayed by your template file.

 <h1>Hello {{name.title()}}!</h1>
1 Like