Converting terminal program (with termbox) to run on the web

207 views
Skip to first unread message

nichola...@gmail.com

unread,
Mar 14, 2014, 8:02:52 PM3/14/14
to golan...@googlegroups.com
I have been working on a little game in my spare time for the 7 day roguelike challenge (http://7drl.org/) and have been so far using termbox to render ascii in the console and accept input. 

I realize that few people are going to take the time to install it from source and run it (or run a binary I provide) so I wonder what my options are to convert this to something that can run on as a web app. 

I would like to avoid rewriting all of the input/rendering code if I could - is there any library that allows a similar interface between running on a native terminal and one emulated in the browser? 

Kevin D

unread,
Mar 14, 2014, 8:44:27 PM3/14/14
to golan...@googlegroups.com, nichola...@gmail.com
I did some research and I found https://github.com/paradoxxxzero/butterfly

After I did `pip install butterfly`, I was able to run butterfly like this:


and start the butterfly server running the termbox editbox demo. Then went to http://localhost:57575/ and it worked perfectly. So if you are able
to host a python application somewhere, this solution could work for you.

nichola...@gmail.com

unread,
Mar 15, 2014, 2:34:46 AM3/15/14
to golan...@googlegroups.com, nichola...@gmail.com
That is 100% perfect for what I need. You are awesome. 
Reply all
Reply to author
Forward
0 new messages